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

ruby-changes:14567

From: mame <ko1@a...>
Date: Mon, 25 Jan 2010 22:25:08 +0900 (JST)
Subject: [ruby-changes:14567] Ruby:r26407 (trunk): * cont.c (rb_cont_call, cont_restore_1): remove trap_tag check because

mame	2010-01-25 22:22:16 +0900 (Mon, 25 Jan 2010)

  New Revision: 26407

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

  Log:
    * cont.c (rb_cont_call, cont_restore_1): remove trap_tag check because
      it seems not to make sense.  [ruby-dev:40121]
    
    * vm_core.h, eval.c (rb_protect): ditto.

  Modified files:
    trunk/ChangeLog
    trunk/cont.c
    trunk/eval.c
    trunk/vm_core.h

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 26406)
+++ ChangeLog	(revision 26407)
@@ -1,3 +1,10 @@
+Mon Jan 25 22:08:20 2010  Yusuke Endoh  <mame@t...>
+
+	* cont.c (rb_cont_call, cont_restore_1): remove trap_tag check because
+	  it seems not to make sense.  [ruby-dev:40121]
+
+	* vm_core.h, eval.c (rb_protect): ditto.
+
 Mon Jan 25 21:43:05 2010  Yusuke Endoh  <mame@t...>
 
 	* test/ruby/envutil.rb: fix the check if instance method `ruby' is
Index: vm_core.h
===================================================================
--- vm_core.h	(revision 26406)
+++ vm_core.h	(revision 26407)
@@ -347,10 +347,6 @@
     struct rb_vm_tag *prev;
 };
 
-struct rb_vm_trap_tag {
-    struct rb_vm_trap_tag *prev;
-};
-
 #define RUBY_VM_VALUE_CACHE_SIZE 0x1000
 #define USE_VALUE_CACHE 0
 
@@ -414,7 +410,6 @@
     int transition_for_lock;
 
     struct rb_vm_tag *tag;
-    struct rb_vm_trap_tag *trap_tag;
 
     int parse_in_eval;
     int mild_compile_error;
Index: eval.c
===================================================================
--- eval.c	(revision 26406)
+++ eval.c	(revision 26407)
@@ -690,19 +690,14 @@
     int status;
     rb_thread_t *th = GET_THREAD();
     rb_control_frame_t *cfp = th->cfp;
-    struct rb_vm_trap_tag trap_tag;
     rb_jmpbuf_t org_jmpbuf;
 
-    trap_tag.prev = th->trap_tag;
-
     PUSH_TAG();
-    th->trap_tag = &trap_tag;
     MEMCPY(&org_jmpbuf, &(th)->root_jmpbuf, rb_jmpbuf_t, 1);
     if ((status = EXEC_TAG()) == 0) {
 	SAVE_ROOT_JMPBUF(th, result = (*proc) (data));
     }
     MEMCPY(&(th)->root_jmpbuf, &org_jmpbuf, rb_jmpbuf_t, 1);
-    th->trap_tag = trap_tag.prev;
     POP_TAG();
 
     if (state) {
Index: cont.c
===================================================================
--- cont.c	(revision 26406)
+++ cont.c	(revision 26407)
@@ -388,7 +388,6 @@
     th->state = sth->state;
     th->status = sth->status;
     th->tag = sth->tag;
-    th->trap_tag = sth->trap_tag;
     th->errinfo = sth->errinfo;
     th->first_proc = sth->first_proc;
 
@@ -621,9 +620,6 @@
     if (cont->saved_thread.self != th->self) {
 	rb_raise(rb_eRuntimeError, "continuation called across threads");
     }
-    if (cont->saved_thread.trap_tag != th->trap_tag) {
-	rb_raise(rb_eRuntimeError, "continuation called across trap");
-    }
     if (cont->saved_thread.fiber) {
 	rb_fiber_t *fcont;
 	GetFiberPtr(cont->saved_thread.fiber, fcont);
@@ -940,9 +936,6 @@
     if (cont->saved_thread.self != th->self) {
 	rb_raise(rb_eFiberError, "fiber called across threads");
     }
-    else if (cont->saved_thread.trap_tag != th->trap_tag) {
-	rb_raise(rb_eFiberError, "fiber called across trap");
-    }
     else if (fib->status == TERMINATED) {
 	value = rb_exc_new2(rb_eFiberError, "dead fiber called");
 	if (th->fiber != fibval) rb_exc_raise(value);

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

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