Revision
4505
Author
lsansonetti@apple.com
Date
2010-09-10 15:41:36 -0700 (Fri, 10 Sep 2010)

Log Message

expose ivar slots to static compilation

Modified Paths

Diff

Modified: MacRuby/trunk/compiler.cpp (4504 => 4505)


--- MacRuby/trunk/compiler.cpp	2010-09-10 21:17:10 UTC (rev 4504)
+++ MacRuby/trunk/compiler.cpp	2010-09-10 22:41:36 UTC (rev 4505)
@@ -1357,16 +1357,6 @@
 	    "", bb);
 }
 
-extern "C"
-struct icache *
-rb_vm_ivar_slot_allocate(void)
-{
-    struct icache *icache = (struct icache *)malloc(sizeof(struct icache));
-    icache->klass = 0;
-    icache->slot = SLOT_CACHE_VIRGIN;
-    return icache;
-}
-
 Value *
 RoxorCompiler::compile_slot_cache(ID id)
 {

Modified: MacRuby/trunk/vm.cpp (4504 => 4505)


--- MacRuby/trunk/vm.cpp	2010-09-10 21:17:10 UTC (rev 4504)
+++ MacRuby/trunk/vm.cpp	2010-09-10 22:41:36 UTC (rev 4505)
@@ -1415,6 +1415,16 @@
 }
 
 extern "C"
+struct icache *
+rb_vm_ivar_slot_allocate(void)
+{
+    struct icache *icache = (struct icache *)malloc(sizeof(struct icache));
+    icache->klass = 0;
+    icache->slot = SLOT_CACHE_VIRGIN;
+    return icache;
+}
+
+extern "C"
 int
 rb_vm_get_ivar_slot(VALUE obj, ID name, bool create)
 {

Modified: MacRuby/trunk/vm.h (4504 => 4505)


--- MacRuby/trunk/vm.h	2010-09-10 21:17:10 UTC (rev 4504)
+++ MacRuby/trunk/vm.h	2010-09-10 22:41:36 UTC (rev 4505)
@@ -531,6 +531,8 @@
     int slot;
 };
 
+struct icache *rb_vm_ivar_slot_allocate(void);
+
 struct ccache {
     VALUE outer;
     VALUE val;