aboutsummaryrefslogtreecommitdiffstats
path: root/yjit.h
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.h
parent1c4a523006e4a0994db4f166bd410fe1d35e8611 (diff)
downloadruby-d70484f0eb176a7ef7274972ff92b88905ea0edc.tar.gz
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>
Diffstat (limited to 'yjit.h')
-rw-r--r--yjit.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/yjit.h b/yjit.h
index a76dc6a850..37a3fb0d49 100644
--- a/yjit.h
+++ b/yjit.h
@@ -27,7 +27,7 @@
// Expose these as declarations since we are building YJIT.
bool rb_yjit_enabled_p(void);
bool rb_yjit_compile_new_iseqs(void);
-unsigned rb_yjit_call_threshold(void);
+bool rb_yjit_threshold_hit(const rb_iseq_t *const iseq);
void rb_yjit_invalidate_all_method_lookup_assumptions(void);
void rb_yjit_cme_invalidate(rb_callable_method_entry_t *cme);
void rb_yjit_collect_binding_alloc(void);
@@ -49,7 +49,7 @@ void rb_yjit_tracing_invalidate_all(void);
static inline bool rb_yjit_enabled_p(void) { return false; }
static inline bool rb_yjit_compile_new_iseqs(void) { return false; }
-static inline unsigned rb_yjit_call_threshold(void) { return UINT_MAX; }
+static inline bool rb_yjit_threshold_hit(const rb_iseq_t *const iseq) { return false; }
static inline void rb_yjit_invalidate_all_method_lookup_assumptions(void) {}
static inline void rb_yjit_cme_invalidate(rb_callable_method_entry_t *cme) {}
static inline void rb_yjit_collect_binding_alloc(void) {}