summaryrefslogtreecommitdiff
path: root/iseq.c
diff options
context:
space:
mode:
authormame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-05 08:59:20 (GMT)
committermame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-05 08:59:20 (GMT)
commit503b858cefcc945405185c3c70dd07a60f920469 (patch)
tree10996cd780b341156b2fb3526e77f682f6581f0d /iseq.c
parenta6794c4b01ceb96d3d36f8854309e2e3b878f7e3 (diff)
node.h: define rb_ast_body_t and restructure rb_ast_t
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61608 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'iseq.c')
-rw-r--r--iseq.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/iseq.c b/iseq.c
index d985b57..ee78a91 100644
--- a/iseq.c
+++ b/iseq.c
@@ -708,7 +708,7 @@ rb_iseq_compile_with_option(VALUE src, VALUE file, VALUE realpath, VALUE line, c
ast = (*parse)(parser, file, src, ln);
}
- if (!ast->root) {
+ if (!ast->body.root) {
rb_ast_dispose(ast);
rb_exc_raise(GET_EC()->errinfo);
}
@@ -716,7 +716,7 @@ rb_iseq_compile_with_option(VALUE src, VALUE file, VALUE realpath, VALUE line, c
INITIALIZED VALUE label = parent ?
parent->body->location.label :
rb_fstring_cstr("<compiled>");
- iseq = rb_iseq_new_with_opt(ast->root, label, file, realpath, line,
+ iseq = rb_iseq_new_with_opt(ast->body.root, label, file, realpath, line,
parent, type, &option);
rb_ast_dispose(ast);
}
@@ -927,17 +927,17 @@ iseqw_s_compile_file(int argc, VALUE *argv, VALUE self)
parser = rb_parser_new();
rb_parser_set_context(parser, NULL, FALSE);
ast = rb_parser_compile_file_path(parser, file, f, NUM2INT(line));
- if (!ast->root) exc = GET_EC()->errinfo;
+ if (!ast->body.root) exc = GET_EC()->errinfo;
rb_io_close(f);
- if (!ast->root) {
+ if (!ast->body.root) {
rb_ast_dispose(ast);
rb_exc_raise(exc);
}
make_compile_option(&option, opt);
- ret = iseqw_new(rb_iseq_new_with_opt(ast->root, rb_fstring_cstr("<main>"),
+ ret = iseqw_new(rb_iseq_new_with_opt(ast->body.root, rb_fstring_cstr("<main>"),
file,
rb_realpath_internal(Qnil, file, 1),
line, NULL, ISEQ_TYPE_TOP, &option));