[macruby-changes] [4152] MacRuby/trunk/kernel.c
source_changes at macosforge.org
source_changes at macosforge.org
Tue May 25 17:19:28 PDT 2010
Revision: 4152
http://trac.macosforge.org/projects/ruby/changeset/4152
Author: lsansonetti at apple.com
Date: 2010-05-25 17:19:26 -0700 (Tue, 25 May 2010)
Log Message:
-----------
some optimizations in the ivar primitives
Modified Paths:
--------------
MacRuby/trunk/kernel.c
Modified: MacRuby/trunk/kernel.c
===================================================================
--- MacRuby/trunk/kernel.c 2010-05-25 22:07:00 UTC (rev 4151)
+++ MacRuby/trunk/kernel.c 2010-05-26 00:19:26 UTC (rev 4152)
@@ -41,11 +41,14 @@
return val;
}
}
+ goto find_slot;
}
}
if (cache->slot == SLOT_CACHE_VIRGIN) {
- const int slot = rb_vm_get_ivar_slot(obj, name, true);
+ int slot;
+find_slot:
+ slot = rb_vm_get_ivar_slot(obj, name, true);
if (slot >= 0) {
cache->klass = *(VALUE *)obj;
cache->slot = slot;
@@ -79,11 +82,14 @@
return;
}
}
+ goto find_slot;
}
}
if (cache->slot == SLOT_CACHE_VIRGIN) {
- const int slot = rb_vm_get_ivar_slot(obj, name, true);
+ int slot;
+find_slot:
+ slot = rb_vm_get_ivar_slot(obj, name, true);
if (slot >= 0) {
cache->klass = *(VALUE *)obj;
cache->slot = slot;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20100525/60aa0bcd/attachment-0001.html>
More information about the macruby-changes
mailing list