summaryrefslogtreecommitdiff
path: root/iseq.c
diff options
context:
space:
mode:
authorAaron Patterson <tenderlove@ruby-lang.org>2019-08-12 16:09:21 -0400
committerAaron Patterson <tenderlove@ruby-lang.org>2019-08-12 16:44:54 -0400
commitaac4d9d6c7e6b6b0742f3941b574f6006ccb5672 (patch)
treeb1f2906b04075227249ee040111e94a846b99ab2 /iseq.c
parent404850e13446c79fb6142f1b32b219753e5cd726 (diff)
Rename rb_gc_mark_no_pin -> rb_gc_mark_movable
Renaming this function. "No pin" leaks some implementation details. We just want users to know that if they mark this object, the reference may move and they'll need to update the reference accordingly.
Diffstat (limited to 'iseq.c')
-rw-r--r--iseq.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/iseq.c b/iseq.c
index bbf35c4884..7f1e2203cb 100644
--- a/iseq.c
+++ b/iseq.c
@@ -271,7 +271,7 @@ rb_iseq_update_references(rb_iseq_t *iseq)
static VALUE
each_insn_value(void *ctx, VALUE obj)
{
- rb_gc_mark_no_pin(obj);
+ rb_gc_mark_movable(obj);
return obj;
}
@@ -289,11 +289,11 @@ rb_iseq_mark(const rb_iseq_t *iseq)
rb_iseq_each_value(iseq, each_insn_value, NULL);
}
- rb_gc_mark_no_pin(body->variable.coverage);
- rb_gc_mark_no_pin(body->variable.pc2branchindex);
- rb_gc_mark_no_pin(body->location.label);
- rb_gc_mark_no_pin(body->location.base_label);
- rb_gc_mark_no_pin(body->location.pathobj);
+ rb_gc_mark_movable(body->variable.coverage);
+ rb_gc_mark_movable(body->variable.pc2branchindex);
+ 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);
if (body->param.flags.has_kw && ISEQ_COMPILE_DATA(iseq) == NULL) {
@@ -305,7 +305,7 @@ rb_iseq_mark(const rb_iseq_t *iseq)
for (j = 0; i < keyword->num; i++, j++) {
VALUE obj = keyword->default_values[j];
if (!SPECIAL_CONST_P(obj)) {
- rb_gc_mark_no_pin(obj);
+ rb_gc_mark_movable(obj);
}
}
}
@@ -317,7 +317,7 @@ rb_iseq_mark(const rb_iseq_t *iseq)
const struct iseq_catch_table_entry *entry;
entry = UNALIGNED_MEMBER_PTR(table, entries[i]);
if (entry->iseq) {
- rb_gc_mark_no_pin((VALUE)entry->iseq);
+ rb_gc_mark_movable((VALUE)entry->iseq);
}
}
}