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 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
430 result_size); | 430 result_size); |
431 } | 431 } |
432 | 432 |
433 Node* CodeAssembler::CallStubN(Callable const& callable, Node** args, | 433 Node* CodeAssembler::CallStubN(Callable const& callable, Node** args, |
434 size_t result_size) { | 434 size_t result_size) { |
435 Node* target = HeapConstant(callable.code()); | 435 Node* target = HeapConstant(callable.code()); |
436 return CallStubN(callable.descriptor(), target, args, result_size); | 436 return CallStubN(callable.descriptor(), target, args, result_size); |
437 } | 437 } |
438 | 438 |
439 Node* CodeAssembler::CallStub(const CallInterfaceDescriptor& descriptor, | 439 Node* CodeAssembler::CallStub(const CallInterfaceDescriptor& descriptor, |
440 Node* target, Node* context, size_t result_size) { | |
441 CallDescriptor* call_descriptor = Linkage::GetStubCallDescriptor( | |
442 isolate(), zone(), descriptor, descriptor.GetStackParameterCount(), | |
443 CallDescriptor::kNoFlags, Operator::kNoProperties, | |
444 MachineType::AnyTagged(), result_size); | |
445 | |
446 Node** args = zone()->NewArray<Node*>(1); | |
447 args[0] = context; | |
448 | |
449 return CallN(call_descriptor, target, args); | |
450 } | |
451 | |
452 Node* CodeAssembler::CallStub(const CallInterfaceDescriptor& descriptor, | |
453 Node* target, Node* context, Node* arg1, | 440 Node* target, Node* context, Node* arg1, |
454 size_t result_size) { | 441 size_t result_size) { |
455 CallDescriptor* call_descriptor = Linkage::GetStubCallDescriptor( | 442 CallDescriptor* call_descriptor = Linkage::GetStubCallDescriptor( |
456 isolate(), zone(), descriptor, descriptor.GetStackParameterCount(), | 443 isolate(), zone(), descriptor, descriptor.GetStackParameterCount(), |
457 CallDescriptor::kNoFlags, Operator::kNoProperties, | 444 CallDescriptor::kNoFlags, Operator::kNoProperties, |
458 MachineType::AnyTagged(), result_size); | 445 MachineType::AnyTagged(), result_size); |
459 | 446 |
460 Node** args = zone()->NewArray<Node*>(2); | 447 Node** args = zone()->NewArray<Node*>(2); |
461 args[0] = arg1; | 448 args[0] = arg1; |
462 args[1] = context; | 449 args[1] = context; |
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
919 } | 906 } |
920 } | 907 } |
921 } | 908 } |
922 | 909 |
923 bound_ = true; | 910 bound_ = true; |
924 } | 911 } |
925 | 912 |
926 } // namespace compiler | 913 } // namespace compiler |
927 } // namespace internal | 914 } // namespace internal |
928 } // namespace v8 | 915 } // namespace v8 |
OLD | NEW |