ruby-changes:51314
From: k0kubun <ko1@a...>
Date: Tue, 29 May 2018 11:48:42 +0900 (JST)
Subject: [ruby-changes:51314] k0kubun:r63520 (trunk): mjit_compile.c: drop catch table handling
k0kubun 2018-05-29 11:48:38 +0900 (Tue, 29 May 2018) New Revision: 63520 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=63520 Log: mjit_compile.c: drop catch table handling The loop for `vm_exce_handle_exception` doesn't trigger `mjit_exec`, so I don't think this code is no longer needed. This was needed in development of original version of this JIT, but it seems not needed from the beginning (r62189) at Ruby repository. Modified files: trunk/mjit_compile.c Index: mjit_compile.c =================================================================== --- mjit_compile.c (revision 63519) +++ mjit_compile.c (revision 63520) @@ -214,7 +214,8 @@ mjit_compile(FILE *f, const struct rb_is https://github.com/ruby/ruby/blob/trunk/mjit_compile.c#L214 fprintf(f, " static const VALUE *const original_body_iseq = (VALUE *)0x%"PRIxVALUE";\n", (VALUE)body->iseq_encoded); - /* Simulate `opt_pc` in setup_parameters_complex */ + /* Simulate `opt_pc` in setup_parameters_complex. Other PCs which may be passed by catch tables + are not considered since vm_exec doesn't call mjit_exec for catch tables. */ if (body->param.flags.has_opt) { int i; fprintf(f, "\n"); @@ -227,11 +228,6 @@ mjit_compile(FILE *f, const struct rb_is https://github.com/ruby/ruby/blob/trunk/mjit_compile.c#L228 fprintf(f, " }\n"); } - /* ISeq might be used for catch table too. For that usage, this code cancels JIT execution. */ - fprintf(f, " if (reg_cfp->pc != original_body_iseq) {\n"); - fprintf(f, " return Qundef;\n"); - fprintf(f, " }\n"); - compile_insns(f, body, 0, 0, &status); compile_cancel_handler(f, body, &status); fprintf(f, "\n} /* end of %s */\n", funcname); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/