[前][次][番号順一覧][スレッド一覧][生データ]

yarv-diff:295

From: ko1 atdot.net
Date: 21 Feb 2006 19:55:23 -0000
Subject: [yarv-diff:295] r459 - trunk

Author: ko1
Date: 2006-02-22 04:55:22 +0900 (Wed, 22 Feb 2006)
New Revision: 459

Modified:
   trunk/
   trunk/ChangeLog
   trunk/eval.c
   trunk/test.rb
   trunk/vm.c
   trunk/yarvcore.c
Log:
 r704@lermite:  ko1 | 2006-02-22 04:54:11 +0900
 	* eval.c : change to rewind C level control frame
 
 	* vm.c : change to initialize cfp#proc and fix comparison of
 	cfp and limit_cfp
 
 	* yarvcore.c : remove last commit
 



Property changes on: trunk
___________________________________________________________________
Name: svk:merge
   - 81cd9672-7512-7e48-ae48-6936450e977d:/local/yarv/trunk:702
   + 81cd9672-7512-7e48-ae48-6936450e977d:/local/yarv/trunk:704

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2006-02-21 18:30:42 UTC (rev 458)
+++ trunk/ChangeLog	2006-02-21 19:55:22 UTC (rev 459)
@@ -4,6 +4,16 @@
 #  from Mon, 03 May 2004 01:24:19 +0900
 #
 
+2006-02-22(Wed) 04:50:42 +0900  Koichi Sasada  <ko1 atdot.net>
+
+	* eval.c : change to rewind C level control frame
+
+	* vm.c : change to initialize cfp#proc and fix comparison of
+	cfp and limit_cfp
+
+	* yarvcore.c : remove last commit
+
+
 2006-02-22(Wed) 03:25:56 +0900  Koichi Sasada  <ko1 atdot.net>
 
 	* yarvcore.c : initialize each stack of thread

Modified: trunk/eval.c
===================================================================
--- trunk/eval.c	2006-02-21 18:30:42 UTC (rev 458)
+++ trunk/eval.c	2006-02-21 19:55:22 UTC (rev 459)
@@ -915,13 +915,18 @@
     VALUE mesg;
 {
     VALUE at;
+    yarv_thread_t *th = GET_THREAD();
 
+    while (th->cfp->pc == 0 || th->cfp->iseq == 0) {
+	th->cfp++;
+    }
+
     if (thread_set_raised()) {
-	GET_THREAD()->errinfo = exception_error;
+	th->errinfo = exception_error;
 	JUMP_TAG(TAG_FATAL);
     }
     if (NIL_P(mesg))
-	mesg = GET_THREAD()->errinfo;
+      mesg = GET_THREAD()->errinfo;
     if (NIL_P(mesg)) {
 	mesg = rb_exc_new(rb_eRuntimeError, 0, 0);
     }

Modified: trunk/test.rb
===================================================================
--- trunk/test.rb	2006-02-21 18:30:42 UTC (rev 458)
+++ trunk/test.rb	2006-02-21 19:55:22 UTC (rev 459)
@@ -1,3 +1,13 @@
+
+begin
+  raise
+rescue => e
+  p e.backtrace
+end
+
+
+__END__
+
 require 'timeout'
 
 100000.times{

Modified: trunk/vm.c
===================================================================
--- trunk/vm.c	2006-02-21 18:30:42 UTC (rev 458)
+++ trunk/vm.c	2006-02-21 19:55:22 UTC (rev 459)
@@ -106,6 +106,7 @@
     cfp->self = self;
     cfp->lfp = lfp;
     cfp->dfp = dfp;
+    cfp->proc = 0;
 
     return Qtrue;
 }
@@ -823,7 +824,7 @@
 {
     VALUE str;
 
-    while (cfp != limit_cfp) {
+    while (cfp > limit_cfp) {
 	str = 0;
 	if (cfp->iseq != 0) {
 	    if (cfp->pc != 0) {
@@ -868,9 +869,8 @@
 	ary = rb_ary_new();
     }
 
-    ary =
-	th_backtrace_each(th, YARV_NEXT_CONTROL_FRAME(cfp), top_of_cfp, "", 0,
-			  ary);
+    ary = th_backtrace_each(th, YARV_NEXT_CONTROL_FRAME(cfp),
+			    top_of_cfp, "", 0, ary);
     return ary;
 }
 

Modified: trunk/yarvcore.c
===================================================================
--- trunk/yarvcore.c	2006-02-21 18:30:42 UTC (rev 458)
+++ trunk/yarvcore.c	2006-02-21 19:55:22 UTC (rev 459)
@@ -641,8 +641,7 @@
 
     /* allocate thread stack */
     th->stack = ALLOC_N(VALUE, YARV_THREAD_STACK_SIZE);
-    MEMZERO(th->stack, VALUE, YARV_THREAD_STACK_SIZE);
-    
+
     th->stack_size = YARV_THREAD_STACK_SIZE;
     th->cfp = (void *)(th->stack + th->stack_size);
     th->cfp--;
@@ -654,6 +653,7 @@
     th->cfp->dfp = th->stack;
     th->cfp->self = Qnil;
     th->cfp->magic = 0;
+    th->cfp->proc = 0;
 
     th->status = THREAD_RUNNABLE;
     th->errinfo = Qnil;


-- 
ML: yarv-diff quickml.atdot.net
Info: http://www.atdot.net/~ko1/quickml

[前][次][番号順一覧][スレッド一覧][生データ]