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

yarv-diff:339

From: ko1 atdot.net
Date: 21 Jun 2006 04:22:14 -0000
Subject: [yarv-diff:339] r505 - trunk

Author: ko1
Date: 2006-06-21 13:22:13 +0900 (Wed, 21 Jun 2006)
New Revision: 505

Modified:
   trunk/
   trunk/ChangeLog
   trunk/compile.c
   trunk/compile.h
   trunk/eval_thread.c
   trunk/thread.c
   trunk/yarvcore.c
   trunk/yarvcore.h
Log:
 r784@lermite:  ko1 | 2006-06-21 09:33:00 +0900
 	* compile.c : remove yarv_iseq_t#catch_table_ary and
 	add yarv_iseq_t#compile_data#catch_table_ary
 
 	* compile.h : ditto
 
 	* yarvcore.c : ditto
 
 	* yarvcore.h : ditto
 
 	* eval_thread.c : remove unused code
 
 	* thread.c : add rb_gc_mark_threads() (from eval_thread.c)
 



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

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2006-05-31 12:28:23 UTC (rev 504)
+++ trunk/ChangeLog	2006-06-21 04:22:13 UTC (rev 505)
@@ -4,6 +4,22 @@
 #  from Mon, 03 May 2004 01:24:19 +0900
 #
 
+2006-06-21(Wed) 09:19:06 +0900  Koichi Sasada  <ko1 atdot.net>
+
+	* compile.c : remove yarv_iseq_t#catch_table_ary and
+	add yarv_iseq_t#compile_data#catch_table_ary
+
+	* compile.h : ditto
+
+	* yarvcore.c : ditto
+
+	* yarvcore.h : ditto
+
+	* eval_thread.c : remove unused code
+
+	* thread.c : add rb_gc_mark_threads() (from eval_thread.c)
+
+
 2006-05-31(Wed) 21:26:38 +0900  Koichi Sasada  <ko1 atdot.net>
 
         * parse.y : prohibit tail call optimization to mark vparsr
@@ -12,7 +28,7 @@
 
 2006-05-25(Thu) 15:37:11 +0900  Koichi Sasada  <ko1 atdot.net>
 
-	* blockinlining.c : support NEW_ATTRASGN attributes
+	* blockinlining.c : support NEW_ATTRASGN node
 
 	* class.c : skip undefined method to collect ([yarv-dev:999])
 
@@ -29,7 +45,6 @@
 	* vm_opts.h.base : change default option
 
 
-
 2006-05-18(Thu) 16:00:50 +0900  Koichi Sasada  <ko1 atdot.net>
 
 	* intern.h : fix prototype declarations for last re.c change

Modified: trunk/compile.c
===================================================================
--- trunk/compile.c	2006-05-31 12:28:23 UTC (rev 504)
+++ trunk/compile.c	2006-06-21 04:22:13 UTC (rev 505)
@@ -1409,8 +1409,8 @@
     int tlen, i;
     struct catch_table_entry *entry;
 
-    tlen = RARRAY(iseq->catch_table_ary)->len;
-    tptr = RARRAY(iseq->catch_table_ary)->ptr;
+    tlen = RARRAY(iseq->compile_data->catch_table_ary)->len;
+    tptr = RARRAY(iseq->compile_data->catch_table_ary)->ptr;
 
     iseq->catch_table = ALLOC_N(struct catch_table_entry, tlen);
     iseq->catch_table_size = tlen;
@@ -1443,7 +1443,7 @@
 	}
     }
     //
-    iseq->catch_table_ary = 0;	/* free */
+    iseq->compile_data->catch_table_ary = 0;	/* free */
     return COMPILE_OK;
 }
 

Modified: trunk/compile.h
===================================================================
--- trunk/compile.h	2006-05-31 12:28:23 UTC (rev 504)
+++ trunk/compile.h	2006-06-21 04:22:13 UTC (rev 505)
@@ -156,7 +156,7 @@
    rb_ary_push(tmp, (VALUE) le | 1),                 \
    rb_ary_push(tmp, iseqv),                          \
    rb_ary_push(tmp, (VALUE) lc | 1),                 \
-   rb_ary_push(iseq->catch_table_ary, tmp))
+   rb_ary_push(iseq->compile_data->catch_table_ary, tmp))
 
 /* compile node */
 #define COMPILE(anchor, desc, node) \

Modified: trunk/eval_thread.c
===================================================================
--- trunk/eval_thread.c	2006-05-31 12:28:23 UTC (rev 504)
+++ trunk/eval_thread.c	2006-06-21 04:22:13 UTC (rev 505)
@@ -352,22 +352,6 @@
 #define STACK(addr) (th->stk_pos<(VALUE*)(addr) && (VALUE*)(addr)<th->stk_pos+th->stk_len)
 #define ADJ(addr) (void*)(STACK(addr)?(((VALUE*)(addr)-th->stk_pos)+th->stk_ptr):(VALUE*)(addr))
 
-void
-rb_gc_mark_threads()
-{
-    // TODO: remove
-}
-
-#define RESTORE_NORMAL		1
-#define RESTORE_FATAL		2
-#define RESTORE_INTERRUPT	3
-#define RESTORE_TRAP		4
-#define RESTORE_RAISE		5
-#define RESTORE_SIGNAL		6
-#define RESTORE_EXIT		7
-
-extern VALUE *rb_gc_stack_start;
-
 #define THREAD_SAVE_CONTEXT(th) \
     (rb_thread_save_context(th),\
      rb_thread_switch((FLUSH_REGISTER_WINDOWS, ruby_setjmp((th)->context))))
@@ -385,55 +369,6 @@
     return GET_THREAD()->self;
 }
 
-
-#ifdef __ia64__
-# define IA64_INIT(x) x
-#else
-# define IA64_INIT(x)
-#endif
-
-#define THREAD_ALLOC(th) do {\
-    th = ALLOC(struct thread);\
-\
-    th->next = 0;\
-    th->prev = 0;\
-\
-    th->status = THREAD_RUNNABLE;\
-    th->result = 0;\
-    th->flags = 0;\
-\
-    th->stk_ptr = 0;\
-    th->stk_len = 0;\
-    th->stk_max = 0;\
-    th->wait_for = 0;\
-    IA64_INIT(th->bstr_ptr = 0);\
-    IA64_INIT(th->bstr_len = 0);\
-    rb_fd_init(&th->readfds);\
-    rb_fd_init(&th->writefds);\
-    rb_fd_init(&th->exceptfds);\
-    th->delay = 0.0;\
-    th->join = 0;\
-\
-    th->frame = 0;\
-    th->scope = 0;\
-    th->klass = 0;\
-    th->wrapper = 0;\
-    th->block = 0;\
-    th->iter = 0;\
-    th->tag = 0;\
-    th->tracing = 0;\
-    th->errinfo = Qnil;\
-    th->last_status = 0;\
-    th->last_line = 0;\
-    th->last_match = Qnil;\
-    th->abort = 0;\
-    th->priority = 0;\
-    th->thgroup = thgroup_default;\
-    th->locals = 0;\
-    th->thread = 0;\
-    th->anchor = 0;\
-} while (0)
-
 static rb_thread_t
 rb_thread_alloc(klass)
     VALUE klass;

Modified: trunk/thread.c
===================================================================
--- trunk/thread.c	2006-05-31 12:28:23 UTC (rev 504)
+++ trunk/thread.c	2006-06-21 04:22:13 UTC (rev 505)
@@ -646,6 +646,15 @@
     }
 }
 
+
+void
+rb_gc_mark_threads()
+{
+    // TODO: remove
+}
+
+/*****************************************************/
+
 static void
 rb_thread_ready(yarv_thread_t *th)
 {

Modified: trunk/yarvcore.c
===================================================================
--- trunk/yarvcore.c	2006-05-31 12:28:23 UTC (rev 504)
+++ trunk/yarvcore.c	2006-06-21 04:22:13 UTC (rev 505)
@@ -339,13 +339,13 @@
 	MARK_UNLESS_NULL(iseq->file_name);
 	MARK_UNLESS_NULL((VALUE)iseq->cref_stack);
 	MARK_UNLESS_NULL(iseq->klass);
-	MARK_UNLESS_NULL(iseq->catch_table_ary);
 	MARK_UNLESS_NULL((VALUE)iseq->node);
 	MARK_UNLESS_NULL(iseq->cached_special_block);
 
 	if (iseq->compile_data != 0) {
 	    MARK_UNLESS_NULL(iseq->compile_data->mark_ary);
 	    MARK_UNLESS_NULL(iseq->compile_data->err_info);
+	    MARK_UNLESS_NULL(iseq->compile_data->catch_table_ary);
 	}
     }
     MARK_REPORT("<- iseq", 0);
@@ -374,7 +374,6 @@
     iseq->iseq_mark_ary = rb_ary_new();
     RBASIC(iseq->iseq_mark_ary)->klass = 0;
     
-    iseq->catch_table_ary = rb_ary_new();
     iseq->type = type;
     iseq->arg_rest = 0;
     iseq->arg_block = 0;
@@ -410,6 +409,7 @@
     ALLOC_N(char, INITIAL_ISEQ_COMPILE_DATA_STORAGE_BUFF_SIZE +
 		sizeof(struct iseq_compile_data_storage));
 
+    iseq->compile_data->catch_table_ary = rb_ary_new();
     iseq->compile_data->storage_head->pos = 0;
     iseq->compile_data->storage_head->next = 0;
     iseq->compile_data->storage_head->size =
@@ -1273,11 +1273,6 @@
     rb_define_global_function("cfunc", cfunc, 0);
     rb_define_global_function("SDR", sdr, 0);
 
-    /* Array#each */
-    // rb_define_method(rb_cArray, "each", yarv_Array_each, 0);
-    /* Hash#each */
-    // rb_define_method(rb_cHash,"each", yarv_Hash_each, 0);
-
     symIFUNC = ID2SYM(rb_intern("<IFUNC>"));
     symCFUNC = ID2SYM(rb_intern("<CFUNC>"));
 

Modified: trunk/yarvcore.h
===================================================================
--- trunk/yarvcore.h	2006-05-31 12:28:23 UTC (rev 504)
+++ trunk/yarvcore.h	2006-06-21 04:22:13 UTC (rev 505)
@@ -183,6 +183,7 @@
     /* GC is needed */
     VALUE err_info;
     VALUE mark_ary;
+    VALUE catch_table_ary;	/* Array */
 
     /* GC is not needed */
     struct iseq_label_data *start_label;
@@ -269,7 +270,6 @@
     VALUE klass;
 
     /* catch table */
-    VALUE catch_table_ary;	/* Array */
     struct catch_table_entry *catch_table;
     int catch_table_size;
 


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

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