Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(167)

Side by Side Diff: src/compiler/code-stub-assembler.cc

Issue 1895093002: Create per-descriptor-index LoadApiGetterStub (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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-stub-assembler.h" 5 #include "src/compiler/code-stub-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 1522 matching lines...) Expand 10 before | Expand all | Expand 10 after
1533 } 1533 }
1534 1534
1535 Node* CodeStubAssembler::TailCallStub(Callable const& callable, Node* context, 1535 Node* CodeStubAssembler::TailCallStub(Callable const& callable, Node* context,
1536 Node* arg1, Node* arg2, 1536 Node* arg1, Node* arg2,
1537 size_t result_size) { 1537 size_t result_size) {
1538 Node* target = HeapConstant(callable.code()); 1538 Node* target = HeapConstant(callable.code());
1539 return TailCallStub(callable.descriptor(), target, context, arg1, arg2, 1539 return TailCallStub(callable.descriptor(), target, context, arg1, arg2,
1540 result_size); 1540 result_size);
1541 } 1541 }
1542 1542
1543 Node* CodeStubAssembler::TailCallStub(Callable const& callable, Node* context,
1544 Node* arg1, Node* arg2, Node* arg3,
1545 size_t result_size) {
1546 Node* target = HeapConstant(callable.code());
1547 return TailCallStub(callable.descriptor(), target, context, arg1, arg2, arg3,
1548 result_size);
1549 }
1550
1543 Node* CodeStubAssembler::TailCallStub(const CallInterfaceDescriptor& descriptor, 1551 Node* CodeStubAssembler::TailCallStub(const CallInterfaceDescriptor& descriptor,
1544 Node* target, Node* context, Node* arg1, 1552 Node* target, Node* context, Node* arg1,
1545 Node* arg2, size_t result_size) { 1553 Node* arg2, size_t result_size) {
1546 CallDescriptor* call_descriptor = Linkage::GetStubCallDescriptor( 1554 CallDescriptor* call_descriptor = Linkage::GetStubCallDescriptor(
1547 isolate(), zone(), descriptor, descriptor.GetStackParameterCount(), 1555 isolate(), zone(), descriptor, descriptor.GetStackParameterCount(),
1548 CallDescriptor::kSupportsTailCalls, Operator::kNoProperties, 1556 CallDescriptor::kSupportsTailCalls, Operator::kNoProperties,
1549 MachineType::AnyTagged(), result_size); 1557 MachineType::AnyTagged(), result_size);
1550 1558
1551 Node** args = zone()->NewArray<Node*>(3); 1559 Node** args = zone()->NewArray<Node*>(3);
1552 args[0] = arg1; 1560 args[0] = arg1;
1553 args[1] = arg2; 1561 args[1] = arg2;
1554 args[2] = context; 1562 args[2] = context;
1555 1563
1556 return raw_assembler_->TailCallN(call_descriptor, target, args); 1564 return raw_assembler_->TailCallN(call_descriptor, target, args);
1557 } 1565 }
1558 1566
1567 Node* CodeStubAssembler::TailCallStub(const CallInterfaceDescriptor& descriptor,
1568 Node* target, Node* context, Node* arg1,
1569 Node* arg2, Node* arg3,
1570 size_t result_size) {
1571 CallDescriptor* call_descriptor = Linkage::GetStubCallDescriptor(
1572 isolate(), zone(), descriptor, descriptor.GetStackParameterCount(),
1573 CallDescriptor::kSupportsTailCalls, Operator::kNoProperties,
1574 MachineType::AnyTagged(), result_size);
1575
1576 Node** args = zone()->NewArray<Node*>(4);
1577 args[0] = arg1;
1578 args[1] = arg2;
1579 args[2] = arg3;
1580 args[3] = context;
1581
1582 return raw_assembler_->TailCallN(call_descriptor, target, args);
1583 }
1584
1559 Node* CodeStubAssembler::TailCallBytecodeDispatch( 1585 Node* CodeStubAssembler::TailCallBytecodeDispatch(
1560 const CallInterfaceDescriptor& interface_descriptor, 1586 const CallInterfaceDescriptor& interface_descriptor,
1561 Node* code_target_address, Node** args) { 1587 Node* code_target_address, Node** args) {
1562 CallDescriptor* descriptor = Linkage::GetBytecodeDispatchCallDescriptor( 1588 CallDescriptor* descriptor = Linkage::GetBytecodeDispatchCallDescriptor(
1563 isolate(), zone(), interface_descriptor, 1589 isolate(), zone(), interface_descriptor,
1564 interface_descriptor.GetStackParameterCount()); 1590 interface_descriptor.GetStackParameterCount());
1565 return raw_assembler_->TailCallN(descriptor, code_target_address, args); 1591 return raw_assembler_->TailCallN(descriptor, code_target_address, args);
1566 } 1592 }
1567 1593
1568 void CodeStubAssembler::Goto(CodeStubAssembler::Label* label) { 1594 void CodeStubAssembler::Goto(CodeStubAssembler::Label* label) {
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
1761 } 1787 }
1762 } 1788 }
1763 } 1789 }
1764 1790
1765 bound_ = true; 1791 bound_ = true;
1766 } 1792 }
1767 1793
1768 } // namespace compiler 1794 } // namespace compiler
1769 } // namespace internal 1795 } // namespace internal
1770 } // namespace v8 1796 } // namespace v8
OLDNEW
« src/code-stubs.h ('K') | « src/compiler/code-stub-assembler.h ('k') | src/ic/ic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698