summaryrefslogtreecommitdiff
path: root/iseq.c
diff options
context:
space:
mode:
authorAaron Patterson <tenderlove@ruby-lang.org>2019-05-18 12:23:47 +0300
committerAaron Patterson <tenderlove@ruby-lang.org>2019-05-18 12:24:28 +0300
commit154a67f140a8397df77d82cdc80e13b291b8aedd (patch)
treeb2f637ae3b7310aa1004b92d648a906f7f2c59a0 /iseq.c
parentbbb84a16fab8e715a108c318e9e0e019339eb972 (diff)
Rename rb_gc_new_location to rb_gc_location
The function will return new or existing locations depending on whether or not the object actually moved, so give it a more appropriate name.
Diffstat (limited to 'iseq.c')
-rw-r--r--iseq.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/iseq.c b/iseq.c
index ac5476dabf..f70a100343 100644
--- a/iseq.c
+++ b/iseq.c
@@ -214,7 +214,7 @@ rb_iseq_each_value(const rb_iseq_t *iseq, iseq_value_itr_t * func, void *data)
static VALUE
update_each_insn_value(void *ctx, VALUE obj)
{
- return rb_gc_new_location(obj);
+ return rb_gc_location(obj);
}
void
@@ -223,16 +223,16 @@ rb_iseq_update_references(rb_iseq_t *iseq)
if (iseq->body) {
struct rb_iseq_constant_body *body = iseq->body;
- body->variable.coverage = rb_gc_new_location(body->variable.coverage);
- body->variable.pc2branchindex = rb_gc_new_location(body->variable.pc2branchindex);
- body->location.label = rb_gc_new_location(body->location.label);
- body->location.base_label = rb_gc_new_location(body->location.base_label);
- body->location.pathobj = rb_gc_new_location(body->location.pathobj);
+ body->variable.coverage = rb_gc_location(body->variable.coverage);
+ body->variable.pc2branchindex = rb_gc_location(body->variable.pc2branchindex);
+ body->location.label = rb_gc_location(body->location.label);
+ body->location.base_label = rb_gc_location(body->location.base_label);
+ body->location.pathobj = rb_gc_location(body->location.pathobj);
if (body->local_iseq) {
- body->local_iseq = (struct rb_iseq_struct *)rb_gc_new_location((VALUE)body->local_iseq);
+ body->local_iseq = (struct rb_iseq_struct *)rb_gc_location((VALUE)body->local_iseq);
}
if (body->parent_iseq) {
- body->parent_iseq = (struct rb_iseq_struct *)rb_gc_new_location((VALUE)body->parent_iseq);
+ body->parent_iseq = (struct rb_iseq_struct *)rb_gc_location((VALUE)body->parent_iseq);
}
if (FL_TEST(iseq, ISEQ_MARKABLE_ISEQ)) {
rb_iseq_each_value(iseq, update_each_insn_value, NULL);
@@ -246,7 +246,7 @@ rb_iseq_update_references(rb_iseq_t *iseq)
for (j = 0; i < body->param.keyword->num; i++, j++) {
VALUE obj = body->param.keyword->default_values[j];
if (obj != Qundef) {
- body->param.keyword->default_values[j] = rb_gc_new_location(obj);
+ body->param.keyword->default_values[j] = rb_gc_location(obj);
}
}
}
@@ -258,7 +258,7 @@ rb_iseq_update_references(rb_iseq_t *iseq)
struct iseq_catch_table_entry *entry;
entry = &table->entries[i];
if (entry->iseq) {
- entry->iseq = (rb_iseq_t *)rb_gc_new_location((VALUE)entry->iseq);
+ entry->iseq = (rb_iseq_t *)rb_gc_location((VALUE)entry->iseq);
}
}
}