diff options
| author | Takashi Kokubun <takashikkbn@gmail.com> | 2024-11-04 08:14:28 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-11-04 11:14:28 -0500 |
| commit | 478e0fc710b8fefaa3bdb7cb41dda8716e29927a (patch) | |
| tree | 7e4dfe65ad53e2ae5483adb0276d00ebe58bb802 /spec | |
| 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 <maximecb@ruby-lang.org>
Diffstat (limited to 'spec')
| -rw-r--r-- | spec/ruby/optional/capi/debug_spec.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/spec/ruby/optional/capi/debug_spec.rb b/spec/ruby/optional/capi/debug_spec.rb index 148b8c38fb..14ba25609c 100644 --- a/spec/ruby/optional/capi/debug_spec.rb +++ b/spec/ruby/optional/capi/debug_spec.rb @@ -37,9 +37,12 @@ describe "C-API Debug function" do it "matches the locations in rb_debug_inspector_backtrace_locations" do frames = @o.rb_debug_inspector_open(42) - frames.each do |_s, _klass, binding, _iseq, backtrace_location| + frames.each do |_s, klass, binding, iseq, backtrace_location| if binding - binding.source_location.should == [backtrace_location.path, backtrace_location.lineno] + # YJIT modifies Array#each backtraces but leaves its source_location as is + unless defined?(RubyVM::YJIT) && klass == Array && iseq.label == "each" + binding.source_location.should == [backtrace_location.path, backtrace_location.lineno] + end method_name = binding.eval('__method__') if method_name method_name.should == backtrace_location.base_label.to_sym |
