summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Kokubun <takashikkbn@gmail.com>2022-12-08 22:58:39 -0800
committerTakashi Kokubun <takashikkbn@gmail.com>2022-12-08 22:58:40 -0800
commit97ed056274f4b1f5a174f9ed45aecba4d3c37568 (patch)
tree60f4a6bdeff6b33db64fddab8c645afffb4c2de1
parent0dc5c117a5eb8773b717ef79c4f78ccf0e3981d5 (diff)
MJIT: Give a more appropriate name to the initial state
-rw-r--r--mjit.h4
-rw-r--r--vm.c8
2 files changed, 6 insertions, 6 deletions
diff --git a/mjit.h b/mjit.h
index fc4f6eda27..dc46ef2112 100644
--- a/mjit.h
+++ b/mjit.h
@@ -21,8 +21,8 @@
// Special address values of a function generated from the
// corresponding iseq by MJIT:
enum rb_mjit_func_state {
- // ISEQ has never been enqueued to unit_queue yet
- MJIT_FUNC_NOT_QUEUED = 0,
+ // ISEQ has not been compiled yet
+ MJIT_FUNC_NOT_COMPILED = 0,
// ISEQ is already queued for the machine code generation but the
// code is not ready yet for the execution
MJIT_FUNC_COMPILING = 1,
diff --git a/vm.c b/vm.c
index d62b2f0d48..8daed5d474 100644
--- a/vm.c
+++ b/vm.c
@@ -389,10 +389,10 @@ static inline VALUE mjit_check_iseq(rb_execution_context_t *ec, const rb_iseq_t
static VALUE
mjit_check_iseq(rb_execution_context_t *ec, const rb_iseq_t *iseq, struct rb_iseq_constant_body *body)
{
- uintptr_t func_i = (uintptr_t)(body->jit_func);
- ASSUME(MJIT_FUNC_STATE_P(func_i));
- switch ((enum rb_mjit_func_state)func_i) {
- case MJIT_FUNC_NOT_QUEUED:
+ uintptr_t mjit_state = (uintptr_t)(body->jit_func);
+ ASSUME(MJIT_FUNC_STATE_P(mjit_state));
+ switch ((enum rb_mjit_func_state)mjit_state) {
+ case MJIT_FUNC_NOT_COMPILED:
if (body->total_calls == mjit_opts.call_threshold) {
rb_mjit_add_iseq_to_process(iseq);
if (UNLIKELY(mjit_opts.wait && !MJIT_FUNC_STATE_P(body->jit_func))) {