[macruby-changes] [2718] MacRuby/trunk/vm.cpp

source_changes at macosforge.org source_changes at macosforge.org
Sun Oct 4 20:46:05 PDT 2009


Revision: 2718
          http://trac.macosforge.org/projects/ruby/changeset/2718
Author:   lsansonetti at apple.com
Date:     2009-10-04 20:46:03 -0700 (Sun, 04 Oct 2009)
Log Message:
-----------
fixed AOT super method cache

Modified Paths:
--------------
    MacRuby/trunk/vm.cpp

Modified: MacRuby/trunk/vm.cpp
===================================================================
--- MacRuby/trunk/vm.cpp	2009-10-05 01:54:26 UTC (rev 2717)
+++ MacRuby/trunk/vm.cpp	2009-10-05 03:46:03 UTC (rev 2718)
@@ -534,7 +534,8 @@
 void *
 rb_vm_get_method_cache(SEL sel)
 {
-    return GET_CORE()->method_cache_get(sel, false); 
+    const bool super = strncmp(sel_getName(sel), "__super__:", 10) == 0;
+    return GET_CORE()->method_cache_get(sel, super); 
 }
 
 rb_vm_method_node_t *
@@ -673,14 +674,15 @@
     }
 
 #if ROXOR_VM_DEBUG
-    printf("defining %c[%s %s] with imp %p/%p types %s flags %d\n",
+    printf("defining %c[%s %s] with imp %p/%p types %s flags %d arity %d\n",
 	    class_isMetaClass(klass) ? '+' : '-',
 	    class_getName(klass),
 	    sel_getName(sel),
 	    imp,
 	    ruby_imp,
 	    types,
-	    flags);
+	    flags,
+	    arity.real);
 #endif
 
     // Register the implementation into the runtime.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20091004/297421cd/attachment.html>


More information about the macruby-changes mailing list