summaryrefslogtreecommitdiff
path: root/yjit.c
diff options
context:
space:
mode:
authorMaxime Chevalier-Boisvert <maxime.chevalierboisvert@shopify.com>2023-07-17 10:41:18 -0400
committerGitHub <noreply@github.com>2023-07-17 10:41:18 -0400
commitd70484f0eb176a7ef7274972ff92b88905ea0edc (patch)
treef255d7024f61ed86e0dd4e2f848c39a8e2dfce97 /yjit.c
parent1c4a523006e4a0994db4f166bd410fe1d35e8611 (diff)
YJIT: refactoring to allow for fancier call threshold logic (#8078)
* YJIT: refactoring to allow for fancier call threshold logic * Avoid potentially compiling functions multiple times. * Update vm.c Co-authored-by: Alan Wu <XrXr@users.noreply.github.com> --------- Co-authored-by: Alan Wu <XrXr@users.noreply.github.com>
Notes
Notes: Merged-By: maximecb <maximecb@ruby-lang.org>
Diffstat (limited to 'yjit.c')
-rw-r--r--yjit.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/yjit.c b/yjit.c
index 8e0c43f1bd..4db46d59f3 100644
--- a/yjit.c
+++ b/yjit.c
@@ -590,6 +590,12 @@ rb_get_def_bmethod_proc(rb_method_definition_t *def)
return def->body.bmethod.proc;
}
+unsigned long
+rb_get_iseq_body_total_calls(const rb_iseq_t *iseq)
+{
+ return iseq->body->total_calls;
+}
+
const rb_iseq_t *
rb_get_iseq_body_local_iseq(const rb_iseq_t *iseq)
{