| 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 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 298 | 298 |
| 299 | 299 |
| 300 // static | 300 // static |
| 301 Callable CodeFactory::CallFunction(Isolate* isolate, ConvertReceiverMode mode) { | 301 Callable CodeFactory::CallFunction(Isolate* isolate, ConvertReceiverMode mode) { |
| 302 return Callable(isolate->builtins()->CallFunction(mode), | 302 return Callable(isolate->builtins()->CallFunction(mode), |
| 303 CallTrampolineDescriptor(isolate)); | 303 CallTrampolineDescriptor(isolate)); |
| 304 } | 304 } |
| 305 | 305 |
| 306 | 306 |
| 307 // static | 307 // static |
| 308 Callable CodeFactory::Construct(Isolate* isolate) { |
| 309 return Callable(isolate->builtins()->Construct(), |
| 310 ConstructTrampolineDescriptor(isolate)); |
| 311 } |
| 312 |
| 313 |
| 314 // static |
| 308 Callable CodeFactory::InterpreterPushArgsAndCall(Isolate* isolate) { | 315 Callable CodeFactory::InterpreterPushArgsAndCall(Isolate* isolate) { |
| 309 return Callable(isolate->builtins()->InterpreterPushArgsAndCall(), | 316 return Callable(isolate->builtins()->InterpreterPushArgsAndCall(), |
| 310 InterpreterPushArgsAndCallDescriptor(isolate)); | 317 InterpreterPushArgsAndCallDescriptor(isolate)); |
| 311 } | 318 } |
| 312 | 319 |
| 313 | 320 |
| 314 // static | 321 // static |
| 315 Callable CodeFactory::InterpreterPushArgsAndConstruct(Isolate* isolate) { | 322 Callable CodeFactory::InterpreterPushArgsAndConstruct(Isolate* isolate) { |
| 316 return Callable(isolate->builtins()->InterpreterPushArgsAndConstruct(), | 323 return Callable(isolate->builtins()->InterpreterPushArgsAndConstruct(), |
| 317 InterpreterPushArgsAndConstructDescriptor(isolate)); | 324 InterpreterPushArgsAndConstructDescriptor(isolate)); |
| 318 } | 325 } |
| 319 | 326 |
| 320 | 327 |
| 321 // static | 328 // static |
| 322 Callable CodeFactory::InterpreterCEntry(Isolate* isolate) { | 329 Callable CodeFactory::InterpreterCEntry(Isolate* isolate) { |
| 323 // TODO(rmcilroy): Deal with runtime functions that return two values. | 330 // TODO(rmcilroy): Deal with runtime functions that return two values. |
| 324 // Note: If we ever use fpregs in the interpreter then we will need to | 331 // Note: If we ever use fpregs in the interpreter then we will need to |
| 325 // save fpregs too. | 332 // save fpregs too. |
| 326 CEntryStub stub(isolate, 1, kDontSaveFPRegs, kArgvInRegister); | 333 CEntryStub stub(isolate, 1, kDontSaveFPRegs, kArgvInRegister); |
| 327 return Callable(stub.GetCode(), InterpreterCEntryDescriptor(isolate)); | 334 return Callable(stub.GetCode(), InterpreterCEntryDescriptor(isolate)); |
| 328 } | 335 } |
| 329 | 336 |
| 330 } // namespace internal | 337 } // namespace internal |
| 331 } // namespace v8 | 338 } // namespace v8 |
| OLD | NEW |