From d7935475fc46adc50def2f89bfe3a5b99d7707ac Mon Sep 17 00:00:00 2001 From: nobu Date: Mon, 28 Mar 2016 21:39:24 +0000 Subject: remove rb_thread_t::parse_in_eval * parse.y (struct parser_params): move parse_in_eval flag from rb_thread_t. * parse.y (rb_parser_set_context): set parsing context, not only mild error flag. * iseq.c (rb_iseq_compile_with_option): the parser now refers no thread local states to be restored. * vm_eval.c (eval_string_with_cref): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54343 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- vm_core.h | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'vm_core.h') diff --git a/vm_core.h b/vm_core.h index 92277f17db..19b7ee5beb 100644 --- a/vm_core.h +++ b/vm_core.h @@ -742,14 +742,6 @@ typedef struct rb_thread_struct { struct rb_vm_tag *tag; struct rb_vm_protect_tag *protect_tag; - /*! Thread-local state of evaluation context. - * - * If negative, this thread is evaluating the main program. - * If positive, this thread is evaluating a program under Kernel::eval - * family. - */ - int parse_in_eval; - /* storage */ st_table *local_storage; VALUE local_storage_recursive_hash; @@ -820,7 +812,7 @@ RUBY_SYMBOL_EXPORT_BEGIN /* node -> iseq */ rb_iseq_t *rb_iseq_new(NODE*, VALUE, VALUE, VALUE, const rb_iseq_t *parent, enum iseq_type); rb_iseq_t *rb_iseq_new_top(NODE *node, VALUE name, VALUE path, VALUE absolute_path, const rb_iseq_t *parent); -rb_iseq_t *rb_iseq_new_main(NODE *node, VALUE path, VALUE absolute_path); +rb_iseq_t *rb_iseq_new_main(NODE *node, VALUE path, VALUE absolute_path, const rb_iseq_t *parent); rb_iseq_t *rb_iseq_new_with_bopt(NODE*, VALUE, VALUE, VALUE, VALUE, VALUE, enum iseq_type, VALUE); rb_iseq_t *rb_iseq_new_with_opt(NODE*, VALUE, VALUE, VALUE, VALUE, const rb_iseq_t *parent, enum iseq_type, const rb_compile_option_t*); -- cgit v1.2.3