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

yarv-diff:181

From: ko1 atdot.net
Date: 28 Dec 2005 16:59:05 -0000
Subject: [yarv-diff:181] r339 - trunk

Author: ko1
Date: 2005-12-29 01:59:04 +0900 (Thu, 29 Dec 2005)
New Revision: 339

Modified:
   trunk/ChangeLog
   trunk/gc.c
   trunk/test.rb
   trunk/vm.c
   trunk/yarvcore.c
Log:
	* vm.c : fix setting of Proc cref ([yarv-dev:741])

	* yarvcore.c : fix indent



Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2005-12-28 15:18:57 UTC (rev 338)
+++ trunk/ChangeLog	2005-12-28 16:59:04 UTC (rev 339)
@@ -4,6 +4,13 @@
 #  from Mon, 03 May 2004 01:24:19 +0900
 #
 
+2005-12-29(Thu) 01:56:46 +0900  Koichi Sasada  <ko1 atdot.net>
+
+	* vm.c : fix setting of Proc cref ([yarv-dev:741])
+
+	* yarvcore.c : fix indent
+
+
 2005-12-29(Thu) 00:17:03 +0900  Koichi Sasada  <ko1 atdot.net>
 
 	* disasm.c : show (block) local variable simple (not as symbol)

Modified: trunk/gc.c
===================================================================
--- trunk/gc.c	2005-12-28 15:18:57 UTC (rev 338)
+++ trunk/gc.c	2005-12-28 16:59:04 UTC (rev 339)
@@ -119,7 +119,7 @@
   if (size == 0) size = 1;
   malloc_increase += size;
 
-  if (malloc_increase > malloc_limit){ // || gc_debug_flag) {
+  if (malloc_increase > malloc_limit){// || gc_debug_flag) {
     garbage_collect();
   }
   RUBY_CRITICAL(mem = malloc(size));

Modified: trunk/test.rb
===================================================================
--- trunk/test.rb	2005-12-28 15:18:57 UTC (rev 338)
+++ trunk/test.rb	2005-12-28 16:59:04 UTC (rev 339)
@@ -1,3 +1,10 @@
+hash = Hash.new{|h, k| p [h, k]}
+p :fooooooooo
+
+__END__
+
+path = Hash.new {|h, i| h[i] = dirs.push([i])[-1]}
+
 a = 1
 p a
 __END__

Modified: trunk/vm.c
===================================================================
--- trunk/vm.c	2005-12-28 15:18:57 UTC (rev 338)
+++ trunk/vm.c	2005-12-28 16:59:04 UTC (rev 339)
@@ -371,10 +371,13 @@
 
   /* set cref */
   if(BUILTIN_TYPE(block->iseq) != T_NODE){
-    if(cfp->iseq && cfp->iseq->klass_nest_stack){
+    if(cfp->iseq &&
+       BUILTIN_TYPE(cfp->iseq) != T_NODE &&
+       !CMETHOD_INFO_P(cfp->iseq) &&
+       cfp->iseq->klass_nest_stack){
       block->iseq->klass_nest_stack = cfp->iseq->klass_nest_stack;
     }
-    else{
+    else if(block->iseq->klass_nest_stack == 0){
       block->iseq->klass_nest_stack = rb_ary_dup(th->klass_nest_stack);
     }
   }

Modified: trunk/yarvcore.c
===================================================================
--- trunk/yarvcore.c	2005-12-28 15:18:57 UTC (rev 338)
+++ trunk/yarvcore.c	2005-12-28 16:59:04 UTC (rev 339)
@@ -536,7 +536,9 @@
 
 void native_thread_cleanup(void *);
 
-static void vm_free(void *ptr){
+static void
+vm_free(void *ptr)
+{
   FREE_REPORT("-> vm");
   if(ptr){
     yarv_vm_t *vmobj = ptr;
@@ -557,8 +559,11 @@
   return ST_CONTINUE;
 }
 
-static void vm_mark(void *ptr){
+static void
+vm_mark(void *ptr)
+{
   MARK_REPORT("-> vm", 1);
+  GC_INFO("-------------------------------------------------\n");
   if(ptr){
     yarv_vm_t *vm = ptr;
     st_foreach(vm->living_threads, vm_mark_each_thread_func, 0);
@@ -566,14 +571,18 @@
   MARK_REPORT("<- vm", 0);
 }
 
-static VALUE vm_alloc(VALUE klass){
+static VALUE
+vm_alloc(VALUE klass)
+{
   VALUE volatile obj;
   yarv_vm_t *vm;
   obj = Data_Make_Struct(klass, yarv_vm_t, vm_mark, vm_free, vm);
   return obj;
 }
 
-static VALUE vm_init(VALUE self, VALUE node){
+static VALUE
+vm_init(VALUE self, VALUE node)
+{
   /* allocate vm stack */
   yarv_vm_t *vm;
   GetVMVal(self, vm);
@@ -581,10 +590,11 @@
   return self;
 }
 
-
 static VALUE thread_eval(VALUE self, VALUE iseq);
 
-static VALUE vm_eval(VALUE self, VALUE iseq){
+static VALUE
+vm_eval(VALUE self, VALUE iseq)
+{
   yarv_vm_t *vm;
   VALUE val;
   GetVMVal(self, vm);


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

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