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

Side by Side Diff: src/ppc/lithium-ppc.h

Issue 1218463004: PPC: Make context register implicit for CallInterfaceDescriptors (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 5 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
« no previous file with comments | « src/ppc/interface-descriptors-ppc.cc ('k') | src/ppc/lithium-ppc.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifndef V8_PPC_LITHIUM_PPC_H_ 5 #ifndef V8_PPC_LITHIUM_PPC_H_
6 #define V8_PPC_LITHIUM_PPC_H_ 6 #define V8_PPC_LITHIUM_PPC_H_
7 7
8 #include "src/hydrogen.h" 8 #include "src/hydrogen.h"
9 #include "src/lithium.h" 9 #include "src/lithium.h"
10 #include "src/lithium-allocator.h" 10 #include "src/lithium-allocator.h"
(...skipping 1759 matching lines...) Expand 10 before | Expand all | Expand 10 after
1770 1770
1771 int arity() const { return hydrogen()->argument_count() - 1; } 1771 int arity() const { return hydrogen()->argument_count() - 1; }
1772 }; 1772 };
1773 1773
1774 1774
1775 class LCallWithDescriptor final : public LTemplateResultInstruction<1> { 1775 class LCallWithDescriptor final : public LTemplateResultInstruction<1> {
1776 public: 1776 public:
1777 LCallWithDescriptor(CallInterfaceDescriptor descriptor, 1777 LCallWithDescriptor(CallInterfaceDescriptor descriptor,
1778 const ZoneList<LOperand*>& operands, Zone* zone) 1778 const ZoneList<LOperand*>& operands, Zone* zone)
1779 : descriptor_(descriptor), 1779 : descriptor_(descriptor),
1780 inputs_(descriptor.GetRegisterParameterCount() + 1, zone) { 1780 inputs_(descriptor.GetRegisterParameterCount() +
1781 DCHECK(descriptor.GetRegisterParameterCount() + 1 == operands.length()); 1781 kImplicitRegisterParameterCount,
1782 zone) {
1783 DCHECK(descriptor.GetRegisterParameterCount() +
1784 kImplicitRegisterParameterCount ==
1785 operands.length());
1782 inputs_.AddAll(operands, zone); 1786 inputs_.AddAll(operands, zone);
1783 } 1787 }
1784 1788
1785 LOperand* target() const { return inputs_[0]; } 1789 LOperand* target() const { return inputs_[0]; }
1786 1790
1787 const CallInterfaceDescriptor descriptor() { return descriptor_; } 1791 const CallInterfaceDescriptor descriptor() { return descriptor_; }
1788 1792
1789 DECLARE_HYDROGEN_ACCESSOR(CallWithDescriptor) 1793 DECLARE_HYDROGEN_ACCESSOR(CallWithDescriptor)
1790 1794
1795 // The target and context are passed as implicit parameters that are not
1796 // explicitly listed in the descriptor.
1797 static const int kImplicitRegisterParameterCount = 2;
1798
1791 private: 1799 private:
1792 DECLARE_CONCRETE_INSTRUCTION(CallWithDescriptor, "call-with-descriptor") 1800 DECLARE_CONCRETE_INSTRUCTION(CallWithDescriptor, "call-with-descriptor")
1793 1801
1794 void PrintDataTo(StringStream* stream) override; 1802 void PrintDataTo(StringStream* stream) override;
1795 1803
1796 int arity() const { return hydrogen()->argument_count() - 1; } 1804 int arity() const { return hydrogen()->argument_count() - 1; }
1797 1805
1798 CallInterfaceDescriptor descriptor_; 1806 CallInterfaceDescriptor descriptor_;
1799 ZoneList<LOperand*> inputs_; 1807 ZoneList<LOperand*> inputs_;
1800 1808
(...skipping 955 matching lines...) Expand 10 before | Expand all | Expand 10 after
2756 2764
2757 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 2765 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
2758 }; 2766 };
2759 2767
2760 #undef DECLARE_HYDROGEN_ACCESSOR 2768 #undef DECLARE_HYDROGEN_ACCESSOR
2761 #undef DECLARE_CONCRETE_INSTRUCTION 2769 #undef DECLARE_CONCRETE_INSTRUCTION
2762 } 2770 }
2763 } // namespace v8::internal 2771 } // namespace v8::internal
2764 2772
2765 #endif // V8_PPC_LITHIUM_PPC_H_ 2773 #endif // V8_PPC_LITHIUM_PPC_H_
OLDNEW
« no previous file with comments | « src/ppc/interface-descriptors-ppc.cc ('k') | src/ppc/lithium-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698