MJIT: Give a more appropriate name to the initial state
This commit is contained in:
parent
0dc5c117a5
commit
97ed056274
4
mjit.h
4
mjit.h
@ -21,8 +21,8 @@
|
|||||||
// Special address values of a function generated from the
|
// Special address values of a function generated from the
|
||||||
// corresponding iseq by MJIT:
|
// corresponding iseq by MJIT:
|
||||||
enum rb_mjit_func_state {
|
enum rb_mjit_func_state {
|
||||||
// ISEQ has never been enqueued to unit_queue yet
|
// ISEQ has not been compiled yet
|
||||||
MJIT_FUNC_NOT_QUEUED = 0,
|
MJIT_FUNC_NOT_COMPILED = 0,
|
||||||
// ISEQ is already queued for the machine code generation but the
|
// ISEQ is already queued for the machine code generation but the
|
||||||
// code is not ready yet for the execution
|
// code is not ready yet for the execution
|
||||||
MJIT_FUNC_COMPILING = 1,
|
MJIT_FUNC_COMPILING = 1,
|
||||||
|
8
vm.c
8
vm.c
@ -389,10 +389,10 @@ static inline VALUE mjit_check_iseq(rb_execution_context_t *ec, const rb_iseq_t
|
|||||||
static VALUE
|
static VALUE
|
||||||
mjit_check_iseq(rb_execution_context_t *ec, const rb_iseq_t *iseq, struct rb_iseq_constant_body *body)
|
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);
|
uintptr_t mjit_state = (uintptr_t)(body->jit_func);
|
||||||
ASSUME(MJIT_FUNC_STATE_P(func_i));
|
ASSUME(MJIT_FUNC_STATE_P(mjit_state));
|
||||||
switch ((enum rb_mjit_func_state)func_i) {
|
switch ((enum rb_mjit_func_state)mjit_state) {
|
||||||
case MJIT_FUNC_NOT_QUEUED:
|
case MJIT_FUNC_NOT_COMPILED:
|
||||||
if (body->total_calls == mjit_opts.call_threshold) {
|
if (body->total_calls == mjit_opts.call_threshold) {
|
||||||
rb_mjit_add_iseq_to_process(iseq);
|
rb_mjit_add_iseq_to_process(iseq);
|
||||||
if (UNLIKELY(mjit_opts.wait && !MJIT_FUNC_STATE_P(body->jit_func))) {
|
if (UNLIKELY(mjit_opts.wait && !MJIT_FUNC_STATE_P(body->jit_func))) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user