1 // Copyright 2014 the V8 project authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef V8_IC_IC_COMPILER_H_ 6 #define V8_IC_IC_COMPILER_H_ 7 8 #include "src/ic/access-compiler.h" 9 10 namespace v8 { 11 namespace internal { 12 13 14 class PropertyICCompiler : public PropertyAccessCompiler { 15 public: 16 // Keyed 17 static Handle<Code> ComputeKeyedStoreMonomorphicHandler( 18 Handle<Map> receiver_map, KeyedAccessStoreMode store_mode); 19 static void ComputeKeyedStorePolymorphicHandlers( 20 MapHandleList* receiver_maps, MapHandleList* transitioned_maps, 21 CodeHandleList* handlers, KeyedAccessStoreMode store_mode); 22 23 // Helpers 24 // TODO(verwaest): Move all uses of these helpers to the PropertyICCompiler 25 // and make the helpers private. 26 static void GenerateRuntimeSetProperty(MacroAssembler* masm, 27 LanguageMode language_mode); 28 29 30 private: PropertyICCompiler(Isolate * isolate)31 explicit PropertyICCompiler(Isolate* isolate) 32 : PropertyAccessCompiler(isolate, Code::KEYED_STORE_IC, 33 kCacheOnReceiver) {} 34 35 Handle<Code> CompileKeyedStoreMonomorphicHandler( 36 Handle<Map> receiver_map, KeyedAccessStoreMode store_mode); 37 void CompileKeyedStorePolymorphicHandlers(MapHandleList* receiver_maps, 38 MapHandleList* transitioned_maps, 39 CodeHandleList* handlers, 40 KeyedAccessStoreMode store_mode); 41 }; 42 43 44 } // namespace internal 45 } // namespace v8 46 47 #endif // V8_IC_IC_COMPILER_H_ 48