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

yarv-diff:237

From: ko1 atdot.net
Date: 13 Feb 2006 16:11:09 -0000
Subject: [yarv-diff:237] r399 - in trunk: . yarvtest

Author: ko1
Date: 2006-02-14 01:11:08 +0900 (Tue, 14 Feb 2006)
New Revision: 399

Modified:
   trunk/
   trunk/ChangeLog
   trunk/insns.def
   trunk/test.rb
   trunk/vm_macro.def
   trunk/yarvcore.h
   trunk/yarvtest/test_class.rb
Log:
 r589@leremita:  ko1 | 2006-02-14 00:45:28 +0900
 	* yarvcore.h, vm_macro.def : rename VM_CALL_SUPER to VM_CALL_SUPER_BIT
 
 	* insns.def (send) : set a flag of super as fcall
 
 	* yarvtest/test_class.rb : add a test for above
 



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

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2006-02-13 16:00:38 UTC (rev 398)
+++ trunk/ChangeLog	2006-02-13 16:11:08 UTC (rev 399)
@@ -4,6 +4,16 @@
 #  from Mon, 03 May 2004 01:24:19 +0900
 #
 
+
+2006-02-14(Tue) 00:42:47 +0900  Koichi Sasada  <ko1 atdot.net>
+
+	* yarvcore.h, vm_macro.def : rename VM_CALL_SUPER to VM_CALL_SUPER_BIT
+
+	* insns.def (send) : set a flag of super as fcall
+
+	* yarvtest/test_class.rb : add a test for above
+
+
 2006-02-14(Tue) 00:31:24 +0900  Minero Aoki  <aamine loveruby.net>
 
 	* test/ruby/test_eval.rb: fix typo.

Modified: trunk/insns.def
===================================================================
--- trunk/insns.def	2006-02-13 16:00:38 UTC (rev 398)
+++ trunk/insns.def	2006-02-13 16:11:08 UTC (rev 399)
@@ -1314,7 +1314,7 @@
 		}
 	    }
 	}
-	flag = VM_CALL_SUPER;
+	flag = VM_CALL_SUPER_BIT | VM_CALL_FCALL_BIT;
 	blockptr = tmp_blockptr;
 	mn = rb_method_node(klass, id);
     }

Modified: trunk/test.rb
===================================================================
--- trunk/test.rb	2006-02-13 16:00:38 UTC (rev 398)
+++ trunk/test.rb	2006-02-13 16:11:08 UTC (rev 399)
@@ -1,3 +1,32 @@
+
+class C
+  private
+  def m
+    p :OK
+  end
+end
+
+class D < C
+  def m
+    super
+  end
+end
+
+D.new.m
+
+__END__
+require 'timeout'
+
+timeout(1){
+  Thread.new{
+    $SAFE = 4
+    Thread.critical = true
+    loop{}
+  }.join
+}
+__END__
+
+
 class A
 end
 

Modified: trunk/vm_macro.def
===================================================================
--- trunk/vm_macro.def	2006-02-13 16:00:38 UTC (rev 398)
+++ trunk/vm_macro.def	2006-02-13 16:11:08 UTC (rev 399)
@@ -256,7 +256,7 @@
 	    if (flag & VM_CALL_VCALL_BIT) {
 		stat |= NOEX_VCALL;
 	    }
-	    if (flag & VM_CALL_SUPER) {
+	    if (flag & VM_CALL_SUPER_BIT) {
 		stat |= NOEX_SUPER;
 	    }
 	    val = eval_method_missing(th, id, recv, num, blockptr, stat);

Modified: trunk/yarvcore.h
===================================================================
--- trunk/yarvcore.h	2006-02-13 16:00:38 UTC (rev 398)
+++ trunk/yarvcore.h	2006-02-13 16:11:08 UTC (rev 399)
@@ -477,7 +477,7 @@
 #define VM_CALL_VCALL_BIT          0x08
 #define VM_CALL_TAILCALL_BIT       0x10
 #define VM_CALL_TAILRECURSION_BIT  0x20
-#define VM_CALL_SUPER              0x40
+#define VM_CALL_SUPER_BIT          0x40
 
 VALUE thread_eval_body(VALUE self);
 VALUE iseq_inspect(VALUE self);

Modified: trunk/yarvtest/test_class.rb
===================================================================
--- trunk/yarvtest/test_class.rb	2006-02-13 16:00:38 UTC (rev 398)
+++ trunk/yarvtest/test_class.rb	2006-02-13 16:11:08 UTC (rev 399)
@@ -502,6 +502,29 @@
     }
   end
 
+  def test_super_with_private
+    ae %q{
+      class C
+        private
+        def m1
+          :OK
+        end
+        protected
+        def m2
+        end
+      end
+      class D < C
+        def m1
+          [super, super()]
+        end
+        def m2
+          [super, super()]
+        end
+      end
+      D.new.m1 + D.new.m2
+    }
+  end
+
   def test_const_in_other_scope
     ae %q{
       class C


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

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