Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2403)

Unified Diff: src/code-factory.cc

Issue 945313003: emit premonomorphic ics for keyed loads/stores in optimized code (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/code-factory.h ('k') | src/compiler/js-generic-lowering.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/code-factory.cc
diff --git a/src/code-factory.cc b/src/code-factory.cc
index 9693d24d57d1004766d9be8fd07396d832d96d12..6fa2e56a24a0bb067763ea7ceaa961ff25f652b9 100644
--- a/src/code-factory.cc
+++ b/src/code-factory.cc
@@ -40,12 +40,14 @@ Callable CodeFactory::KeyedLoadIC(Isolate* isolate) {
// static
-Callable CodeFactory::KeyedLoadICInOptimizedCode(Isolate* isolate) {
+Callable CodeFactory::KeyedLoadICInOptimizedCode(
+ Isolate* isolate, InlineCacheState initialization_state) {
+ auto code = KeyedLoadIC::initialize_stub_in_optimized_code(
+ isolate, initialization_state);
if (FLAG_vector_ics) {
- return Callable(KeyedLoadIC::initialize_stub_in_optimized_code(isolate),
- VectorLoadICDescriptor(isolate));
+ return Callable(code, VectorLoadICDescriptor(isolate));
}
- return CodeFactory::KeyedLoadIC(isolate);
+ return Callable(code, LoadDescriptor(isolate));
}
@@ -77,10 +79,19 @@ Callable CodeFactory::StoreIC(Isolate* isolate, LanguageMode language_mode) {
// static
Callable CodeFactory::KeyedStoreIC(Isolate* isolate,
LanguageMode language_mode) {
- Handle<Code> ic = is_strict(language_mode)
- ? isolate->builtins()->KeyedStoreIC_Initialize_Strict()
- : isolate->builtins()->KeyedStoreIC_Initialize();
- return Callable(ic, StoreDescriptor(isolate));
+ return Callable(
+ KeyedStoreIC::initialize_stub(isolate, language_mode, UNINITIALIZED),
+ StoreDescriptor(isolate));
+}
+
+
+// static
+Callable CodeFactory::KeyedStoreICInOptimizedCode(
+ Isolate* isolate, LanguageMode language_mode,
+ InlineCacheState initialization_state) {
+ return Callable(KeyedStoreIC::initialize_stub(isolate, language_mode,
+ initialization_state),
+ StoreDescriptor(isolate));
}
« no previous file with comments | « src/code-factory.h ('k') | src/compiler/js-generic-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698