Modified: MacRuby/trunk/vm.cpp (4544 => 4545)
--- MacRuby/trunk/vm.cpp 2010-09-27 22:55:31 UTC (rev 4544)
+++ MacRuby/trunk/vm.cpp 2010-09-27 23:05:30 UTC (rev 4545)
@@ -1018,15 +1018,15 @@
ruby_imps[ruby_imp] = node;
}
- // Invalidate respond_to cache.
- invalidate_respond_to_cache();
+ if (running) {
+ // Invalidate respond_to cache.
+ invalidate_respond_to_cache();
- // Invalidate dispatch cache.
- invalidate_method_cache(sel);
+ // Invalidate dispatch cache.
+ invalidate_method_cache(sel);
- // Invalidate inline operations.
+ // Invalidate inline operations.
#if !defined(MACRUBY_STATIC)
- if (running) {
GlobalVariable *gvar = redefined_op_gvar(sel, false);
if (gvar != NULL && should_invalidate_inline_op(sel, klass)) {
void *val = ee->getOrEmitGlobalVariable(gvar);
@@ -1038,8 +1038,8 @@
assert(val != NULL);
*(unsigned char *)val = 1;
}
+#endif
}
-#endif
// If alloc is redefined, mark the class as such.
if (sel == selAlloc