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 // static | 14 // static |
| 15 Callable CodeFactory::LoadGlobalIC(Isolate* isolate, |
| 16 Handle<GlobalObject> global, |
| 17 Handle<String> name) { |
| 18 return Callable(LoadIC::load_global(isolate, global, name), |
| 19 LoadDescriptor(isolate)); |
| 20 } |
| 21 |
| 22 |
| 23 // static |
15 Callable CodeFactory::LoadIC(Isolate* isolate, ContextualMode mode) { | 24 Callable CodeFactory::LoadIC(Isolate* isolate, ContextualMode mode) { |
16 return Callable( | 25 return Callable( |
17 LoadIC::initialize_stub(isolate, LoadICState(mode).GetExtraICState()), | 26 LoadIC::initialize_stub(isolate, LoadICState(mode).GetExtraICState()), |
18 LoadDescriptor(isolate)); | 27 LoadDescriptor(isolate)); |
19 } | 28 } |
20 | 29 |
21 | 30 |
22 // static | 31 // static |
23 Callable CodeFactory::LoadICInOptimizedCode( | 32 Callable CodeFactory::LoadICInOptimizedCode( |
24 Isolate* isolate, ContextualMode mode, | 33 Isolate* isolate, ContextualMode mode, |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 | 151 |
143 // static | 152 // static |
144 Callable CodeFactory::CallFunction(Isolate* isolate, int argc, | 153 Callable CodeFactory::CallFunction(Isolate* isolate, int argc, |
145 CallFunctionFlags flags) { | 154 CallFunctionFlags flags) { |
146 CallFunctionStub stub(isolate, argc, flags); | 155 CallFunctionStub stub(isolate, argc, flags); |
147 return Callable(stub.GetCode(), stub.GetCallInterfaceDescriptor()); | 156 return Callable(stub.GetCode(), stub.GetCallInterfaceDescriptor()); |
148 } | 157 } |
149 | 158 |
150 } // namespace internal | 159 } // namespace internal |
151 } // namespace v8 | 160 } // namespace v8 |
OLD | NEW |