summaryrefslogtreecommitdiff
path: root/vm.c
diff options
context:
space:
mode:
authormame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-05 08:59:22 +0000
committermame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-05 08:59:22 +0000
commit92b81dc5972607f745d26b8a7a83166ff0fa354b (patch)
tree91b9bc9bdf4657afdc2e9aa71994952b37ef1678 /vm.c
parent503b858cefcc945405185c3c70dd07a60f920469 (diff)
make rb_iseq_new* accept rb_ast_body_t instead of NODE*
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61609 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm.c')
-rw-r--r--vm.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/vm.c b/vm.c
index 640d02fc4f..96b7a07590 100644
--- a/vm.c
+++ b/vm.c
@@ -937,7 +937,8 @@ rb_binding_add_dynavars(VALUE bindval, rb_binding_t *bind, int dyncount, const I
const rb_env_t *env;
rb_execution_context_t *ec = GET_EC();
const rb_iseq_t *base_iseq, *iseq;
- NODE *node = 0, tmp_node;
+ rb_ast_body_t ast;
+ NODE tmp_node;
ID minibuf[4], *dyns = minibuf;
VALUE idtmp = 0;
@@ -950,17 +951,18 @@ rb_binding_add_dynavars(VALUE bindval, rb_binding_t *bind, int dyncount, const I
dyns[0] = dyncount;
MEMCPY(dyns + 1, dynvars, ID, dyncount);
- node = &tmp_node;
- rb_node_init(node, NODE_SCOPE, (VALUE)dyns, 0, 0);
+ rb_node_init(&tmp_node, NODE_SCOPE, (VALUE)dyns, 0, 0);
+ ast.root = &tmp_node;
+ ast.reserved = 0;
if (base_iseq) {
- iseq = rb_iseq_new(node, base_iseq->body->location.label, path, realpath, base_iseq, ISEQ_TYPE_EVAL);
+ iseq = rb_iseq_new(&ast, base_iseq->body->location.label, path, realpath, base_iseq, ISEQ_TYPE_EVAL);
}
else {
VALUE tempstr = rb_fstring_cstr("<temp>");
- iseq = rb_iseq_new_top(node, tempstr, tempstr, tempstr, NULL);
+ iseq = rb_iseq_new_top(&ast, tempstr, tempstr, tempstr, NULL);
}
- node->nd_tbl = 0; /* reset table */
+ tmp_node.nd_tbl = 0; /* reset table */
ALLOCV_END(idtmp);
vm_set_eval_stack(ec, iseq, 0, base_block);