diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-12-20 08:07:47 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-12-20 08:07:47 +0000 |
commit | c702005a7bbb807cab666537b5ef1877c14c40ba (patch) | |
tree | fe291003d37a71b882b91bceaad7ff3d432cd6d7 /iseq.c | |
parent | b766cc4e70f18ab1b3be5aef35d2af8817d23714 (diff) | |
download | ruby-c702005a7bbb807cab666537b5ef1877c14c40ba.tar.gz |
* include/ruby/ruby.h: rename OBJ_WRITE and OBJ_WRITTEN into
RB_OBJ_WRITE and RB_OBJ_WRITTEN.
* array.c, class.c, compile.c, hash.c, internal.h, iseq.c,
proc.c, process.c, re.c, string.c, variable.c, vm.c,
vm_eval.c, vm_insnhelper.c, vm_insnhelper.h,
vm_method.c: catch up this change.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44299 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'iseq.c')
-rw-r--r-- | iseq.c | 50 |
1 files changed, 25 insertions, 25 deletions
@@ -183,20 +183,20 @@ static rb_iseq_location_t * iseq_location_setup(rb_iseq_t *iseq, VALUE path, VALUE absolute_path, VALUE name, size_t first_lineno) { rb_iseq_location_t *loc = &iseq->location; - OBJ_WRITE(iseq->self, &loc->path, path); + RB_OBJ_WRITE(iseq->self, &loc->path, path); if (RTEST(absolute_path) && rb_str_cmp(path, absolute_path) == 0) { - OBJ_WRITE(iseq->self, &loc->absolute_path, path); + RB_OBJ_WRITE(iseq->self, &loc->absolute_path, path); } else { - OBJ_WRITE(iseq->self, &loc->absolute_path, absolute_path); + RB_OBJ_WRITE(iseq->self, &loc->absolute_path, absolute_path); } - OBJ_WRITE(iseq->self, &loc->label, name); - OBJ_WRITE(iseq->self, &loc->base_label, name); + RB_OBJ_WRITE(iseq->self, &loc->label, name); + RB_OBJ_WRITE(iseq->self, &loc->base_label, name); loc->first_lineno = first_lineno; return loc; } -#define ISEQ_SET_CREF(iseq, cref) OBJ_WRITE((iseq)->self, &(iseq)->cref_stack, (cref)) +#define ISEQ_SET_CREF(iseq, cref) RB_OBJ_WRITE((iseq)->self, &(iseq)->cref_stack, (cref)) static void set_relation(rb_iseq_t *iseq, const VALUE parent) @@ -208,14 +208,14 @@ set_relation(rb_iseq_t *iseq, const VALUE parent) /* set class nest stack */ if (type == ISEQ_TYPE_TOP) { /* toplevel is private */ - OBJ_WRITE(iseq->self, &iseq->cref_stack, NEW_CREF(rb_cObject)); + RB_OBJ_WRITE(iseq->self, &iseq->cref_stack, NEW_CREF(rb_cObject)); iseq->cref_stack->nd_refinements = Qnil; iseq->cref_stack->nd_visi = NOEX_PRIVATE; if (th->top_wrapper) { NODE *cref = NEW_CREF(th->top_wrapper); cref->nd_refinements = Qnil; cref->nd_visi = NOEX_PRIVATE; - OBJ_WRITE(cref, &cref->nd_next, iseq->cref_stack); + RB_OBJ_WRITE(cref, &cref->nd_next, iseq->cref_stack); ISEQ_SET_CREF(iseq, cref); } iseq->local_iseq = iseq; @@ -245,7 +245,7 @@ void rb_iseq_add_mark_object(rb_iseq_t *iseq, VALUE obj) { if (!RTEST(iseq->mark_ary)) { - OBJ_WRITE(iseq->self, &iseq->mark_ary, rb_ary_tmp_new(3)); + RB_OBJ_WRITE(iseq->self, &iseq->mark_ary, rb_ary_tmp_new(3)); RBASIC_CLEAR_CLASS(iseq->mark_ary); } rb_ary_push(iseq->mark_ary, obj); @@ -261,7 +261,7 @@ prepare_iseq_build(rb_iseq_t *iseq, iseq->arg_rest = -1; iseq->arg_block = -1; iseq->arg_keyword = -1; - OBJ_WRITE(iseq->self, &iseq->klass, 0); + RB_OBJ_WRITE(iseq->self, &iseq->klass, 0); set_relation(iseq, parent); name = rb_fstring(name); @@ -271,11 +271,11 @@ prepare_iseq_build(rb_iseq_t *iseq, iseq_location_setup(iseq, path, absolute_path, name, first_lineno); if (iseq != iseq->local_iseq) { - OBJ_WRITE(iseq->self, &iseq->location.base_label, iseq->local_iseq->location.label); + RB_OBJ_WRITE(iseq->self, &iseq->location.base_label, iseq->local_iseq->location.label); } iseq->defined_method_id = 0; - OBJ_WRITE(iseq->self, &iseq->mark_ary, 0); + RB_OBJ_WRITE(iseq->self, &iseq->mark_ary, 0); /* * iseq->special_block_builder = GC_GUARDED_PTR_REF(block_opt); @@ -285,15 +285,15 @@ prepare_iseq_build(rb_iseq_t *iseq, iseq->compile_data = ALLOC(struct iseq_compile_data); MEMZERO(iseq->compile_data, struct iseq_compile_data, 1); - OBJ_WRITE(iseq->self, &iseq->compile_data->err_info, Qnil); - OBJ_WRITE(iseq->self, &iseq->compile_data->mark_ary, rb_ary_tmp_new(3)); + RB_OBJ_WRITE(iseq->self, &iseq->compile_data->err_info, Qnil); + RB_OBJ_WRITE(iseq->self, &iseq->compile_data->mark_ary, rb_ary_tmp_new(3)); iseq->compile_data->storage_head = iseq->compile_data->storage_current = (struct iseq_compile_data_storage *) ALLOC_N(char, INITIAL_ISEQ_COMPILE_DATA_STORAGE_BUFF_SIZE + sizeof(struct iseq_compile_data_storage)); - OBJ_WRITE(iseq->self, &iseq->compile_data->catch_table_ary, rb_ary_new()); + RB_OBJ_WRITE(iseq->self, &iseq->compile_data->catch_table_ary, rb_ary_new()); iseq->compile_data->storage_head->pos = 0; iseq->compile_data->storage_head->next = 0; iseq->compile_data->storage_head->size = @@ -303,12 +303,12 @@ prepare_iseq_build(rb_iseq_t *iseq, iseq->compile_data->option = option; iseq->compile_data->last_coverable_line = -1; - OBJ_WRITE(iseq->self, &iseq->coverage, Qfalse); + RB_OBJ_WRITE(iseq->self, &iseq->coverage, Qfalse); if (!GET_THREAD()->parse_in_eval) { VALUE coverages = rb_get_coverages(); if (RTEST(coverages)) { - OBJ_WRITE(iseq->self, &iseq->coverage, rb_hash_lookup(coverages, path)); - if (NIL_P(iseq->coverage)) OBJ_WRITE(iseq->self, &iseq->coverage, Qfalse); + RB_OBJ_WRITE(iseq->self, &iseq->coverage, rb_hash_lookup(coverages, path)); + if (NIL_P(iseq->coverage)) RB_OBJ_WRITE(iseq->self, &iseq->coverage, Qfalse); } } @@ -1923,19 +1923,19 @@ rb_iseq_clone(VALUE iseqval, VALUE newcbase) iseq1->self = newiseq; if (!iseq1->orig) { - OBJ_WRITE(iseq1->self, &iseq1->orig, iseqval); + RB_OBJ_WRITE(iseq1->self, &iseq1->orig, iseqval); } if (iseq0->local_iseq == iseq0) { iseq1->local_iseq = iseq1; } if (newcbase) { ISEQ_SET_CREF(iseq1, NEW_CREF(newcbase)); - OBJ_WRITE(iseq1->cref_stack, &iseq1->cref_stack->nd_refinements, iseq0->cref_stack->nd_refinements); + RB_OBJ_WRITE(iseq1->cref_stack, &iseq1->cref_stack->nd_refinements, iseq0->cref_stack->nd_refinements); iseq1->cref_stack->nd_visi = iseq0->cref_stack->nd_visi; if (iseq0->cref_stack->nd_next) { - OBJ_WRITE(iseq1->cref_stack, &iseq1->cref_stack->nd_next, iseq0->cref_stack->nd_next); + RB_OBJ_WRITE(iseq1->cref_stack, &iseq1->cref_stack->nd_next, iseq0->cref_stack->nd_next); } - OBJ_WRITE(iseq1, &iseq1->klass, newcbase); + RB_OBJ_WRITE(iseq1, &iseq1->klass, newcbase); } return newiseq; @@ -2087,10 +2087,10 @@ rb_iseq_build_for_ruby2cext( /* copy iseq */ MEMCPY(iseq, iseq_template, rb_iseq_t, 1); /* TODO: write barrier, *iseq = *iseq_template; */ - OBJ_WRITE(iseq->self, &iseq->location.label, rb_str_new2(name)); - OBJ_WRITE(iseq->self, &iseq->location.path, rb_str_new2(path)); + RB_OBJ_WRITE(iseq->self, &iseq->location.label, rb_str_new2(name)); + RB_OBJ_WRITE(iseq->self, &iseq->location.path, rb_str_new2(path)); iseq->location.first_lineno = first_lineno; - OBJ_WRITE(iseq->self, &iseq->mark_ary, 0); + RB_OBJ_WRITE(iseq->self, &iseq->mark_ary, 0); iseq->self = iseqval; iseq->iseq = ALLOC_N(VALUE, iseq->iseq_size); |