aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog9
-rw-r--r--vm.c2
-rw-r--r--vm_args.c2
-rw-r--r--vm_core.h1
4 files changed, 12 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 0c4f978e2b..a306579418 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+Mon Jun 1 04:22:09 2015 Koichi Sasada <ko1@atdot.net>
+
+ * vm_core.h (VM_FRAME_MAGIC_DUMMY): introduce new frame type to
+ recognize dummy frame.
+
+ * vm.c (th_init): use new frame type.
+
+ * vm_args.c (raise_argument_error): ditto.
+
Mon Jun 1 04:15:42 2015 Koichi Sasada <ko1@atdot.net>
* class.c (rb_class_has_methods): added to reduce depenedency
diff --git a/vm.c b/vm.c
index e1e5edee3f..fabaf08e16 100644
--- a/vm.c
+++ b/vm.c
@@ -2232,7 +2232,7 @@ th_init(rb_thread_t *th, VALUE self)
th->cfp = (void *)(th->stack + th->stack_size);
- vm_push_frame(th, 0 /* dummy iseq */, VM_FRAME_MAGIC_TOP | VM_FRAME_FLAG_FINISH,
+ vm_push_frame(th, 0 /* dummy iseq */, VM_FRAME_MAGIC_DUMMY | VM_FRAME_FLAG_FINISH,
Qnil /* dummy self */, Qnil /* dummy klass */, VM_ENVVAL_BLOCK_PTR(0),
NULL /* dummy cref */,
0 /* dummy pc */, th->stack, 1, 0, 0);
diff --git a/vm_args.c b/vm_args.c
index 74b631f6c6..66995dcf8a 100644
--- a/vm_args.c
+++ b/vm_args.c
@@ -689,7 +689,7 @@ raise_argument_error(rb_thread_t *th, const rb_iseq_t *iseq, const VALUE exc)
VALUE at;
if (iseq) {
- vm_push_frame(th, iseq, VM_FRAME_MAGIC_METHOD, Qnil /* self */, Qnil /* klass */, Qnil /* specval*/, NULL /* cref */,
+ vm_push_frame(th, iseq, VM_FRAME_MAGIC_DUMMY, Qnil /* self */, Qnil /* klass */, Qnil /* specval*/, NULL /* cref */,
iseq->iseq_encoded, th->cfp->sp, 0 /* local_size */, 0 /* me */, 0 /* stack_max */);
at = rb_vm_backtrace_object();
vm_pop_frame(th);
diff --git a/vm_core.h b/vm_core.h
index 993b65ee8a..b806ce6b6d 100644
--- a/vm_core.h
+++ b/vm_core.h
@@ -844,6 +844,7 @@ enum vm_svar_index {
#define VM_FRAME_MAGIC_EVAL 0x91
#define VM_FRAME_MAGIC_LAMBDA 0xa1
#define VM_FRAME_MAGIC_RESCUE 0xb1
+#define VM_FRAME_MAGIC_DUMMY 0xc1
#define VM_FRAME_MAGIC_MASK_BITS 8
#define VM_FRAME_MAGIC_MASK (~(~(VALUE)0<<VM_FRAME_MAGIC_MASK_BITS))