diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-05-31 19:23:32 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-05-31 19:23:32 +0000 |
commit | ac6990c75f6850a845c4c7d09d96ebc5e17cea0a (patch) | |
tree | f4c1801bc21f3de9d1af796ec1e77061948851dc | |
parent | 258131446c394684678736507723ab404c892301 (diff) |
* 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.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50701 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | vm.c | 2 | ||||
-rw-r--r-- | vm_args.c | 2 | ||||
-rw-r--r-- | vm_core.h | 1 |
4 files changed, 12 insertions, 2 deletions
@@ -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 @@ -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); @@ -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); @@ -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)) |