aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-03-28 21:40:55 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-03-28 21:40:55 +0000
commit7504be10efbc6002cdfe205c05a7f2690c368296 (patch)
tree30460b0247350697e3e80016db31fc5491c04547
parent4e4880b390f29f05a4113ca61dff0a9f3ba1ff8f (diff)
downloadruby-7504be10efbc6002cdfe205c05a7f2690c368296.tar.gz
remove rb_thread_t::base_block
* error.c (rb_compile_err_append): rb_thread_t::base_block is no longer used. * iseq.c (rb_iseq_compile_with_option): ditto, no protection is needed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54345 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog8
-rw-r--r--error.c8
-rw-r--r--eval.c1
-rw-r--r--iseq.c16
-rw-r--r--vm_core.h2
5 files changed, 10 insertions, 25 deletions
diff --git a/ChangeLog b/ChangeLog
index 3a53a61b97..9aff658a77 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+Tue Mar 29 06:40:53 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * error.c (rb_compile_err_append): rb_thread_t::base_block is no
+ longer used.
+
+ * iseq.c (rb_iseq_compile_with_option): ditto, no protection is
+ needed.
+
Tue Mar 29 06:39:22 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
* parse.y (struct parser_params): move parse_in_eval flag from
diff --git a/error.c b/error.c
index 6bd45bd021..d841650c92 100644
--- a/error.c
+++ b/error.c
@@ -97,12 +97,6 @@ compile_snprintf(rb_encoding *enc, const char *pre, const char *file, int line,
VALUE
rb_compile_err_append(VALUE buffer, VALUE mesg)
{
- rb_thread_t *th = GET_THREAD();
- rb_block_t *prev_base_block = th->base_block;
- th->base_block = 0;
- /* base_block should be zero while normal Ruby execution */
- /* after this line, any Ruby code *can* run */
-
if (!buffer) {
rb_str_cat2(mesg, "\n");
rb_write_error_str(mesg);
@@ -115,8 +109,6 @@ rb_compile_err_append(VALUE buffer, VALUE mesg)
rb_str_append(buffer, mesg);
}
- /* returned to the parser world */
- th->base_block = prev_base_block;
return buffer;
}
diff --git a/eval.c b/eval.c
index 67a5d0e53b..47cfd6107c 100644
--- a/eval.c
+++ b/eval.c
@@ -243,7 +243,6 @@ ruby_exec_internal(void *n)
TH_PUSH_TAG(th);
if ((state = EXEC_TAG()) == 0) {
SAVE_ROOT_JMPBUF(th, {
- th->base_block = 0;
rb_iseq_eval_main(iseq);
});
}
diff --git a/iseq.c b/iseq.c
index 5d3bb5488f..184e56d08d 100644
--- a/iseq.c
+++ b/iseq.c
@@ -638,23 +638,11 @@ rb_iseq_compile_with_option(VALUE src, VALUE file, VALUE absolute_path, VALUE li
rb_exc_raise(th->errinfo);
}
else {
- int state;
INITIALIZED VALUE label = parent ?
parent->body->location.label :
rb_fstring_cstr("<compiled>");
- rb_block_t **volatile const base_block_ptr = &th->base_block;
- rb_block_t *volatile const prev_base_block = th->base_block;
-
- th->base_block = base_block;
- TH_PUSH_TAG(th);
- if ((state = EXEC_TAG()) == 0) {
- iseq = rb_iseq_new_with_opt(node, label, file, absolute_path, line,
- parent, type, &option);
- }
- TH_POP_TAG();
- *base_block_ptr = prev_base_block;
-
- if (state) JUMP_TAG(state);
+ iseq = rb_iseq_new_with_opt(node, label, file, absolute_path, line,
+ parent, type, &option);
}
return iseq;
diff --git a/vm_core.h b/vm_core.h
index 19b7ee5beb..bf9ea1464e 100644
--- a/vm_core.h
+++ b/vm_core.h
@@ -698,8 +698,6 @@ typedef struct rb_thread_struct {
VALUE top_wrapper;
/* eval env */
- rb_block_t *base_block;
-
VALUE *root_lep;
VALUE root_svar;