[前][次][番号順一覧][スレッド一覧]

ruby-changes:38620

From: ko1 <ko1@a...>
Date: Mon, 1 Jun 2015 04:23:44 +0900 (JST)
Subject: [ruby-changes:38620] ko1:r50701 (trunk): * vm_core.h (VM_FRAME_MAGIC_DUMMY): introduce new frame type to

ko1	2015-06-01 04:23:32 +0900 (Mon, 01 Jun 2015)

  New Revision: 50701

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=50701

  Log:
    * 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.

  Modified files:
    trunk/ChangeLog
    trunk/vm.c
    trunk/vm_args.c
    trunk/vm_core.h
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 50700)
+++ ChangeLog	(revision 50701)
@@ -1,3 +1,12 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Mon Jun  1 04:22:09 2015  Koichi Sasada  <ko1@a...>
+
+	* 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@a...>
 
 	* class.c (rb_class_has_methods): added to reduce depenedency
Index: vm_core.h
===================================================================
--- vm_core.h	(revision 50700)
+++ vm_core.h	(revision 50701)
@@ -844,6 +844,7 @@ enum vm_svar_index { https://github.com/ruby/ruby/blob/trunk/vm_core.h#L844
 #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))
 
Index: vm.c
===================================================================
--- vm.c	(revision 50700)
+++ vm.c	(revision 50701)
@@ -2232,7 +2232,7 @@ th_init(rb_thread_t *th, VALUE self) https://github.com/ruby/ruby/blob/trunk/vm.c#L2232
 
     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);
Index: vm_args.c
===================================================================
--- vm_args.c	(revision 50700)
+++ vm_args.c	(revision 50701)
@@ -689,7 +689,7 @@ raise_argument_error(rb_thread_t *th, co https://github.com/ruby/ruby/blob/trunk/vm_args.c#L689
     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);

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]