From 503b858cefcc945405185c3c70dd07a60f920469 Mon Sep 17 00:00:00 2001 From: mame Date: Fri, 5 Jan 2018 08:59:20 +0000 Subject: 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 --- iseq.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'iseq.c') diff --git a/iseq.c b/iseq.c index d985b57239..ee78a918f1 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(""); - 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("
"), + ret = iseqw_new(rb_iseq_new_with_opt(ast->body.root, rb_fstring_cstr("
"), file, rb_realpath_internal(Qnil, file, 1), line, NULL, ISEQ_TYPE_TOP, &option)); -- cgit v1.2.3