diff options
author | Takashi Kokubun <[email protected]> | 2024-11-04 08:14:28 -0800 |
---|---|---|
committer | GitHub <[email protected]> | 2024-11-04 11:14:28 -0500 |
commit | 478e0fc710b8fefaa3bdb7cb41dda8716e29927a (patch) | |
tree | 7e4dfe65ad53e2ae5483adb0276d00ebe58bb802 /yjit.c | |
parent | 51ac93011a8b279c1e2b93bbe6c8709392e82f57 (diff) |
YJIT: Replace Array#each only when YJIT is enabled (#11955)
* YJIT: Replace Array#each only when YJIT is enabled
* Add comments about BUILTIN_ATTR_C_TRACE
* Make Ruby Array#each available with --yjit as well
* Fix all paths that expect a C location
* Use method_basic_definition_p to detect patches
* Copy a comment about C_TRACE flag to compilers
* Rephrase a comment about add_yjit_hook
* Give METHOD_ENTRY_BASIC flag to Array#each
* Add --yjit-c-builtin option
* Allow inconsistent source_location in test-spec
* Refactor a check of BUILTIN_ATTR_C_TRACE
* Set METHOD_ENTRY_BASIC without touching vm->running
Notes
Notes:
Merged-By: maximecb <[email protected]>
Diffstat (limited to 'yjit.c')
-rw-r--r-- | yjit.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -1244,6 +1244,14 @@ VALUE rb_yjit_code_gc(rb_execution_context_t *ec, VALUE self); VALUE rb_yjit_simulate_oom_bang(rb_execution_context_t *ec, VALUE self); VALUE rb_yjit_get_exit_locations(rb_execution_context_t *ec, VALUE self); VALUE rb_yjit_enable(rb_execution_context_t *ec, VALUE self, VALUE gen_stats, VALUE print_stats, VALUE gen_compilation_log, VALUE print_compilation_log); +VALUE rb_yjit_c_builtin_p(rb_execution_context_t *ec, VALUE self); + +// Allow YJIT_C_BUILTIN macro to force --yjit-c-builtin +#ifdef YJIT_C_BUILTIN +static VALUE yjit_c_builtin_p(rb_execution_context_t *ec, VALUE self) { return Qtrue; } +#else +#define yjit_c_builtin_p rb_yjit_c_builtin_p +#endif // Preprocessed yjit.rb generated during build #include "yjit.rbinc" |