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

ruby-changes:1842

From: ko1@a...
Date: 1 Sep 2007 23:46:16 +0900
Subject: [ruby-changes:1842] matz - Ruby:r13333 (trunk): * eval_jump.ci (rb_f_throw): wrap tag and TAG_THROW in a NODE_MEMO

matz	2007-09-01 23:46:00 +0900 (Sat, 01 Sep 2007)

  New Revision: 13333

  Modified files:
    trunk/ChangeLog
    trunk/eval_jump.ci

  Log:
    * eval_jump.ci (rb_f_throw): wrap tag and TAG_THROW in a NODE_MEMO
      node to make throw instruction to work well.

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=13333&r2=13332
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/eval_jump.ci?r1=13333&r2=13332

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 13332)
+++ ChangeLog	(revision 13333)
@@ -1,3 +1,8 @@
+Sat Sep  1 23:44:26 2007  Yukihiro Matsumoto  <matz@r...>
+
+	* eval_jump.ci (rb_f_throw): wrap tag and TAG_THROW in a NODE_MEMO
+	  node to make throw instruction to work well.
+
 Sat Sep  1 20:56:07 2007  Tanaka Akira  <akr@f...>
 
 	* include/ruby/ruby.h (struct RBignum): embed digits in RBignum for
Index: eval_jump.ci
===================================================================
--- eval_jump.ci	(revision 13332)
+++ eval_jump.ci	(revision 13333)
@@ -39,7 +39,7 @@
 	rb_raise(rb_eArgError, "uncaught throw %s", RSTRING_PTR(desc));
     }
     rb_trap_restore_mask();
-    th->errinfo = tag;
+    th->errinfo = (VALUE)rb_node_newnode(NODE_MEMO, tag, 0, TAG_THROW);
 
     JUMP_TAG(TAG_THROW);
 #ifndef __GNUC__
@@ -117,7 +117,7 @@
     if ((state = EXEC_TAG()) == 0) {
 	val = rb_yield_0(1, &tag);
     }
-    else if (state == TAG_THROW && th->errinfo == tag) {
+    else if (state == TAG_THROW && RNODE(th->errinfo)->u1.value == tag) {
 	val = th->tag->retval;
 	th->errinfo = Qnil;
 	state = 0;

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

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