OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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/compiler/code-assembler.h" | 5 #include "src/compiler/code-assembler.h" |
6 | 6 |
7 #include <ostream> | 7 #include <ostream> |
8 | 8 |
9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" |
10 #include "src/compiler/graph.h" | 10 #include "src/compiler/graph.h" |
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
408 } | 408 } |
409 | 409 |
410 Node* CodeAssembler::CallStub(Callable const& callable, Node* context, | 410 Node* CodeAssembler::CallStub(Callable const& callable, Node* context, |
411 Node* arg1, Node* arg2, Node* arg3, | 411 Node* arg1, Node* arg2, Node* arg3, |
412 size_t result_size) { | 412 size_t result_size) { |
413 Node* target = HeapConstant(callable.code()); | 413 Node* target = HeapConstant(callable.code()); |
414 return CallStub(callable.descriptor(), target, context, arg1, arg2, arg3, | 414 return CallStub(callable.descriptor(), target, context, arg1, arg2, arg3, |
415 result_size); | 415 result_size); |
416 } | 416 } |
417 | 417 |
| 418 Node* CodeAssembler::CallStubN(Callable const& callable, Node** args, |
| 419 size_t result_size) { |
| 420 Node* target = HeapConstant(callable.code()); |
| 421 return CallStubN(callable.descriptor(), target, args, result_size); |
| 422 } |
| 423 |
418 Node* CodeAssembler::CallStub(const CallInterfaceDescriptor& descriptor, | 424 Node* CodeAssembler::CallStub(const CallInterfaceDescriptor& descriptor, |
419 Node* target, Node* context, Node* arg1, | 425 Node* target, Node* context, Node* arg1, |
420 size_t result_size) { | 426 size_t result_size) { |
421 CallDescriptor* call_descriptor = Linkage::GetStubCallDescriptor( | 427 CallDescriptor* call_descriptor = Linkage::GetStubCallDescriptor( |
422 isolate(), zone(), descriptor, descriptor.GetStackParameterCount(), | 428 isolate(), zone(), descriptor, descriptor.GetStackParameterCount(), |
423 CallDescriptor::kNoFlags, Operator::kNoProperties, | 429 CallDescriptor::kNoFlags, Operator::kNoProperties, |
424 MachineType::AnyTagged(), result_size); | 430 MachineType::AnyTagged(), result_size); |
425 | 431 |
426 Node** args = zone()->NewArray<Node*>(2); | 432 Node** args = zone()->NewArray<Node*>(2); |
427 args[0] = arg1; | 433 args[0] = arg1; |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
495 args[0] = arg1; | 501 args[0] = arg1; |
496 args[1] = arg2; | 502 args[1] = arg2; |
497 args[2] = arg3; | 503 args[2] = arg3; |
498 args[3] = arg4; | 504 args[3] = arg4; |
499 args[4] = arg5; | 505 args[4] = arg5; |
500 args[5] = context; | 506 args[5] = context; |
501 | 507 |
502 return CallN(call_descriptor, target, args); | 508 return CallN(call_descriptor, target, args); |
503 } | 509 } |
504 | 510 |
| 511 Node* CodeAssembler::CallStubN(const CallInterfaceDescriptor& descriptor, |
| 512 Node* target, Node** args, size_t result_size) { |
| 513 CallDescriptor* call_descriptor = Linkage::GetStubCallDescriptor( |
| 514 isolate(), zone(), descriptor, descriptor.GetStackParameterCount(), |
| 515 CallDescriptor::kNoFlags, Operator::kNoProperties, |
| 516 MachineType::AnyTagged(), result_size); |
| 517 |
| 518 return CallN(call_descriptor, target, args); |
| 519 } |
| 520 |
505 Node* CodeAssembler::TailCallStub(Callable const& callable, Node* context, | 521 Node* CodeAssembler::TailCallStub(Callable const& callable, Node* context, |
506 Node* arg1, Node* arg2, size_t result_size) { | 522 Node* arg1, Node* arg2, size_t result_size) { |
507 Node* target = HeapConstant(callable.code()); | 523 Node* target = HeapConstant(callable.code()); |
508 return TailCallStub(callable.descriptor(), target, context, arg1, arg2, | 524 return TailCallStub(callable.descriptor(), target, context, arg1, arg2, |
509 result_size); | 525 result_size); |
510 } | 526 } |
511 | 527 |
512 Node* CodeAssembler::TailCallStub(Callable const& callable, Node* context, | 528 Node* CodeAssembler::TailCallStub(Callable const& callable, Node* context, |
513 Node* arg1, Node* arg2, Node* arg3, | 529 Node* arg1, Node* arg2, Node* arg3, |
514 size_t result_size) { | 530 size_t result_size) { |
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
832 } | 848 } |
833 } | 849 } |
834 } | 850 } |
835 | 851 |
836 bound_ = true; | 852 bound_ = true; |
837 } | 853 } |
838 | 854 |
839 } // namespace compiler | 855 } // namespace compiler |
840 } // namespace internal | 856 } // namespace internal |
841 } // namespace v8 | 857 } // namespace v8 |
OLD | NEW |