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

Side by Side Diff: src/code-factory.cc

Issue 892383003: emit premonomorphic ics for loads/stores in optimized code (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase 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 unified diff | Download patch
« no previous file with comments | « src/code-factory.h ('k') | src/compiler/js-generic-lowering.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/bootstrapper.h" 7 #include "src/bootstrapper.h"
8 #include "src/code-factory.h" 8 #include "src/code-factory.h"
9 #include "src/ic/ic.h" 9 #include "src/ic/ic.h"
10 10
11 namespace v8 { 11 namespace v8 {
12 namespace internal { 12 namespace internal {
13 13
14 // static 14 // static
15 Callable CodeFactory::LoadIC(Isolate* isolate, ContextualMode mode) { 15 Callable CodeFactory::LoadIC(Isolate* isolate, ContextualMode mode) {
16 return Callable( 16 return Callable(
17 LoadIC::initialize_stub(isolate, LoadICState(mode).GetExtraICState()), 17 LoadIC::initialize_stub(isolate, LoadICState(mode).GetExtraICState()),
18 LoadDescriptor(isolate)); 18 LoadDescriptor(isolate));
19 } 19 }
20 20
21 21
22 // static 22 // static
23 Callable CodeFactory::LoadICInOptimizedCode(Isolate* isolate, 23 Callable CodeFactory::LoadICInOptimizedCode(
24 ContextualMode mode) { 24 Isolate* isolate, ContextualMode mode,
25 InlineCacheState initialization_state) {
26 auto code = LoadIC::initialize_stub_in_optimized_code(
27 isolate, LoadICState(mode).GetExtraICState(), initialization_state);
25 if (FLAG_vector_ics) { 28 if (FLAG_vector_ics) {
26 return Callable(LoadIC::initialize_stub_in_optimized_code( 29 return Callable(code, VectorLoadICDescriptor(isolate));
27 isolate, LoadICState(mode).GetExtraICState()),
28 VectorLoadICDescriptor(isolate));
29 } 30 }
30 return CodeFactory::LoadIC(isolate, mode); 31 return Callable(code, LoadDescriptor(isolate));
31 } 32 }
32 33
33 34
34 // static 35 // static
35 Callable CodeFactory::KeyedLoadIC(Isolate* isolate) { 36 Callable CodeFactory::KeyedLoadIC(Isolate* isolate) {
36 return Callable(KeyedLoadIC::initialize_stub(isolate), 37 return Callable(KeyedLoadIC::initialize_stub(isolate),
37 LoadDescriptor(isolate)); 38 LoadDescriptor(isolate));
38 } 39 }
39 40
40 41
(...skipping 19 matching lines...) Expand all
60 Callable CodeFactory::CallICInOptimizedCode(Isolate* isolate, int argc, 61 Callable CodeFactory::CallICInOptimizedCode(Isolate* isolate, int argc,
61 CallICState::CallType call_type) { 62 CallICState::CallType call_type) {
62 return Callable( 63 return Callable(
63 CallIC::initialize_stub_in_optimized_code(isolate, argc, call_type), 64 CallIC::initialize_stub_in_optimized_code(isolate, argc, call_type),
64 CallFunctionWithFeedbackAndVectorDescriptor(isolate)); 65 CallFunctionWithFeedbackAndVectorDescriptor(isolate));
65 } 66 }
66 67
67 68
68 // static 69 // static
69 Callable CodeFactory::StoreIC(Isolate* isolate, LanguageMode language_mode) { 70 Callable CodeFactory::StoreIC(Isolate* isolate, LanguageMode language_mode) {
70 return Callable(StoreIC::initialize_stub(isolate, language_mode), 71 return Callable(
71 StoreDescriptor(isolate)); 72 StoreIC::initialize_stub(isolate, language_mode, UNINITIALIZED),
73 StoreDescriptor(isolate));
72 } 74 }
73 75
74 76
75 // static 77 // static
76 Callable CodeFactory::KeyedStoreIC(Isolate* isolate, 78 Callable CodeFactory::KeyedStoreIC(Isolate* isolate,
77 LanguageMode language_mode) { 79 LanguageMode language_mode) {
78 Handle<Code> ic = is_strict(language_mode) 80 Handle<Code> ic = is_strict(language_mode)
79 ? isolate->builtins()->KeyedStoreIC_Initialize_Strict() 81 ? isolate->builtins()->KeyedStoreIC_Initialize_Strict()
80 : isolate->builtins()->KeyedStoreIC_Initialize(); 82 : isolate->builtins()->KeyedStoreIC_Initialize();
81 return Callable(ic, StoreDescriptor(isolate)); 83 return Callable(ic, StoreDescriptor(isolate));
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 131
130 // static 132 // static
131 Callable CodeFactory::CallFunction(Isolate* isolate, int argc, 133 Callable CodeFactory::CallFunction(Isolate* isolate, int argc,
132 CallFunctionFlags flags) { 134 CallFunctionFlags flags) {
133 CallFunctionStub stub(isolate, argc, flags); 135 CallFunctionStub stub(isolate, argc, flags);
134 return Callable(stub.GetCode(), stub.GetCallInterfaceDescriptor()); 136 return Callable(stub.GetCode(), stub.GetCallInterfaceDescriptor());
135 } 137 }
136 138
137 } // namespace internal 139 } // namespace internal
138 } // namespace v8 140 } // namespace v8
OLDNEW
« 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