OLD | NEW |
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_X64_LITHIUM_X64_H_ | 5 #ifndef V8_X64_LITHIUM_X64_H_ |
6 #define V8_X64_LITHIUM_X64_H_ | 6 #define V8_X64_LITHIUM_X64_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 1820 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1831 void PrintDataTo(StringStream* stream) override; | 1831 void PrintDataTo(StringStream* stream) override; |
1832 | 1832 |
1833 int arity() const { return hydrogen()->argument_count() - 1; } | 1833 int arity() const { return hydrogen()->argument_count() - 1; } |
1834 }; | 1834 }; |
1835 | 1835 |
1836 | 1836 |
1837 class LCallWithDescriptor final : public LTemplateResultInstruction<1> { | 1837 class LCallWithDescriptor final : public LTemplateResultInstruction<1> { |
1838 public: | 1838 public: |
1839 LCallWithDescriptor(CallInterfaceDescriptor descriptor, | 1839 LCallWithDescriptor(CallInterfaceDescriptor descriptor, |
1840 const ZoneList<LOperand*>& operands, Zone* zone) | 1840 const ZoneList<LOperand*>& operands, Zone* zone) |
1841 : inputs_(descriptor.GetRegisterParameterCount() + 1, zone) { | 1841 : inputs_(descriptor.GetRegisterParameterCount() + |
1842 DCHECK(descriptor.GetRegisterParameterCount() + 1 == operands.length()); | 1842 kImplicitRegisterParameterCount, |
| 1843 zone) { |
| 1844 DCHECK(descriptor.GetRegisterParameterCount() + |
| 1845 kImplicitRegisterParameterCount == |
| 1846 operands.length()); |
1843 inputs_.AddAll(operands, zone); | 1847 inputs_.AddAll(operands, zone); |
1844 } | 1848 } |
1845 | 1849 |
1846 LOperand* target() const { return inputs_[0]; } | 1850 LOperand* target() const { return inputs_[0]; } |
1847 | 1851 |
1848 DECLARE_HYDROGEN_ACCESSOR(CallWithDescriptor) | 1852 DECLARE_HYDROGEN_ACCESSOR(CallWithDescriptor) |
1849 | 1853 |
| 1854 // The target and context are passed as implicit parameters that are not |
| 1855 // explicitly listed in the descriptor. |
| 1856 static const int kImplicitRegisterParameterCount = 2; |
| 1857 |
1850 private: | 1858 private: |
1851 DECLARE_CONCRETE_INSTRUCTION(CallWithDescriptor, "call-with-descriptor") | 1859 DECLARE_CONCRETE_INSTRUCTION(CallWithDescriptor, "call-with-descriptor") |
1852 | 1860 |
1853 void PrintDataTo(StringStream* stream) override; | 1861 void PrintDataTo(StringStream* stream) override; |
1854 | 1862 |
1855 int arity() const { return hydrogen()->argument_count() - 1; } | 1863 int arity() const { return hydrogen()->argument_count() - 1; } |
1856 | 1864 |
1857 ZoneList<LOperand*> inputs_; | 1865 ZoneList<LOperand*> inputs_; |
1858 | 1866 |
1859 // Iterator support. | 1867 // Iterator support. |
(...skipping 1005 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2865 | 2873 |
2866 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2874 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
2867 }; | 2875 }; |
2868 | 2876 |
2869 #undef DECLARE_HYDROGEN_ACCESSOR | 2877 #undef DECLARE_HYDROGEN_ACCESSOR |
2870 #undef DECLARE_CONCRETE_INSTRUCTION | 2878 #undef DECLARE_CONCRETE_INSTRUCTION |
2871 | 2879 |
2872 } } // namespace v8::int | 2880 } } // namespace v8::int |
2873 | 2881 |
2874 #endif // V8_X64_LITHIUM_X64_H_ | 2882 #endif // V8_X64_LITHIUM_X64_H_ |
OLD | NEW |