Index: src/code-factory.cc |
diff --git a/src/code-factory.cc b/src/code-factory.cc |
index 91f51d7d6d398bab734a7798dffddecc5c765d7a..c0b7ff9b95ee523c1ab9eb9fb7374db2808b864e 100644 |
--- a/src/code-factory.cc |
+++ b/src/code-factory.cc |
@@ -70,7 +70,22 @@ Callable CodeFactory::CallICInOptimizedCode(Isolate* isolate, int argc, |
Callable CodeFactory::StoreIC(Isolate* isolate, LanguageMode language_mode) { |
return Callable( |
StoreIC::initialize_stub(isolate, language_mode, UNINITIALIZED), |
- StoreDescriptor(isolate)); |
+ FLAG_vector_stores ? VectorStoreICTrampolineDescriptor(isolate) |
+ : StoreDescriptor(isolate)); |
+} |
+ |
+ |
+// static |
+Callable CodeFactory::StoreICInOptimizedCode( |
+ Isolate* isolate, LanguageMode language_mode, |
+ InlineCacheState initialization_state) { |
+ CallInterfaceDescriptor descriptor = |
+ FLAG_vector_stores && initialization_state != MEGAMORPHIC |
+ ? VectorStoreICDescriptor(isolate) |
+ : StoreDescriptor(isolate); |
+ return Callable(StoreIC::initialize_stub_in_optimized_code( |
+ isolate, language_mode, initialization_state), |
+ descriptor); |
} |
@@ -79,7 +94,8 @@ Callable CodeFactory::KeyedStoreIC(Isolate* isolate, |
LanguageMode language_mode) { |
return Callable( |
KeyedStoreIC::initialize_stub(isolate, language_mode, UNINITIALIZED), |
- StoreDescriptor(isolate)); |
+ FLAG_vector_stores ? VectorStoreICTrampolineDescriptor(isolate) |
+ : StoreDescriptor(isolate)); |
} |
@@ -87,9 +103,13 @@ Callable CodeFactory::KeyedStoreIC(Isolate* isolate, |
Callable CodeFactory::KeyedStoreICInOptimizedCode( |
Isolate* isolate, LanguageMode language_mode, |
InlineCacheState initialization_state) { |
- return Callable(KeyedStoreIC::initialize_stub(isolate, language_mode, |
- initialization_state), |
- StoreDescriptor(isolate)); |
+ CallInterfaceDescriptor descriptor = |
+ FLAG_vector_stores && initialization_state != MEGAMORPHIC |
+ ? VectorStoreICDescriptor(isolate) |
+ : StoreDescriptor(isolate); |
+ return Callable(KeyedStoreIC::initialize_stub_in_optimized_code( |
+ isolate, language_mode, initialization_state), |
+ descriptor); |
} |