mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Rename RUBY_MARK_NO_PIN_UNLESS_NULL to RUBY_MARK_MOVABLE_UNLESS_NULL
This commit is contained in:
parent
c90fc55a1f
commit
461db352c2
Notes:
git
2020-01-22 20:11:36 +09:00
3 changed files with 7 additions and 7 deletions
2
gc.h
2
gc.h
|
@ -59,7 +59,7 @@ rb_gc_debug_body(const char *mode, const char *msg, int st, void *ptr)
|
|||
#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)
|
||||
|
|
2
iseq.c
2
iseq.c
|
@ -314,7 +314,7 @@ rb_iseq_mark(const rb_iseq_t *iseq)
|
|||
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;
|
||||
|
|
10
proc.c
10
proc.c
|
@ -66,18 +66,18 @@ block_mark(const struct rb_block *block)
|
|||
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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue