From d70484f0eb176a7ef7274972ff92b88905ea0edc Mon Sep 17 00:00:00 2001 From: Maxime Chevalier-Boisvert Date: Mon, 17 Jul 2023 10:41:18 -0400 Subject: 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 --------- Co-authored-by: Alan Wu --- yjit.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'yjit.c') 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) { -- cgit v1.2.3