mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
258131446c
commit
ac6990c75f
4 changed files with 12 additions and 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
|
||||
|
|
2
vm.c
2
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);
|
||||
|
|
|
@ -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))
|
||||
|
||||
|
|
Loading…
Reference in a new issue