OLD | NEW |
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/code-factory.h" | 5 #include "src/code-factory.h" |
6 | 6 |
7 #include "src/bootstrapper.h" | 7 #include "src/bootstrapper.h" |
8 #include "src/ic/ic.h" | 8 #include "src/ic/ic.h" |
9 | 9 |
10 namespace v8 { | 10 namespace v8 { |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 return Callable( | 71 return Callable( |
72 CallIC::initialize_stub_in_optimized_code(isolate, argc, mode), | 72 CallIC::initialize_stub_in_optimized_code(isolate, argc, mode), |
73 CallFunctionWithFeedbackAndVectorDescriptor(isolate)); | 73 CallFunctionWithFeedbackAndVectorDescriptor(isolate)); |
74 } | 74 } |
75 | 75 |
76 | 76 |
77 // static | 77 // static |
78 Callable CodeFactory::StoreIC(Isolate* isolate, LanguageMode language_mode) { | 78 Callable CodeFactory::StoreIC(Isolate* isolate, LanguageMode language_mode) { |
79 return Callable( | 79 return Callable( |
80 StoreIC::initialize_stub(isolate, language_mode, UNINITIALIZED), | 80 StoreIC::initialize_stub(isolate, language_mode, UNINITIALIZED), |
81 FLAG_vector_stores ? VectorStoreICTrampolineDescriptor(isolate) | 81 VectorStoreICTrampolineDescriptor(isolate)); |
82 : StoreDescriptor(isolate)); | |
83 } | 82 } |
84 | 83 |
85 | 84 |
86 // static | 85 // static |
87 Callable CodeFactory::StoreICInOptimizedCode( | 86 Callable CodeFactory::StoreICInOptimizedCode( |
88 Isolate* isolate, LanguageMode language_mode, | 87 Isolate* isolate, LanguageMode language_mode, |
89 InlineCacheState initialization_state) { | 88 InlineCacheState initialization_state) { |
90 CallInterfaceDescriptor descriptor = | 89 CallInterfaceDescriptor descriptor = initialization_state != MEGAMORPHIC |
91 FLAG_vector_stores && initialization_state != MEGAMORPHIC | 90 ? VectorStoreICDescriptor(isolate) |
92 ? VectorStoreICDescriptor(isolate) | 91 : StoreDescriptor(isolate); |
93 : StoreDescriptor(isolate); | |
94 return Callable(StoreIC::initialize_stub_in_optimized_code( | 92 return Callable(StoreIC::initialize_stub_in_optimized_code( |
95 isolate, language_mode, initialization_state), | 93 isolate, language_mode, initialization_state), |
96 descriptor); | 94 descriptor); |
97 } | 95 } |
98 | 96 |
99 | 97 |
100 // static | 98 // static |
101 Callable CodeFactory::KeyedStoreIC(Isolate* isolate, | 99 Callable CodeFactory::KeyedStoreIC(Isolate* isolate, |
102 LanguageMode language_mode) { | 100 LanguageMode language_mode) { |
103 return Callable( | 101 return Callable( |
104 KeyedStoreIC::initialize_stub(isolate, language_mode, UNINITIALIZED), | 102 KeyedStoreIC::initialize_stub(isolate, language_mode, UNINITIALIZED), |
105 FLAG_vector_stores ? VectorStoreICTrampolineDescriptor(isolate) | 103 VectorStoreICTrampolineDescriptor(isolate)); |
106 : StoreDescriptor(isolate)); | |
107 } | 104 } |
108 | 105 |
109 | 106 |
110 // static | 107 // static |
111 Callable CodeFactory::KeyedStoreICInOptimizedCode( | 108 Callable CodeFactory::KeyedStoreICInOptimizedCode( |
112 Isolate* isolate, LanguageMode language_mode, | 109 Isolate* isolate, LanguageMode language_mode, |
113 InlineCacheState initialization_state) { | 110 InlineCacheState initialization_state) { |
114 CallInterfaceDescriptor descriptor = | 111 CallInterfaceDescriptor descriptor = initialization_state != MEGAMORPHIC |
115 FLAG_vector_stores && initialization_state != MEGAMORPHIC | 112 ? VectorStoreICDescriptor(isolate) |
116 ? VectorStoreICDescriptor(isolate) | 113 : StoreDescriptor(isolate); |
117 : StoreDescriptor(isolate); | |
118 return Callable(KeyedStoreIC::initialize_stub_in_optimized_code( | 114 return Callable(KeyedStoreIC::initialize_stub_in_optimized_code( |
119 isolate, language_mode, initialization_state), | 115 isolate, language_mode, initialization_state), |
120 descriptor); | 116 descriptor); |
121 } | 117 } |
122 | 118 |
123 | 119 |
124 // static | 120 // static |
125 Callable CodeFactory::CompareIC(Isolate* isolate, Token::Value op, | 121 Callable CodeFactory::CompareIC(Isolate* isolate, Token::Value op, |
126 Strength strength) { | 122 Strength strength) { |
127 Handle<Code> code = CompareIC::GetUninitialized(isolate, op, strength); | 123 Handle<Code> code = CompareIC::GetUninitialized(isolate, op, strength); |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
326 Callable CodeFactory::InterpreterCEntry(Isolate* isolate) { | 322 Callable CodeFactory::InterpreterCEntry(Isolate* isolate) { |
327 // TODO(rmcilroy): Deal with runtime functions that return two values. | 323 // TODO(rmcilroy): Deal with runtime functions that return two values. |
328 // Note: If we ever use fpregs in the interpreter then we will need to | 324 // Note: If we ever use fpregs in the interpreter then we will need to |
329 // save fpregs too. | 325 // save fpregs too. |
330 CEntryStub stub(isolate, 1, kDontSaveFPRegs, kArgvInRegister); | 326 CEntryStub stub(isolate, 1, kDontSaveFPRegs, kArgvInRegister); |
331 return Callable(stub.GetCode(), InterpreterCEntryDescriptor(isolate)); | 327 return Callable(stub.GetCode(), InterpreterCEntryDescriptor(isolate)); |
332 } | 328 } |
333 | 329 |
334 } // namespace internal | 330 } // namespace internal |
335 } // namespace v8 | 331 } // namespace v8 |
OLD | NEW |