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

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

Issue 1211333003: Make context register implicit for CallInterfaceDescriptors (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Platform ports 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
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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_MIPS_LITHIUM_MIPS_H_ 5 #ifndef V8_MIPS_LITHIUM_MIPS_H_
6 #define V8_MIPS_LITHIUM_MIPS_H_ 6 #define V8_MIPS_LITHIUM_MIPS_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 1792 matching lines...) Expand 10 before | Expand all | Expand 10 after
1803 1803
1804 int arity() const { return hydrogen()->argument_count() - 1; } 1804 int arity() const { return hydrogen()->argument_count() - 1; }
1805 }; 1805 };
1806 1806
1807 1807
1808 class LCallWithDescriptor final : public LTemplateResultInstruction<1> { 1808 class LCallWithDescriptor final : public LTemplateResultInstruction<1> {
1809 public: 1809 public:
1810 LCallWithDescriptor(CallInterfaceDescriptor descriptor, 1810 LCallWithDescriptor(CallInterfaceDescriptor descriptor,
1811 const ZoneList<LOperand*>& operands, Zone* zone) 1811 const ZoneList<LOperand*>& operands, Zone* zone)
1812 : descriptor_(descriptor), 1812 : descriptor_(descriptor),
1813 inputs_(descriptor.GetRegisterParameterCount() + 1, zone) { 1813 inputs_(descriptor.GetRegisterParameterCount() +
1814 DCHECK(descriptor.GetRegisterParameterCount() + 1 == operands.length()); 1814 kImplicitRegisterParameterCount,
1815 zone) {
1816 DCHECK(descriptor.GetRegisterParameterCount() +
1817 kImplicitRegisterParameterCount ==
1818 operands.length());
1815 inputs_.AddAll(operands, zone); 1819 inputs_.AddAll(operands, zone);
1816 } 1820 }
1817 1821
1818 LOperand* target() const { return inputs_[0]; } 1822 LOperand* target() const { return inputs_[0]; }
1819 1823
1820 const CallInterfaceDescriptor descriptor() { return descriptor_; } 1824 const CallInterfaceDescriptor descriptor() { return descriptor_; }
1821 1825
1822 DECLARE_HYDROGEN_ACCESSOR(CallWithDescriptor) 1826 DECLARE_HYDROGEN_ACCESSOR(CallWithDescriptor)
1823 1827
1828 // The target and context are passed as implicit parameters that are not
1829 // explicitly listed in the descriptor.
1830 static const int kImplicitRegisterParameterCount = 2;
1831
1824 private: 1832 private:
1825 DECLARE_CONCRETE_INSTRUCTION(CallWithDescriptor, "call-with-descriptor") 1833 DECLARE_CONCRETE_INSTRUCTION(CallWithDescriptor, "call-with-descriptor")
1826 1834
1827 void PrintDataTo(StringStream* stream) override; 1835 void PrintDataTo(StringStream* stream) override;
1828 1836
1829 int arity() const { return hydrogen()->argument_count() - 1; } 1837 int arity() const { return hydrogen()->argument_count() - 1; }
1830 1838
1831 CallInterfaceDescriptor descriptor_; 1839 CallInterfaceDescriptor descriptor_;
1832 ZoneList<LOperand*> inputs_; 1840 ZoneList<LOperand*> inputs_;
1833 1841
(...skipping 1008 matching lines...) Expand 10 before | Expand all | Expand 10 after
2842 2850
2843 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 2851 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
2844 }; 2852 };
2845 2853
2846 #undef DECLARE_HYDROGEN_ACCESSOR 2854 #undef DECLARE_HYDROGEN_ACCESSOR
2847 #undef DECLARE_CONCRETE_INSTRUCTION 2855 #undef DECLARE_CONCRETE_INSTRUCTION
2848 2856
2849 } } // namespace v8::internal 2857 } } // namespace v8::internal
2850 2858
2851 #endif // V8_MIPS_LITHIUM_MIPS_H_ 2859 #endif // V8_MIPS_LITHIUM_MIPS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698