summaryrefslogtreecommitdiff
path: root/load.c
diff options
context:
space:
mode:
authormame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-10-27 16:02:34 (GMT)
committermame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-10-27 16:02:34 (GMT)
commit5a176b75b1187cbd3861c387bde65ff66396a07c (patch)
treec92ea58175ec5f1d4efad17cebe45f334f8c2ba2 /load.c
parent620ba74778bfdbdc34ffbb142d49ce84a0ef58e9 (diff)
Revert "Manage AST NODEs out of GC"
This reverts commit 620ba74778bfdbdc34ffbb142d49ce84a0ef58e9. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60486 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'load.c')
-rw-r--r--load.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/load.c b/load.c
index 8b12c4d..db09c33 100644
--- a/load.c
+++ b/load.c
@@ -602,7 +602,7 @@ rb_load_internal0(rb_thread_t *th, VALUE fname, int wrap)
EC_PUSH_TAG(th->ec);
state = EXEC_TAG();
if (state == TAG_NONE) {
- ast_t *ast;
+ NODE *node;
const rb_iseq_t *iseq;
if ((iseq = rb_iseq_load_iseq(fname)) != NULL) {
@@ -611,10 +611,9 @@ rb_load_internal0(rb_thread_t *th, VALUE fname, int wrap)
else {
VALUE parser = rb_parser_new();
rb_parser_set_context(parser, NULL, FALSE);
- ast = (ast_t *)rb_parser_load_file(parser, fname);
- iseq = rb_iseq_new_top(ast->root, rb_fstring_cstr("<top (required)>"),
+ node = (NODE *)rb_parser_load_file(parser, fname);
+ iseq = rb_iseq_new_top(node, rb_fstring_cstr("<top (required)>"),
fname, rb_realpath_internal(Qnil, fname, 1), NULL);
- rb_ast_dispose(ast);
}
rb_iseq_eval(iseq);
}