зеркало из https://github.com/github/ruby.git
Fix a critical mistake around GC
This commit is contained in:
Родитель
25ae82b83e
Коммит
43f579afb4
22
mjit.c
22
mjit.c
|
@ -348,13 +348,6 @@ mjit_child_after_fork(void)
|
|||
// TODO: remove this
|
||||
}
|
||||
|
||||
// Called by rb_vm_mark()
|
||||
void
|
||||
mjit_mark(void)
|
||||
{
|
||||
// TODO: implement
|
||||
}
|
||||
|
||||
void
|
||||
mjit_mark_cc_entries(const struct rb_iseq_constant_body *const body)
|
||||
{
|
||||
|
@ -392,6 +385,21 @@ rb_mjit_compile(const rb_iseq_t *iseq)
|
|||
RB_VM_LOCK_LEAVE();
|
||||
}
|
||||
|
||||
// Called by rb_vm_mark()
|
||||
void
|
||||
mjit_mark(void)
|
||||
{
|
||||
if (!mjit_enabled)
|
||||
return;
|
||||
RUBY_MARK_ENTER("mjit");
|
||||
|
||||
// Mark objects used by the MJIT compiler
|
||||
rb_gc_mark(rb_MJITCompiler);
|
||||
rb_gc_mark(rb_cMJITIseqPtr);
|
||||
|
||||
RUBY_MARK_LEAVE("mjit");
|
||||
}
|
||||
|
||||
void
|
||||
mjit_init(const struct mjit_options *opts)
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче