Misc #16346 ยป p.patch
gc.h | ||
---|---|---|
#define RUBY_GC_INFO if(0)printf
|
||
#endif
|
||
#define RUBY_MARK_NO_PIN_UNLESS_NULL(ptr) do { \
|
||
#define RUBY_MARK_MOVABLE_UNLESS_NULL(ptr) do { \
|
||
VALUE markobj = (ptr); \
|
||
if (RTEST(markobj)) {rb_gc_mark_movable(markobj);} \
|
||
} while (0)
|
iseq.c | ||
---|---|---|
rb_gc_mark_movable(body->location.label);
|
||
rb_gc_mark_movable(body->location.base_label);
|
||
rb_gc_mark_movable(body->location.pathobj);
|
||
RUBY_MARK_NO_PIN_UNLESS_NULL((VALUE)body->parent_iseq);
|
||
RUBY_MARK_MOVABLE_UNLESS_NULL((VALUE)body->parent_iseq);
|
||
if (body->param.flags.has_kw && ISEQ_COMPILE_DATA(iseq) == NULL) {
|
||
const struct rb_iseq_param_keyword *const keyword = body->param.keyword;
|
proc.c | ||
---|---|---|
case block_type_ifunc:
|
||
{
|
||
const struct rb_captured_block *captured = &block->as.captured;
|
||
RUBY_MARK_NO_PIN_UNLESS_NULL(captured->self);
|
||
RUBY_MARK_NO_PIN_UNLESS_NULL((VALUE)captured->code.val);
|
||
RUBY_MARK_MOVABLE_UNLESS_NULL(captured->self);
|
||
RUBY_MARK_MOVABLE_UNLESS_NULL((VALUE)captured->code.val);
|
||
if (captured->ep && captured->ep[VM_ENV_DATA_INDEX_ENV] != Qundef /* cfunc_proc_t */) {
|
||
RUBY_MARK_NO_PIN_UNLESS_NULL(VM_ENV_ENVVAL(captured->ep));
|
||
RUBY_MARK_MOVABLE_UNLESS_NULL(VM_ENV_ENVVAL(captured->ep));
|
||
}
|
||
}
|
||
break;
|
||
case block_type_symbol:
|
||
RUBY_MARK_NO_PIN_UNLESS_NULL(block->as.symbol);
|
||
RUBY_MARK_MOVABLE_UNLESS_NULL(block->as.symbol);
|
||
break;
|
||
case block_type_proc:
|
||
RUBY_MARK_NO_PIN_UNLESS_NULL(block->as.proc);
|
||
RUBY_MARK_MOVABLE_UNLESS_NULL(block->as.proc);
|
||
break;
|
||
}
|
||
}
|