summaryrefslogtreecommitdiff
path: root/compile.c
diff options
context:
space:
mode:
authorAlan Wu <XrXr@users.noreply.github.com>2020-09-28 07:03:28 -0400
committerAlan Wu <XrXr@users.noreply.github.com>2021-10-20 18:19:24 -0400
commite8c914c2502f6049ebc5bd93e8db0c62dd14400e (patch)
treec9f8f324366e0a44eba7f89aac117306f83c2e72 /compile.c
parentf3c961f273d3fa305c9ebea57e5d1ff96f241e19 (diff)
Implement the --disable-ujit command line option
Diffstat (limited to 'compile.c')
-rw-r--r--compile.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/compile.c b/compile.c
index cbcda72949..5f6bc8476b 100644
--- a/compile.c
+++ b/compile.c
@@ -869,7 +869,7 @@ rb_iseq_translate_threaded_code(rb_iseq_t *iseq)
unsigned int next_ujit_idx = 0;
unsigned int translated_len = 0;
- bool ujit_disabled = false /*get_cmdline_flag()*/;
+ bool ujit_enabled = rb_ujit_enabled_p();
VALUE *translated_insns = ALLOCV_N(VALUE, translated_insns_buf, iseq->body->iseq_size);
for (insn_idx = 0; insn_idx < iseq->body->iseq_size; /* */) {
@@ -880,7 +880,7 @@ rb_iseq_translate_threaded_code(rb_iseq_t *iseq)
uint8_t* native_code_ptr = NULL;
// If ujit is enabled and hasn't already compiled this instruction
- if (!ujit_disabled && insn_idx >= next_ujit_idx)
+ if (ujit_enabled && insn_idx >= next_ujit_idx)
native_code_ptr = ujit_compile_insn(iseq, insn_idx, &next_ujit_idx);
if (native_code_ptr)