diff options
author | Alan Wu <[email protected]> | 2021-06-21 19:26:50 -0400 |
---|---|---|
committer | Alan Wu <[email protected]> | 2021-10-20 18:19:36 -0400 |
commit | 89110590a3864e4af1fd62df0182396b86ab17f3 (patch) | |
tree | 3e956973ec05c78d66fa50fb7b0f08d8f412ac90 | |
parent | da20ff1644a274aff4d5ad22c649c85d83e7e311 (diff) |
Disable invokesuper codegen for now. Add test
The added test fails with SystemStackError with --yjit-call-threshold=1.
-rw-r--r-- | bootstraptest/test_yjit.rb | 20 | ||||
-rw-r--r-- | yjit_codegen.c | 2 |
2 files changed, 21 insertions, 1 deletions
diff --git a/bootstraptest/test_yjit.rb b/bootstraptest/test_yjit.rb index da66c06795..67d9b4867f 100644 --- a/bootstraptest/test_yjit.rb +++ b/bootstraptest/test_yjit.rb @@ -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 +} diff --git a/yjit_codegen.c b/yjit_codegen.c index 282231ae44..46d7281358 100644 --- a/yjit_codegen.c +++ b/yjit_codegen.c @@ -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); } |