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 |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 return Callable(KeyedLoadIC::initialize_stub(isolate), | 46 return Callable(KeyedLoadIC::initialize_stub(isolate), |
47 LoadDescriptor(isolate)); | 47 LoadDescriptor(isolate)); |
48 } | 48 } |
49 | 49 |
50 | 50 |
51 // static | 51 // static |
52 Callable CodeFactory::KeyedLoadICInOptimizedCode( | 52 Callable CodeFactory::KeyedLoadICInOptimizedCode( |
53 Isolate* isolate, InlineCacheState initialization_state) { | 53 Isolate* isolate, InlineCacheState initialization_state) { |
54 auto code = KeyedLoadIC::initialize_stub_in_optimized_code( | 54 auto code = KeyedLoadIC::initialize_stub_in_optimized_code( |
55 isolate, initialization_state); | 55 isolate, initialization_state); |
56 if (FLAG_vector_ics && initialization_state != MEGAMORPHIC) { | 56 if (FLAG_vector_ics) { |
57 return Callable(code, VectorLoadICDescriptor(isolate)); | 57 return Callable(code, VectorLoadICDescriptor(isolate)); |
58 } | 58 } |
59 return Callable(code, LoadDescriptor(isolate)); | 59 return Callable(code, LoadDescriptor(isolate)); |
60 } | 60 } |
61 | 61 |
62 | 62 |
63 // static | 63 // static |
64 Callable CodeFactory::CallIC(Isolate* isolate, int argc, | 64 Callable CodeFactory::CallIC(Isolate* isolate, int argc, |
65 CallICState::CallType call_type) { | 65 CallICState::CallType call_type) { |
66 return Callable(CallIC::initialize_stub(isolate, argc, call_type), | 66 return Callable(CallIC::initialize_stub(isolate, argc, call_type), |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 | 151 |
152 // static | 152 // static |
153 Callable CodeFactory::CallFunction(Isolate* isolate, int argc, | 153 Callable CodeFactory::CallFunction(Isolate* isolate, int argc, |
154 CallFunctionFlags flags) { | 154 CallFunctionFlags flags) { |
155 CallFunctionStub stub(isolate, argc, flags); | 155 CallFunctionStub stub(isolate, argc, flags); |
156 return Callable(stub.GetCode(), stub.GetCallInterfaceDescriptor()); | 156 return Callable(stub.GetCode(), stub.GetCallInterfaceDescriptor()); |
157 } | 157 } |
158 | 158 |
159 } // namespace internal | 159 } // namespace internal |
160 } // namespace v8 | 160 } // namespace v8 |
OLD | NEW |