summaryrefslogtreecommitdiff
path: root/eval_intern.h
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-10 21:46:43 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-10 21:46:43 +0000
commit9e324fdd3ef0b858f6c5dfea1d0055d77979a3a2 (patch)
tree7c83dc40c7b9a926cf9efc8f0abef1cd7267b3d4 /eval_intern.h
parente6697a6405f1330ef071220396b8afef1cd1079a (diff)
* vm.c, eval_intern.h (PASS_PASSED_BLOCK):
set a VM_FRAME_FLAG_PASSED flag to skip this frame when searching ruby-level-cfp. * eval.c, eval_intern.h, proc.c: fix to check cfp. if there is no valid ruby-level-cfp, cause RuntimeError exception. [ruby-dev:34128] * vm_core.h, vm_evalbody.c, vm.c, vm_dump.c, vm_insnhelper.c, insns.def: rename FRAME_MAGIC_* to VM_FRAME_MAGIC_*. * KNOWNBUGS.rb, bootstraptest/test*.rb: move solved bugs. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17084 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval_intern.h')
-rw-r--r--eval_intern.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/eval_intern.h b/eval_intern.h
index a8727d230c..7bc42f8de3 100644
--- a/eval_intern.h
+++ b/eval_intern.h
@@ -2,9 +2,15 @@
#ifndef RUBY_EVAL_INTERN_H
#define RUBY_EVAL_INTERN_H
-#define PASS_PASSED_BLOCK() \
- (GET_THREAD()->passed_block = \
- GC_GUARDED_PTR_REF((rb_block_t *)GET_THREAD()->cfp->lfp[0]))
+#define PASS_PASSED_BLOCK_TH(th) do { \
+ (th)->passed_block = GC_GUARDED_PTR_REF((rb_block_t *)(th)->cfp->lfp[0]); \
+ (th)->cfp->flag |= VM_FRAME_FLAG_PASSED; \
+} while (0)
+
+#define PASS_PASSED_BLOCK() do { \
+ rb_thread_t * const __th__ = GET_THREAD(); \
+ PASS_PASSED_BLOCK_TH(__th__); \
+} while (0)
#include "ruby/ruby.h"
#include "ruby/node.h"
@@ -219,7 +225,7 @@ NORETURN(void vm_jump_tag_but_local_jump(int, VALUE));
VALUE vm_make_jump_tag_but_local_jump(int state, VALUE val);
NODE *vm_cref(void);
-rb_control_frame_t *vm_get_ruby_level_cfp(rb_thread_t *th, rb_control_frame_t *cfp);
+rb_control_frame_t *vm_get_ruby_level_caller_cfp(rb_thread_t *th, rb_control_frame_t *cfp);
VALUE rb_obj_is_proc(VALUE);
VALUE rb_vm_call_cfunc(VALUE recv, VALUE (*func)(VALUE), VALUE arg, const rb_block_t *blockptr, VALUE filename);
void rb_thread_terminate_all(void);