Index: src/ic/ic-compiler.h |
diff --git a/src/ic/ic-compiler.h b/src/ic/ic-compiler.h |
index 9d8884fb8a32e6fa8c8c067bad617d121c54db13..415aad5e6d38e992aebcdfbe29042e18771b2ba2 100644 |
--- a/src/ic/ic-compiler.h |
+++ b/src/ic/ic-compiler.h |
@@ -13,15 +13,21 @@ |
class PropertyICCompiler : public PropertyAccessCompiler { |
public: |
+ // Named |
+ static Handle<Code> ComputeStore(Isolate* isolate, InlineCacheState ic_state, |
+ ExtraICState extra_state); |
+ |
// Keyed |
static Handle<Code> ComputeKeyedLoadMonomorphicHandler( |
Handle<Map> receiver_map, ExtraICState extra_ic_state); |
static Handle<Code> ComputeKeyedStoreMonomorphicHandler( |
- Handle<Map> receiver_map, KeyedAccessStoreMode store_mode); |
+ Handle<Map> receiver_map, LanguageMode language_mode, |
+ KeyedAccessStoreMode store_mode); |
static void ComputeKeyedStorePolymorphicHandlers( |
MapHandleList* receiver_maps, MapHandleList* transitioned_maps, |
- CodeHandleList* handlers, KeyedAccessStoreMode store_mode); |
+ CodeHandleList* handlers, KeyedAccessStoreMode store_mode, |
+ LanguageMode language_mode); |
// Helpers |
// TODO(verwaest): Move all uses of these helpers to the PropertyICCompiler |
@@ -31,9 +37,13 @@ |
private: |
- explicit PropertyICCompiler(Isolate* isolate) |
- : PropertyAccessCompiler(isolate, Code::KEYED_STORE_IC, |
- kCacheOnReceiver) {} |
+ PropertyICCompiler(Isolate* isolate, Code::Kind kind, |
+ ExtraICState extra_ic_state = kNoExtraICState, |
+ CacheHolderFlag cache_holder = kCacheOnReceiver) |
+ : PropertyAccessCompiler(isolate, kind, cache_holder), |
+ extra_ic_state_(extra_ic_state) {} |
+ |
+ Handle<Code> CompileStoreMegamorphic(Code::Flags flags); |
Handle<Code> CompileKeyedStoreMonomorphicHandler( |
Handle<Map> receiver_map, KeyedAccessStoreMode store_mode); |
@@ -41,6 +51,30 @@ |
MapHandleList* transitioned_maps, |
CodeHandleList* handlers, |
KeyedAccessStoreMode store_mode); |
+ |
+ Handle<Code> GetCode(Code::Kind kind, Handle<Name> name, |
+ InlineCacheState state = MONOMORPHIC); |
+ |
+ Logger::LogEventsAndTags log_kind(Handle<Code> code) { |
+ if (kind() == Code::LOAD_IC) { |
+ return code->ic_state() == MONOMORPHIC ? Logger::LOAD_IC_TAG |
+ : Logger::LOAD_POLYMORPHIC_IC_TAG; |
+ } else if (kind() == Code::KEYED_LOAD_IC) { |
+ return code->ic_state() == MONOMORPHIC |
+ ? Logger::KEYED_LOAD_IC_TAG |
+ : Logger::KEYED_LOAD_POLYMORPHIC_IC_TAG; |
+ } else if (kind() == Code::STORE_IC) { |
+ return code->ic_state() == MONOMORPHIC ? Logger::STORE_IC_TAG |
+ : Logger::STORE_POLYMORPHIC_IC_TAG; |
+ } else { |
+ DCHECK_EQ(Code::KEYED_STORE_IC, kind()); |
+ return code->ic_state() == MONOMORPHIC |
+ ? Logger::KEYED_STORE_IC_TAG |
+ : Logger::KEYED_STORE_POLYMORPHIC_IC_TAG; |
+ } |
+ } |
+ |
+ const ExtraICState extra_ic_state_; |
}; |