summaryrefslogtreecommitdiff
path: root/mjit_compile.c
diff options
context:
space:
mode:
authorTakashi Kokubun <[email protected]>2022-07-14 21:53:41 -0700
committerTakashi Kokubun <[email protected]>2022-07-14 22:54:20 -0700
commit6c2cad835a0d7d73a00a5048babb113c4afa388b (patch)
tree555fe5df5f4a4a371a67a5cc1b0e5cd5bdbef374 /mjit_compile.c
parented8c21bbd5071b52d0d0612eadbdad8fe192e974 (diff)
MJIT: Share rb_mjit_unit through mjit_unit.h
mjit_compile.c should be able to access this more easily.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/6140
Diffstat (limited to 'mjit_compile.c')
-rw-r--r--mjit_compile.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/mjit_compile.c b/mjit_compile.c
index 985c3caba6..66deaa9a65 100644
--- a/mjit_compile.c
+++ b/mjit_compile.c
@@ -20,6 +20,7 @@
#include "internal/object.h"
#include "internal/variable.h"
#include "mjit.h"
+#include "mjit_unit.h"
#include "vm_core.h"
#include "vm_callinfo.h"
#include "vm_exec.h"
@@ -87,8 +88,6 @@ call_data_index(CALL_DATA cd, const struct rb_iseq_constant_body *body)
return cd - body->call_data;
}
-const struct rb_callcache ** mjit_iseq_cc_entries(const struct rb_iseq_constant_body *const body);
-
// Using this function to refer to cc_entries allocated by `mjit_capture_cc_entries`
// instead of storing cc_entries in status directly so that we always refer to a new address
// returned by `realloc` inside it.
@@ -96,7 +95,7 @@ static const struct rb_callcache **
captured_cc_entries(const struct compile_status *status)
{
VM_ASSERT(status->cc_entries_index != -1);
- return mjit_iseq_cc_entries(status->compiled_iseq) + status->cc_entries_index;
+ return status->compiled_iseq->jit_unit->cc_entries + status->cc_entries_index;
}
// Returns true if call cache is still not obsoleted and vm_cc_cme(cc)->def->type is available.