diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-04-12 03:41:51 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-04-12 03:41:51 +0000 |
commit | 7b4a171158fffbb984378a094e7195072b0a5b05 (patch) | |
tree | 02e1ba5cea0f1ba987e187458ce3edaae3e01c3c /eval.c | |
parent | e72b71d56a1f369cb7eb3892c61715460bac8109 (diff) | |
download | ruby-7b4a171158fffbb984378a094e7195072b0a5b05.tar.gz |
* eval.c (ruby_exec_node, ruby_run_node), ruby.c (process_options):
use iseq instead of NODE.
* gc.c (source_filenames): removed.
* include/ruby/intern.h, parse.y (yycompile, parser_mark, parser_free,
ripper_initialize): rb_source_filename() is no longer used.
* compile.c, compile.h (ERROR_ARGS), parse.y (node_newnode, fixpos,
parser_warn, e_option_supplied, warn_unless_e_option, range_op,
cond0): nd_file is no longer used.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15983 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
-rw-r--r-- | eval.c | 21 |
1 files changed, 9 insertions, 12 deletions
@@ -214,22 +214,19 @@ ruby_cleanup(int ex) } int -ruby_exec_node(void *n, char *file) +ruby_exec_node(void *n, const char *file) { int state; - VALUE val; - NODE *node = n; + VALUE iseq = (VALUE)n; rb_thread_t *th = GET_THREAD(); - if (!node) return 0; + if (!n) return 0; PUSH_TAG(); if ((state = EXEC_TAG()) == 0) { - VALUE iseq = rb_iseq_new(n, rb_str_new2("<main>"), - rb_str_new2(file), Qfalse, ISEQ_TYPE_TOP); SAVE_ROOT_JMPBUF(th, { th->base_block = 0; - val = rb_iseq_eval(iseq); + rb_iseq_eval(iseq); }); } POP_TAG(); @@ -245,17 +242,17 @@ ruby_stop(int ex) int ruby_run_node(void *n) { - NODE *node = (NODE *)n; + VALUE v = (VALUE)n; - switch ((VALUE)n) { + switch (v) { case Qtrue: return EXIT_SUCCESS; case Qfalse: return EXIT_FAILURE; } - if (FIXNUM_P((VALUE)n)) { - return FIX2INT((VALUE)n); + if (FIXNUM_P(v)) { + return FIX2INT(v); } Init_stack((void *)&n); - return ruby_cleanup(ruby_exec_node(node, node->nd_file)); + return ruby_cleanup(ruby_exec_node(n, 0)); } VALUE |