diff options
| author | Alan Wu <XrXr@users.noreply.github.com> | 2020-10-22 14:16:39 -0400 |
|---|---|---|
| committer | Alan Wu <XrXr@users.noreply.github.com> | 2021-10-20 18:19:25 -0400 |
| commit | 498fe0fb52c4b3f7c8a4abdc9da1fffb2aa8c69b (patch) | |
| tree | f71a599ee8fd326dc408b073dca0632011341c3b | |
| parent | 809ecfb1266fac21019f0264f060f408c2946fdd (diff) | |
Move MicroJIT compilation threshold into MicroJIT's header
| -rw-r--r-- | mjit.h | 3 | ||||
| -rw-r--r-- | ujit_compile.h | 2 |
2 files changed, 3 insertions, 2 deletions
@@ -150,8 +150,7 @@ mjit_exec(rb_execution_context_t *ec) } #ifndef MJIT_HEADER - const int ujit_call_threashold = 10; - if (rb_ujit_enabled_p() && !mjit_call_p && body->total_calls == ujit_call_threashold) { + if (rb_ujit_enabled_p() && !mjit_call_p && body->total_calls == UJIT_CALL_THRESHOLD) { rb_ujit_compile_iseq(iseq); return Qundef; } diff --git a/ujit_compile.h b/ujit_compile.h index b849b391d5..89ee85d938 100644 --- a/ujit_compile.h +++ b/ujit_compile.h @@ -20,6 +20,8 @@ bool rb_ujit_enabled_p(void) return rb_ujit_enabled; } +#define UJIT_CALL_THRESHOLD (10u) + void rb_ujit_init(void); uint8_t *ujit_compile_insn(const rb_iseq_t *iseq, unsigned int insn_idx, unsigned int *next_ujit_idx); void rb_ujit_compile_iseq(const rb_iseq_t *iseq); |
