summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTakashi Kokubun <takashikkbn@gmail.com>2023-03-21 00:10:14 -0700
committerTakashi Kokubun <takashikkbn@gmail.com>2023-03-21 00:10:14 -0700
commitc44367265daccc504e6ee35eb2ae5712563246c3 (patch)
tree3135d02346ffa14ba6fb082867a912cd6cf337d0 /lib
parent832f810dd76e491109e95cf441b311f8b6aecf26 (diff)
RJIT: Fix invokesuper
Diffstat (limited to 'lib')
-rw-r--r--lib/ruby_vm/rjit/insn_compiler.rb8
1 files changed, 1 insertions, 7 deletions
diff --git a/lib/ruby_vm/rjit/insn_compiler.rb b/lib/ruby_vm/rjit/insn_compiler.rb
index 80d09376d3..f3448ec426 100644
--- a/lib/ruby_vm/rjit/insn_compiler.rb
+++ b/lib/ruby_vm/rjit/insn_compiler.rb
@@ -3876,7 +3876,7 @@ module RubyVM::RJIT
C::FL_TEST_RAW(rbasic_klass, C::RMODULE_IS_REFINEMENT) != 0
return CantCompile
end
- comptime_superclass = C.rb_class_get_superclass(current_defined_class)
+ comptime_superclass = C.rb_class_get_superclass(C.RCLASS_ORIGIN(current_defined_class))
# Don't JIT calls that aren't simple
# Note, not using VM_CALL_ARGS_SIMPLE because sometimes we pass a block.
@@ -3907,12 +3907,6 @@ module RubyVM::RJIT
return CantCompile
end
- # workaround -- TODO: Why does this happen?
- if me.to_i == cme.to_i
- asm.incr_counter(:invokesuper_same_me)
- return CantCompile
- end
-
# Check that we'll be able to write this method dispatch before generating checks
cme_def_type = cme.def.type
if cme_def_type != C::VM_METHOD_TYPE_ISEQ && cme_def_type != C::VM_METHOD_TYPE_CFUNC