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_X87_LITHIUM_X87_H_ | 5 #ifndef V8_X87_LITHIUM_X87_H_ |
6 #define V8_X87_LITHIUM_X87_H_ | 6 #define V8_X87_LITHIUM_X87_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 1851 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1862 void PrintDataTo(StringStream* stream) override; | 1862 void PrintDataTo(StringStream* stream) override; |
1863 | 1863 |
1864 int arity() const { return hydrogen()->argument_count() - 1; } | 1864 int arity() const { return hydrogen()->argument_count() - 1; } |
1865 }; | 1865 }; |
1866 | 1866 |
1867 | 1867 |
1868 class LCallWithDescriptor final : public LTemplateResultInstruction<1> { | 1868 class LCallWithDescriptor final : public LTemplateResultInstruction<1> { |
1869 public: | 1869 public: |
1870 LCallWithDescriptor(CallInterfaceDescriptor descriptor, | 1870 LCallWithDescriptor(CallInterfaceDescriptor descriptor, |
1871 const ZoneList<LOperand*>& operands, Zone* zone) | 1871 const ZoneList<LOperand*>& operands, Zone* zone) |
1872 : inputs_(descriptor.GetRegisterParameterCount() + 1, zone) { | 1872 : inputs_(descriptor.GetRegisterParameterCount() + |
1873 DCHECK(descriptor.GetRegisterParameterCount() + 1 == operands.length()); | 1873 kImplicitRegisterParameterCount, |
| 1874 zone) { |
| 1875 DCHECK(descriptor.GetRegisterParameterCount() + |
| 1876 kImplicitRegisterParameterCount == |
| 1877 operands.length()); |
1874 inputs_.AddAll(operands, zone); | 1878 inputs_.AddAll(operands, zone); |
1875 } | 1879 } |
1876 | 1880 |
1877 LOperand* target() const { return inputs_[0]; } | 1881 LOperand* target() const { return inputs_[0]; } |
1878 | 1882 |
1879 DECLARE_HYDROGEN_ACCESSOR(CallWithDescriptor) | 1883 DECLARE_HYDROGEN_ACCESSOR(CallWithDescriptor) |
1880 | 1884 |
| 1885 // The target and context are passed as implicit parameters that are not |
| 1886 // explicitly listed in the descriptor. |
| 1887 static const int kImplicitRegisterParameterCount = 2; |
| 1888 |
1881 private: | 1889 private: |
1882 DECLARE_CONCRETE_INSTRUCTION(CallWithDescriptor, "call-with-descriptor") | 1890 DECLARE_CONCRETE_INSTRUCTION(CallWithDescriptor, "call-with-descriptor") |
1883 | 1891 |
1884 void PrintDataTo(StringStream* stream) override; | 1892 void PrintDataTo(StringStream* stream) override; |
1885 | 1893 |
1886 int arity() const { return hydrogen()->argument_count() - 1; } | 1894 int arity() const { return hydrogen()->argument_count() - 1; } |
1887 | 1895 |
1888 ZoneList<LOperand*> inputs_; | 1896 ZoneList<LOperand*> inputs_; |
1889 | 1897 |
1890 // Iterator support. | 1898 // Iterator support. |
(...skipping 1003 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2894 | 2902 |
2895 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2903 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
2896 }; | 2904 }; |
2897 | 2905 |
2898 #undef DECLARE_HYDROGEN_ACCESSOR | 2906 #undef DECLARE_HYDROGEN_ACCESSOR |
2899 #undef DECLARE_CONCRETE_INSTRUCTION | 2907 #undef DECLARE_CONCRETE_INSTRUCTION |
2900 | 2908 |
2901 } } // namespace v8::internal | 2909 } } // namespace v8::internal |
2902 | 2910 |
2903 #endif // V8_X87_LITHIUM_X87_H_ | 2911 #endif // V8_X87_LITHIUM_X87_H_ |
OLD | NEW |