Index: src/stub-cache.h |
=================================================================== |
--- src/stub-cache.h (revision 2034) |
+++ src/stub-cache.h (working copy) |
@@ -127,18 +127,23 @@ |
// --- |
static Object* ComputeCallField(int argc, |
+ InlineCacheInLoop in_loop, |
String* name, |
Object* object, |
JSObject* holder, |
int index); |
static Object* ComputeCallConstant(int argc, |
+ InlineCacheInLoop in_loop, |
String* name, |
Object* object, |
JSObject* holder, |
JSFunction* function); |
- static Object* ComputeCallNormal(int argc, String* name, JSObject* receiver); |
+ static Object* ComputeCallNormal(int argc, |
+ InlineCacheInLoop in_loop, |
+ String* name, |
+ JSObject* receiver); |
static Object* ComputeCallInterceptor(int argc, |
String* name, |
@@ -147,15 +152,14 @@ |
// --- |
- static Object* ComputeCallInitialize(int argc); |
- static Object* ComputeCallInitializeInLoop(int argc); |
- static Object* ComputeCallPreMonomorphic(int argc); |
- static Object* ComputeCallNormal(int argc); |
- static Object* ComputeCallMegamorphic(int argc); |
+ static Object* ComputeCallInitialize(int argc, InlineCacheInLoop in_loop); |
+ static Object* ComputeCallPreMonomorphic(int argc, InlineCacheInLoop in_loop); |
+ static Object* ComputeCallNormal(int argc, InlineCacheInLoop in_loop); |
+ static Object* ComputeCallMegamorphic(int argc, InlineCacheInLoop in_loop); |
static Object* ComputeCallMiss(int argc); |
// Finds the Code object stored in the Heap::non_monomorphic_cache(). |
- static Code* FindCallInitialize(int argc); |
+ static Code* FindCallInitialize(int argc, InlineCacheInLoop in_loop); |
#ifdef ENABLE_DEBUGGER_SUPPORT |
static Object* ComputeCallDebugBreak(int argc); |
@@ -208,8 +212,12 @@ |
// 4Gb (and not at all if it isn't). |
uint32_t map_low32bits = |
static_cast<uint32_t>(reinterpret_cast<uintptr_t>(map)); |
+ // We always set the in_loop bit to zero when generating the lookup code |
+ // so do it here too so the hash codes match. |
+ uint32_t iflags = |
+ (static_cast<uint32_t>(flags) & ~Code::kFlagsICInLoopMask); |
// Base the offset on a simple combination of name, flags, and map. |
- uint32_t key = (map_low32bits + field) ^ flags; |
+ uint32_t key = (map_low32bits + field) ^ iflags; |
return key & ((kPrimaryTableSize - 1) << kHeapObjectTagSize); |
} |
@@ -217,7 +225,11 @@ |
// Use the seed from the primary cache in the secondary cache. |
uint32_t string_low32bits = |
static_cast<uint32_t>(reinterpret_cast<uintptr_t>(name)); |
- uint32_t key = seed - string_low32bits + flags; |
+ // We always set the in_loop bit to zero when generating the lookup code |
+ // so do it here too so the hash codes match. |
+ uint32_t iflags = |
+ (static_cast<uint32_t>(flags) & ~Code::kFlagsICInLoopMask); |
+ uint32_t key = seed - string_low32bits + iflags; |
return key & ((kSecondaryTableSize - 1) << kHeapObjectTagSize); |
} |
@@ -468,11 +480,13 @@ |
Object* CompileCallField(Object* object, |
JSObject* holder, |
int index, |
- String* name); |
+ String* name, |
+ Code::Flags flags); |
Object* CompileCallConstant(Object* object, |
JSObject* holder, |
JSFunction* function, |
- CheckType check); |
+ CheckType check, |
+ Code::Flags flags); |
Object* CompileCallInterceptor(Object* object, |
JSObject* holder, |
String* name); |