| 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 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 289 | 289 |
| 290 // static | 290 // static |
| 291 Callable CodeFactory::CallFunction(Isolate* isolate, int argc, | 291 Callable CodeFactory::CallFunction(Isolate* isolate, int argc, |
| 292 CallFunctionFlags flags) { | 292 CallFunctionFlags flags) { |
| 293 CallFunctionStub stub(isolate, argc, flags); | 293 CallFunctionStub stub(isolate, argc, flags); |
| 294 return Callable(stub.GetCode(), stub.GetCallInterfaceDescriptor()); | 294 return Callable(stub.GetCode(), stub.GetCallInterfaceDescriptor()); |
| 295 } | 295 } |
| 296 | 296 |
| 297 | 297 |
| 298 // static | 298 // static |
| 299 Callable CodeFactory::ArgumentAdaptor(Isolate* isolate) { |
| 300 return Callable(isolate->builtins()->ArgumentsAdaptorTrampoline(), |
| 301 ArgumentAdaptorDescriptor(isolate)); |
| 302 } |
| 303 |
| 304 |
| 305 // static |
| 299 Callable CodeFactory::InterpreterPushArgsAndCall(Isolate* isolate) { | 306 Callable CodeFactory::InterpreterPushArgsAndCall(Isolate* isolate) { |
| 300 return Callable(isolate->builtins()->InterpreterPushArgsAndCall(), | 307 return Callable(isolate->builtins()->InterpreterPushArgsAndCall(), |
| 301 InterpreterPushArgsAndCallDescriptor(isolate)); | 308 InterpreterPushArgsAndCallDescriptor(isolate)); |
| 302 } | 309 } |
| 303 | 310 |
| 304 | 311 |
| 305 // static | 312 // static |
| 306 Callable CodeFactory::InterpreterPushArgsAndConstruct(Isolate* isolate) { | 313 Callable CodeFactory::InterpreterPushArgsAndConstruct(Isolate* isolate) { |
| 307 return Callable(isolate->builtins()->InterpreterPushArgsAndConstruct(), | 314 return Callable(isolate->builtins()->InterpreterPushArgsAndConstruct(), |
| 308 InterpreterPushArgsAndConstructDescriptor(isolate)); | 315 InterpreterPushArgsAndConstructDescriptor(isolate)); |
| 309 } | 316 } |
| 310 | 317 |
| 311 | 318 |
| 312 // static | 319 // static |
| 313 Callable CodeFactory::InterpreterCEntry(Isolate* isolate) { | 320 Callable CodeFactory::InterpreterCEntry(Isolate* isolate) { |
| 314 // TODO(rmcilroy): Deal with runtime functions that return two values. | 321 // TODO(rmcilroy): Deal with runtime functions that return two values. |
| 315 // Note: If we ever use fpregs in the interpreter then we will need to | 322 // Note: If we ever use fpregs in the interpreter then we will need to |
| 316 // save fpregs too. | 323 // save fpregs too. |
| 317 CEntryStub stub(isolate, 1, kDontSaveFPRegs, kArgvInRegister); | 324 CEntryStub stub(isolate, 1, kDontSaveFPRegs, kArgvInRegister); |
| 318 return Callable(stub.GetCode(), InterpreterCEntryDescriptor(isolate)); | 325 return Callable(stub.GetCode(), InterpreterCEntryDescriptor(isolate)); |
| 319 } | 326 } |
| 320 | 327 |
| 321 } // namespace internal | 328 } // namespace internal |
| 322 } // namespace v8 | 329 } // namespace v8 |
| OLD | NEW |