From 712a66b0741605f5b2db670a292b9bb352f8a716 Mon Sep 17 00:00:00 2001 From: Koichi Sasada Date: Wed, 3 Jul 2019 03:37:25 +0900 Subject: Revert "Avoid corrupting VM stack on inlined setlocal" This reverts commit ea30dd702512ff9df34fe8c71c825f8f901bf5b1. because it fails when VM_CHECK_MODE=1. --- tool/ruby_vm/views/_mjit_compile_send.erb | 5 ----- 1 file changed, 5 deletions(-) (limited to 'tool/ruby_vm') diff --git a/tool/ruby_vm/views/_mjit_compile_send.erb b/tool/ruby_vm/views/_mjit_compile_send.erb index 3db1386aca..da7e96581b 100644 --- a/tool/ruby_vm/views/_mjit_compile_send.erb +++ b/tool/ruby_vm/views/_mjit_compile_send.erb @@ -46,15 +46,10 @@ % # JIT: If ISeq is inlinable, call the inlined method without pushing a frame. if (status->inlined_iseqs != NULL && status->inlined_iseqs[pos] == iseq->body) { - // TODO: consider using C variables for Ruby variables to simplify cfp->ep manipulation fprintf(f, " {\n"); fprintf(f, " VALUE orig_self = reg_cfp->self;\n"); - fprintf(f, " VALUE orig_ep = reg_cfp->ep;\n"); fprintf(f, " reg_cfp->self = stack[%d];\n", b->stack_size - argc - 1); - fprintf(f, " reg_cfp->ep = reg_cfp->sp + %d + 2;\n", iseq->body->local_table_size - iseq->body->param.size); // simulate `vm_push_frame`'s local_size and 2 increments - fprintf(f, " ((VALUE *)reg_cfp->ep)[VM_ENV_DATA_INDEX_ENV] = ((VALUE *)orig_ep)[VM_ENV_DATA_INDEX_ENV];\n"); // `vm_env_write_slowpath` checks this value fprintf(f, " stack[%d] = _mjit_inlined_%d(ec, reg_cfp, orig_self, original_iseq);\n", b->stack_size - argc - 1, pos); - fprintf(f, " reg_cfp->ep = orig_ep;\n"); fprintf(f, " reg_cfp->self = orig_self;\n"); fprintf(f, " }\n"); } -- cgit v1.2.3