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 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
254 | 254 |
255 | 255 |
256 // static | 256 // static |
257 Callable CodeFactory::AllocateHeapNumber(Isolate* isolate) { | 257 Callable CodeFactory::AllocateHeapNumber(Isolate* isolate) { |
258 AllocateHeapNumberStub stub(isolate); | 258 AllocateHeapNumberStub stub(isolate); |
259 return Callable(stub.GetCode(), stub.GetCallInterfaceDescriptor()); | 259 return Callable(stub.GetCode(), stub.GetCallInterfaceDescriptor()); |
260 } | 260 } |
261 | 261 |
262 | 262 |
263 // static | 263 // static |
| 264 Callable CodeFactory::AllocateInNewSpace(Isolate* isolate) { |
| 265 AllocateInNewSpaceStub stub(isolate); |
| 266 return Callable(stub.GetCode(), stub.GetCallInterfaceDescriptor()); |
| 267 } |
| 268 |
| 269 |
| 270 // static |
264 Callable CodeFactory::CallFunction(Isolate* isolate, int argc, | 271 Callable CodeFactory::CallFunction(Isolate* isolate, int argc, |
265 CallFunctionFlags flags) { | 272 CallFunctionFlags flags) { |
266 CallFunctionStub stub(isolate, argc, flags); | 273 CallFunctionStub stub(isolate, argc, flags); |
267 return Callable(stub.GetCode(), stub.GetCallInterfaceDescriptor()); | 274 return Callable(stub.GetCode(), stub.GetCallInterfaceDescriptor()); |
268 } | 275 } |
269 | 276 |
270 | 277 |
271 // static | 278 // static |
272 Callable CodeFactory::InterpreterPushArgsAndCall(Isolate* isolate) { | 279 Callable CodeFactory::InterpreterPushArgsAndCall(Isolate* isolate) { |
273 return Callable(isolate->builtins()->InterpreterPushArgsAndCall(), | 280 return Callable(isolate->builtins()->InterpreterPushArgsAndCall(), |
274 InterpreterPushArgsAndCallDescriptor(isolate)); | 281 InterpreterPushArgsAndCallDescriptor(isolate)); |
275 } | 282 } |
276 | 283 |
277 | 284 |
278 // static | 285 // static |
279 Callable CodeFactory::InterpreterCEntry(Isolate* isolate) { | 286 Callable CodeFactory::InterpreterCEntry(Isolate* isolate) { |
280 // TODO(rmcilroy): Deal with runtime functions that return two values. | 287 // TODO(rmcilroy): Deal with runtime functions that return two values. |
281 // Note: If we ever use fpregs in the interpreter then we will need to | 288 // Note: If we ever use fpregs in the interpreter then we will need to |
282 // save fpregs too. | 289 // save fpregs too. |
283 CEntryStub stub(isolate, 1, kDontSaveFPRegs, kArgvInRegister); | 290 CEntryStub stub(isolate, 1, kDontSaveFPRegs, kArgvInRegister); |
284 return Callable(stub.GetCode(), InterpreterCEntryDescriptor(isolate)); | 291 return Callable(stub.GetCode(), InterpreterCEntryDescriptor(isolate)); |
285 } | 292 } |
286 | 293 |
287 } // namespace internal | 294 } // namespace internal |
288 } // namespace v8 | 295 } // namespace v8 |
OLD | NEW |