1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Adjust pch_status for --mjit=pause

to let mjit_add_iseq_to_process work
This commit is contained in:
Takashi Kokubun 2022-09-06 18:46:49 -07:00
parent f0661bf3a0
commit 496bdf01e2
No known key found for this signature in database
GPG key ID: 6FFC433B12EE23DD

3
mjit.c
View file

@ -1961,6 +1961,7 @@ mjit_resume(void)
if (rb_respond_to(rb_mMJITCompiler, rb_intern("compile"))) { if (rb_respond_to(rb_mMJITCompiler, rb_intern("compile"))) {
// [experimental] defining RubyVM::MJIT.compile allows you to replace JIT // [experimental] defining RubyVM::MJIT.compile allows you to replace JIT
mjit_opts.custom = true; mjit_opts.custom = true;
pch_status = PCH_SUCCESS;
} }
else { else {
// Lazy MJIT boot // Lazy MJIT boot
@ -2041,7 +2042,7 @@ mjit_finish(bool close_handle_p)
mjit_dump_total_calls(); mjit_dump_total_calls();
#endif #endif
if (!mjit_opts.save_temps && getpid() == pch_owner_pid && pch_status != PCH_NOT_READY) if (!mjit_opts.save_temps && getpid() == pch_owner_pid && pch_status == PCH_SUCCESS && !mjit_opts.custom)
remove_file(pch_file); remove_file(pch_file);
xfree(header_file); header_file = NULL; xfree(header_file); header_file = NULL;