Project

General

Profile

Feature #14462 ยป jit-version.diff

chrisseaton (Chris Seaton), 02/10/2018 09:23 PM

View differences:

include/ruby/ruby.h
2521 2521

  
2522 2522
/* version.c */
2523 2523
void ruby_show_version(void);
2524
void ruby_show_version_with_jit(int jit_on);
2524 2525
void ruby_show_copyright(void);
2525 2526

  
2526 2527

  
ruby.c
1555 1555
	rb_warning("-K is specified; it is for 1.8 compatibility and may cause odd behavior");
1556 1556

  
1557 1557
    if (opt->dump & (DUMP_BIT(version) | DUMP_BIT(version_v))) {
1558
	ruby_show_version();
1558
	int jit_on = opt->mjit.on;
1559
#ifdef MJIT_FORCE_ENABLE
1560
	jit_on = 1;
1561
#endif
1562
	ruby_show_version_with_jit(jit_on);
1559 1563
	if (opt->dump & DUMP_BIT(version)) return Qtrue;
1560 1564
    }
1561 1565
    if (opt->dump & DUMP_BIT(copyright)) {
version.c
86 86
void
87 87
ruby_show_version(void)
88 88
{
89
    PRINT(description);
89
    ruby_show_version_with_jit(0);
90
}
91

  
92
/*! Prints the version information of the CRuby interpreter to stdout, including JIT information. */
93
void
94
ruby_show_version_with_jit(int jit_on)
95
{
96
    printf("%s", ruby_description);
97
    if (jit_on) printf(" +JIT"); 
98
    printf("\n");
90 99
#ifdef RUBY_LAST_COMMIT_TITLE
91 100
    fputs("last_commit=" RUBY_LAST_COMMIT_TITLE, stdout);
92 101
#endif