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_IA32_LITHIUM_IA32_H_ | 5 #ifndef V8_IA32_LITHIUM_IA32_H_ |
6 #define V8_IA32_LITHIUM_IA32_H_ | 6 #define V8_IA32_LITHIUM_IA32_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 1843 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1854 void PrintDataTo(StringStream* stream) override; | 1854 void PrintDataTo(StringStream* stream) override; |
1855 | 1855 |
1856 int arity() const { return hydrogen()->argument_count() - 1; } | 1856 int arity() const { return hydrogen()->argument_count() - 1; } |
1857 }; | 1857 }; |
1858 | 1858 |
1859 | 1859 |
1860 class LCallWithDescriptor final : public LTemplateResultInstruction<1> { | 1860 class LCallWithDescriptor final : public LTemplateResultInstruction<1> { |
1861 public: | 1861 public: |
1862 LCallWithDescriptor(CallInterfaceDescriptor descriptor, | 1862 LCallWithDescriptor(CallInterfaceDescriptor descriptor, |
1863 const ZoneList<LOperand*>& operands, Zone* zone) | 1863 const ZoneList<LOperand*>& operands, Zone* zone) |
1864 : inputs_(descriptor.GetRegisterParameterCount() + 1, zone) { | 1864 : inputs_(descriptor.GetRegisterParameterCount() + |
1865 DCHECK(descriptor.GetRegisterParameterCount() + 1 == operands.length()); | 1865 kImplicitRegisterParameterCount, |
| 1866 zone) { |
| 1867 DCHECK(descriptor.GetRegisterParameterCount() + |
| 1868 kImplicitRegisterParameterCount == |
| 1869 operands.length()); |
1866 inputs_.AddAll(operands, zone); | 1870 inputs_.AddAll(operands, zone); |
1867 } | 1871 } |
1868 | 1872 |
1869 LOperand* target() const { return inputs_[0]; } | 1873 LOperand* target() const { return inputs_[0]; } |
1870 | 1874 |
1871 DECLARE_HYDROGEN_ACCESSOR(CallWithDescriptor) | 1875 DECLARE_HYDROGEN_ACCESSOR(CallWithDescriptor) |
1872 | 1876 |
| 1877 // The target and context are passed as implicit parameters that are not |
| 1878 // explicitly listed in the descriptor. |
| 1879 static const int kImplicitRegisterParameterCount = 2; |
| 1880 |
1873 private: | 1881 private: |
1874 DECLARE_CONCRETE_INSTRUCTION(CallWithDescriptor, "call-with-descriptor") | 1882 DECLARE_CONCRETE_INSTRUCTION(CallWithDescriptor, "call-with-descriptor") |
1875 | 1883 |
1876 void PrintDataTo(StringStream* stream) override; | 1884 void PrintDataTo(StringStream* stream) override; |
1877 | 1885 |
1878 int arity() const { return hydrogen()->argument_count() - 1; } | 1886 int arity() const { return hydrogen()->argument_count() - 1; } |
1879 | 1887 |
1880 ZoneList<LOperand*> inputs_; | 1888 ZoneList<LOperand*> inputs_; |
1881 | 1889 |
1882 // Iterator support. | 1890 // Iterator support. |
(...skipping 999 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2882 | 2890 |
2883 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2891 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
2884 }; | 2892 }; |
2885 | 2893 |
2886 #undef DECLARE_HYDROGEN_ACCESSOR | 2894 #undef DECLARE_HYDROGEN_ACCESSOR |
2887 #undef DECLARE_CONCRETE_INSTRUCTION | 2895 #undef DECLARE_CONCRETE_INSTRUCTION |
2888 | 2896 |
2889 } } // namespace v8::internal | 2897 } } // namespace v8::internal |
2890 | 2898 |
2891 #endif // V8_IA32_LITHIUM_IA32_H_ | 2899 #endif // V8_IA32_LITHIUM_IA32_H_ |
OLD | NEW |