| 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 447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 458 CallTrampolineDescriptor(isolate)); | 458 CallTrampolineDescriptor(isolate)); |
| 459 } | 459 } |
| 460 | 460 |
| 461 // static | 461 // static |
| 462 Callable CodeFactory::Construct(Isolate* isolate) { | 462 Callable CodeFactory::Construct(Isolate* isolate) { |
| 463 return Callable(isolate->builtins()->Construct(), | 463 return Callable(isolate->builtins()->Construct(), |
| 464 ConstructTrampolineDescriptor(isolate)); | 464 ConstructTrampolineDescriptor(isolate)); |
| 465 } | 465 } |
| 466 | 466 |
| 467 // static | 467 // static |
| 468 Callable CodeFactory::ConstructWithSpread(Isolate* isolate) { |
| 469 return Callable(isolate->builtins()->ConstructWithSpread(), |
| 470 ConstructTrampolineDescriptor(isolate)); |
| 471 } |
| 472 |
| 473 // static |
| 468 Callable CodeFactory::ConstructFunction(Isolate* isolate) { | 474 Callable CodeFactory::ConstructFunction(Isolate* isolate) { |
| 469 return Callable(isolate->builtins()->ConstructFunction(), | 475 return Callable(isolate->builtins()->ConstructFunction(), |
| 470 ConstructTrampolineDescriptor(isolate)); | 476 ConstructTrampolineDescriptor(isolate)); |
| 471 } | 477 } |
| 472 | 478 |
| 473 // static | 479 // static |
| 474 Callable CodeFactory::InterpreterPushArgsAndCall(Isolate* isolate, | 480 Callable CodeFactory::InterpreterPushArgsAndCall(Isolate* isolate, |
| 475 TailCallMode tail_call_mode, | 481 TailCallMode tail_call_mode, |
| 476 CallableType function_type) { | 482 CallableType function_type) { |
| 477 return Callable(isolate->builtins()->InterpreterPushArgsAndCall( | 483 return Callable(isolate->builtins()->InterpreterPushArgsAndCall( |
| 478 tail_call_mode, function_type), | 484 tail_call_mode, function_type), |
| 479 InterpreterPushArgsAndCallDescriptor(isolate)); | 485 InterpreterPushArgsAndCallDescriptor(isolate)); |
| 480 } | 486 } |
| 481 | 487 |
| 482 // static | 488 // static |
| 483 Callable CodeFactory::InterpreterPushArgsAndConstruct( | 489 Callable CodeFactory::InterpreterPushArgsAndConstruct( |
| 484 Isolate* isolate, CallableType function_type) { | 490 Isolate* isolate, CallableType function_type) { |
| 485 return Callable( | 491 return Callable( |
| 486 isolate->builtins()->InterpreterPushArgsAndConstruct(function_type), | 492 isolate->builtins()->InterpreterPushArgsAndConstruct(function_type), |
| 487 InterpreterPushArgsAndConstructDescriptor(isolate)); | 493 InterpreterPushArgsAndConstructDescriptor(isolate)); |
| 488 } | 494 } |
| 489 | 495 |
| 490 // static | 496 // static |
| 491 Callable CodeFactory::InterpreterPushArgsAndConstructArray(Isolate* isolate) { | 497 Callable CodeFactory::InterpreterPushArgsAndConstructArray(Isolate* isolate) { |
| 492 return Callable(isolate->builtins()->InterpreterPushArgsAndConstructArray(), | 498 return Callable(isolate->builtins()->InterpreterPushArgsAndConstructArray(), |
| 493 InterpreterPushArgsAndConstructArrayDescriptor(isolate)); | 499 InterpreterPushArgsAndConstructArrayDescriptor(isolate)); |
| 494 } | 500 } |
| 495 | 501 |
| 496 // static | 502 // static |
| 503 Callable CodeFactory::InterpreterPushArgsAndConstructWithSpread( |
| 504 Isolate* isolate) { |
| 505 return Callable( |
| 506 isolate->builtins()->InterpreterPushArgsAndConstructWithSpread(), |
| 507 InterpreterPushArgsAndConstructDescriptor(isolate)); |
| 508 } |
| 509 |
| 510 // static |
| 497 Callable CodeFactory::InterpreterCEntry(Isolate* isolate, int result_size) { | 511 Callable CodeFactory::InterpreterCEntry(Isolate* isolate, int result_size) { |
| 498 // Note: If we ever use fpregs in the interpreter then we will need to | 512 // Note: If we ever use fpregs in the interpreter then we will need to |
| 499 // save fpregs too. | 513 // save fpregs too. |
| 500 CEntryStub stub(isolate, result_size, kDontSaveFPRegs, kArgvInRegister); | 514 CEntryStub stub(isolate, result_size, kDontSaveFPRegs, kArgvInRegister); |
| 501 return Callable(stub.GetCode(), InterpreterCEntryDescriptor(isolate)); | 515 return Callable(stub.GetCode(), InterpreterCEntryDescriptor(isolate)); |
| 502 } | 516 } |
| 503 | 517 |
| 504 // static | 518 // static |
| 505 Callable CodeFactory::InterpreterOnStackReplacement(Isolate* isolate) { | 519 Callable CodeFactory::InterpreterOnStackReplacement(Isolate* isolate) { |
| 506 return Callable(isolate->builtins()->InterpreterOnStackReplacement(), | 520 return Callable(isolate->builtins()->InterpreterOnStackReplacement(), |
| 507 ContextOnlyDescriptor(isolate)); | 521 ContextOnlyDescriptor(isolate)); |
| 508 } | 522 } |
| 509 | 523 |
| 510 // static | 524 // static |
| 511 Callable CodeFactory::ArrayPush(Isolate* isolate) { | 525 Callable CodeFactory::ArrayPush(Isolate* isolate) { |
| 512 return Callable(isolate->builtins()->ArrayPush(), BuiltinDescriptor(isolate)); | 526 return Callable(isolate->builtins()->ArrayPush(), BuiltinDescriptor(isolate)); |
| 513 } | 527 } |
| 514 | 528 |
| 515 // static | 529 // static |
| 516 Callable CodeFactory::FunctionPrototypeBind(Isolate* isolate) { | 530 Callable CodeFactory::FunctionPrototypeBind(Isolate* isolate) { |
| 517 return Callable(isolate->builtins()->FunctionPrototypeBind(), | 531 return Callable(isolate->builtins()->FunctionPrototypeBind(), |
| 518 BuiltinDescriptor(isolate)); | 532 BuiltinDescriptor(isolate)); |
| 519 } | 533 } |
| 520 | 534 |
| 521 } // namespace internal | 535 } // namespace internal |
| 522 } // namespace v8 | 536 } // namespace v8 |
| OLD | NEW |