mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Disable invokesuper codegen for now. Add test
The added test fails with SystemStackError with --yjit-call-threshold=1.
This commit is contained in:
parent
da20ff1644
commit
89110590a3
2 changed files with 21 additions and 1 deletions
|
@ -1204,3 +1204,23 @@ assert_equal '123', %q{
|
|||
foo(Foo)
|
||||
foo(Foo)
|
||||
}
|
||||
|
||||
# invokesuper edge case
|
||||
assert_equal '[:A, [:A, :B]]', %q{
|
||||
class B
|
||||
def foo = :B
|
||||
end
|
||||
|
||||
class A < B
|
||||
def foo = [:A, super()]
|
||||
end
|
||||
|
||||
A.new.foo
|
||||
A.new.foo # compile A#foo
|
||||
|
||||
class C < A
|
||||
define_method(:bar, A.instance_method(:foo))
|
||||
end
|
||||
|
||||
C.new.bar
|
||||
}
|
||||
|
|
|
@ -2974,6 +2974,7 @@ gen_send(jitstate_t *jit, ctx_t *ctx)
|
|||
return gen_send_general(jit, ctx, cd, block);
|
||||
}
|
||||
|
||||
RBIMPL_ATTR_MAYBE_UNUSED() // not in use as it has problems in some situations.
|
||||
static codegen_status_t
|
||||
gen_invokesuper(jitstate_t *jit, ctx_t *ctx)
|
||||
{
|
||||
|
@ -3355,6 +3356,5 @@ yjit_init_codegen(void)
|
|||
yjit_reg_op(BIN(getblockparamproxy), gen_getblockparamproxy);
|
||||
yjit_reg_op(BIN(opt_send_without_block), gen_opt_send_without_block);
|
||||
yjit_reg_op(BIN(send), gen_send);
|
||||
yjit_reg_op(BIN(invokesuper), gen_invokesuper);
|
||||
yjit_reg_op(BIN(leave), gen_leave);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue