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

Side by Side 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, 9 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
(...skipping 22 matching lines...) Expand all
33 33
34 34
35 // static 35 // static
36 Callable CodeFactory::KeyedLoadIC(Isolate* isolate) { 36 Callable CodeFactory::KeyedLoadIC(Isolate* isolate) {
37 return Callable(KeyedLoadIC::initialize_stub(isolate), 37 return Callable(KeyedLoadIC::initialize_stub(isolate),
38 LoadDescriptor(isolate)); 38 LoadDescriptor(isolate));
39 } 39 }
40 40
41 41
42 // static 42 // static
43 Callable CodeFactory::KeyedLoadICInOptimizedCode(Isolate* isolate) { 43 Callable CodeFactory::KeyedLoadICInOptimizedCode(
44 Isolate* isolate, InlineCacheState initialization_state) {
45 auto code = KeyedLoadIC::initialize_stub_in_optimized_code(
46 isolate, initialization_state);
44 if (FLAG_vector_ics) { 47 if (FLAG_vector_ics) {
45 return Callable(KeyedLoadIC::initialize_stub_in_optimized_code(isolate), 48 return Callable(code, VectorLoadICDescriptor(isolate));
46 VectorLoadICDescriptor(isolate));
47 } 49 }
48 return CodeFactory::KeyedLoadIC(isolate); 50 return Callable(code, LoadDescriptor(isolate));
49 } 51 }
50 52
51 53
52 // static 54 // static
53 Callable CodeFactory::CallIC(Isolate* isolate, int argc, 55 Callable CodeFactory::CallIC(Isolate* isolate, int argc,
54 CallICState::CallType call_type) { 56 CallICState::CallType call_type) {
55 return Callable(CallIC::initialize_stub(isolate, argc, call_type), 57 return Callable(CallIC::initialize_stub(isolate, argc, call_type),
56 CallFunctionWithFeedbackDescriptor(isolate)); 58 CallFunctionWithFeedbackDescriptor(isolate));
57 } 59 }
58 60
(...skipping 11 matching lines...) Expand all
70 Callable CodeFactory::StoreIC(Isolate* isolate, LanguageMode language_mode) { 72 Callable CodeFactory::StoreIC(Isolate* isolate, LanguageMode language_mode) {
71 return Callable( 73 return Callable(
72 StoreIC::initialize_stub(isolate, language_mode, UNINITIALIZED), 74 StoreIC::initialize_stub(isolate, language_mode, UNINITIALIZED),
73 StoreDescriptor(isolate)); 75 StoreDescriptor(isolate));
74 } 76 }
75 77
76 78
77 // static 79 // static
78 Callable CodeFactory::KeyedStoreIC(Isolate* isolate, 80 Callable CodeFactory::KeyedStoreIC(Isolate* isolate,
79 LanguageMode language_mode) { 81 LanguageMode language_mode) {
80 Handle<Code> ic = is_strict(language_mode) 82 return Callable(
81 ? isolate->builtins()->KeyedStoreIC_Initialize_Strict() 83 KeyedStoreIC::initialize_stub(isolate, language_mode, UNINITIALIZED),
82 : isolate->builtins()->KeyedStoreIC_Initialize(); 84 StoreDescriptor(isolate));
83 return Callable(ic, StoreDescriptor(isolate));
84 } 85 }
85 86
86 87
88 // static
89 Callable CodeFactory::KeyedStoreICInOptimizedCode(
90 Isolate* isolate, LanguageMode language_mode,
91 InlineCacheState initialization_state) {
92 return Callable(KeyedStoreIC::initialize_stub(isolate, language_mode,
93 initialization_state),
94 StoreDescriptor(isolate));
95 }
96
97
87 // static 98 // static
88 Callable CodeFactory::CompareIC(Isolate* isolate, Token::Value op) { 99 Callable CodeFactory::CompareIC(Isolate* isolate, Token::Value op) {
89 Handle<Code> code = CompareIC::GetUninitialized(isolate, op); 100 Handle<Code> code = CompareIC::GetUninitialized(isolate, op);
90 return Callable(code, BinaryOpDescriptor(isolate)); 101 return Callable(code, BinaryOpDescriptor(isolate));
91 } 102 }
92 103
93 104
94 // static 105 // static
95 Callable CodeFactory::BinaryOpIC(Isolate* isolate, Token::Value op) { 106 Callable CodeFactory::BinaryOpIC(Isolate* isolate, Token::Value op) {
96 BinaryOpICStub stub(isolate, op); 107 BinaryOpICStub stub(isolate, op);
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 142
132 // static 143 // static
133 Callable CodeFactory::CallFunction(Isolate* isolate, int argc, 144 Callable CodeFactory::CallFunction(Isolate* isolate, int argc,
134 CallFunctionFlags flags) { 145 CallFunctionFlags flags) {
135 CallFunctionStub stub(isolate, argc, flags); 146 CallFunctionStub stub(isolate, argc, flags);
136 return Callable(stub.GetCode(), stub.GetCallInterfaceDescriptor()); 147 return Callable(stub.GetCode(), stub.GetCallInterfaceDescriptor());
137 } 148 }
138 149
139 } // namespace internal 150 } // namespace internal
140 } // namespace v8 151 } // 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