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/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 | 14 |
15 // static | 15 // static |
16 Callable CodeFactory::LoadIC(Isolate* isolate, ContextualMode mode, | 16 Callable CodeFactory::LoadIC(Isolate* isolate, TypeofMode typeof_mode, |
17 LanguageMode language_mode) { | 17 LanguageMode language_mode) { |
18 return Callable( | 18 return Callable( |
19 LoadIC::initialize_stub( | 19 LoadIC::initialize_stub( |
20 isolate, LoadICState(mode, language_mode).GetExtraICState()), | 20 isolate, LoadICState(typeof_mode, language_mode).GetExtraICState()), |
21 LoadDescriptor(isolate)); | 21 LoadDescriptor(isolate)); |
22 } | 22 } |
23 | 23 |
24 | 24 |
25 // static | 25 // static |
26 Callable CodeFactory::LoadICInOptimizedCode( | 26 Callable CodeFactory::LoadICInOptimizedCode( |
27 Isolate* isolate, ContextualMode mode, LanguageMode language_mode, | 27 Isolate* isolate, TypeofMode typeof_mode, LanguageMode language_mode, |
28 InlineCacheState initialization_state) { | 28 InlineCacheState initialization_state) { |
29 auto code = LoadIC::initialize_stub_in_optimized_code( | 29 auto code = LoadIC::initialize_stub_in_optimized_code( |
30 isolate, LoadICState(mode, language_mode).GetExtraICState(), | 30 isolate, LoadICState(typeof_mode, language_mode).GetExtraICState(), |
31 initialization_state); | 31 initialization_state); |
32 return Callable(code, LoadWithVectorDescriptor(isolate)); | 32 return Callable(code, LoadWithVectorDescriptor(isolate)); |
33 } | 33 } |
34 | 34 |
35 | 35 |
36 // static | 36 // static |
37 Callable CodeFactory::KeyedLoadIC(Isolate* isolate, | 37 Callable CodeFactory::KeyedLoadIC(Isolate* isolate, |
38 LanguageMode language_mode) { | 38 LanguageMode language_mode) { |
39 ExtraICState state = is_strong(language_mode) ? LoadICState::kStrongModeState | 39 ExtraICState state = is_strong(language_mode) ? LoadICState::kStrongModeState |
40 : kNoExtraICState; | 40 : kNoExtraICState; |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
210 | 210 |
211 // static | 211 // static |
212 Callable CodeFactory::CallFunction(Isolate* isolate, int argc, | 212 Callable CodeFactory::CallFunction(Isolate* isolate, int argc, |
213 CallFunctionFlags flags) { | 213 CallFunctionFlags flags) { |
214 CallFunctionStub stub(isolate, argc, flags); | 214 CallFunctionStub stub(isolate, argc, flags); |
215 return Callable(stub.GetCode(), stub.GetCallInterfaceDescriptor()); | 215 return Callable(stub.GetCode(), stub.GetCallInterfaceDescriptor()); |
216 } | 216 } |
217 | 217 |
218 } // namespace internal | 218 } // namespace internal |
219 } // namespace v8 | 219 } // namespace v8 |
OLD | NEW |