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_ARM_LITHIUM_ARM_H_ | 5 #ifndef V8_ARM_LITHIUM_ARM_H_ |
6 #define V8_ARM_LITHIUM_ARM_H_ | 6 #define V8_ARM_LITHIUM_ARM_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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 | 167 |
168 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \ | 168 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \ |
169 virtual Opcode opcode() const V8_FINAL V8_OVERRIDE { \ | 169 virtual Opcode opcode() const V8_FINAL V8_OVERRIDE { \ |
170 return LInstruction::k##type; \ | 170 return LInstruction::k##type; \ |
171 } \ | 171 } \ |
172 virtual void CompileToNative(LCodeGen* generator) V8_FINAL V8_OVERRIDE; \ | 172 virtual void CompileToNative(LCodeGen* generator) V8_FINAL V8_OVERRIDE; \ |
173 virtual const char* Mnemonic() const V8_FINAL V8_OVERRIDE { \ | 173 virtual const char* Mnemonic() const V8_FINAL V8_OVERRIDE { \ |
174 return mnemonic; \ | 174 return mnemonic; \ |
175 } \ | 175 } \ |
176 static L##type* cast(LInstruction* instr) { \ | 176 static L##type* cast(LInstruction* instr) { \ |
177 ASSERT(instr->Is##type()); \ | 177 DCHECK(instr->Is##type()); \ |
178 return reinterpret_cast<L##type*>(instr); \ | 178 return reinterpret_cast<L##type*>(instr); \ |
179 } | 179 } |
180 | 180 |
181 | 181 |
182 #define DECLARE_HYDROGEN_ACCESSOR(type) \ | 182 #define DECLARE_HYDROGEN_ACCESSOR(type) \ |
183 H##type* hydrogen() const { \ | 183 H##type* hydrogen() const { \ |
184 return H##type::cast(hydrogen_value()); \ | 184 return H##type::cast(hydrogen_value()); \ |
185 } | 185 } |
186 | 186 |
187 | 187 |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
327 parallel_moves_[BEFORE] = NULL; | 327 parallel_moves_[BEFORE] = NULL; |
328 parallel_moves_[START] = NULL; | 328 parallel_moves_[START] = NULL; |
329 parallel_moves_[END] = NULL; | 329 parallel_moves_[END] = NULL; |
330 parallel_moves_[AFTER] = NULL; | 330 parallel_moves_[AFTER] = NULL; |
331 } | 331 } |
332 | 332 |
333 // Can't use the DECLARE-macro here because of sub-classes. | 333 // Can't use the DECLARE-macro here because of sub-classes. |
334 virtual bool IsGap() const V8_OVERRIDE { return true; } | 334 virtual bool IsGap() const V8_OVERRIDE { return true; } |
335 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; | 335 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; |
336 static LGap* cast(LInstruction* instr) { | 336 static LGap* cast(LInstruction* instr) { |
337 ASSERT(instr->IsGap()); | 337 DCHECK(instr->IsGap()); |
338 return reinterpret_cast<LGap*>(instr); | 338 return reinterpret_cast<LGap*>(instr); |
339 } | 339 } |
340 | 340 |
341 bool IsRedundant() const; | 341 bool IsRedundant() const; |
342 | 342 |
343 HBasicBlock* block() const { return block_; } | 343 HBasicBlock* block() const { return block_; } |
344 | 344 |
345 enum InnerPosition { | 345 enum InnerPosition { |
346 BEFORE, | 346 BEFORE, |
347 START, | 347 START, |
(...skipping 1223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1571 inputs_[1] = context; | 1571 inputs_[1] = context; |
1572 inputs_[2] = parameter_count; | 1572 inputs_[2] = parameter_count; |
1573 } | 1573 } |
1574 | 1574 |
1575 LOperand* value() { return inputs_[0]; } | 1575 LOperand* value() { return inputs_[0]; } |
1576 | 1576 |
1577 bool has_constant_parameter_count() { | 1577 bool has_constant_parameter_count() { |
1578 return parameter_count()->IsConstantOperand(); | 1578 return parameter_count()->IsConstantOperand(); |
1579 } | 1579 } |
1580 LConstantOperand* constant_parameter_count() { | 1580 LConstantOperand* constant_parameter_count() { |
1581 ASSERT(has_constant_parameter_count()); | 1581 DCHECK(has_constant_parameter_count()); |
1582 return LConstantOperand::cast(parameter_count()); | 1582 return LConstantOperand::cast(parameter_count()); |
1583 } | 1583 } |
1584 LOperand* parameter_count() { return inputs_[2]; } | 1584 LOperand* parameter_count() { return inputs_[2]; } |
1585 | 1585 |
1586 DECLARE_CONCRETE_INSTRUCTION(Return, "return") | 1586 DECLARE_CONCRETE_INSTRUCTION(Return, "return") |
1587 }; | 1587 }; |
1588 | 1588 |
1589 | 1589 |
1590 class LLoadNamedField V8_FINAL : public LTemplateInstruction<1, 1, 0> { | 1590 class LLoadNamedField V8_FINAL : public LTemplateInstruction<1, 1, 0> { |
1591 public: | 1591 public: |
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1872 }; | 1872 }; |
1873 | 1873 |
1874 | 1874 |
1875 class LCallWithDescriptor V8_FINAL : public LTemplateResultInstruction<1> { | 1875 class LCallWithDescriptor V8_FINAL : public LTemplateResultInstruction<1> { |
1876 public: | 1876 public: |
1877 LCallWithDescriptor(const InterfaceDescriptor* descriptor, | 1877 LCallWithDescriptor(const InterfaceDescriptor* descriptor, |
1878 const ZoneList<LOperand*>& operands, | 1878 const ZoneList<LOperand*>& operands, |
1879 Zone* zone) | 1879 Zone* zone) |
1880 : descriptor_(descriptor), | 1880 : descriptor_(descriptor), |
1881 inputs_(descriptor->GetRegisterParameterCount() + 1, zone) { | 1881 inputs_(descriptor->GetRegisterParameterCount() + 1, zone) { |
1882 ASSERT(descriptor->GetRegisterParameterCount() + 1 == operands.length()); | 1882 DCHECK(descriptor->GetRegisterParameterCount() + 1 == operands.length()); |
1883 inputs_.AddAll(operands, zone); | 1883 inputs_.AddAll(operands, zone); |
1884 } | 1884 } |
1885 | 1885 |
1886 LOperand* target() const { return inputs_[0]; } | 1886 LOperand* target() const { return inputs_[0]; } |
1887 | 1887 |
1888 const InterfaceDescriptor* descriptor() { return descriptor_; } | 1888 const InterfaceDescriptor* descriptor() { return descriptor_; } |
1889 | 1889 |
1890 private: | 1890 private: |
1891 DECLARE_CONCRETE_INSTRUCTION(CallWithDescriptor, "call-with-descriptor") | 1891 DECLARE_CONCRETE_INSTRUCTION(CallWithDescriptor, "call-with-descriptor") |
1892 DECLARE_HYDROGEN_ACCESSOR(CallWithDescriptor) | 1892 DECLARE_HYDROGEN_ACCESSOR(CallWithDescriptor) |
(...skipping 1004 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2897 | 2897 |
2898 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2898 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
2899 }; | 2899 }; |
2900 | 2900 |
2901 #undef DECLARE_HYDROGEN_ACCESSOR | 2901 #undef DECLARE_HYDROGEN_ACCESSOR |
2902 #undef DECLARE_CONCRETE_INSTRUCTION | 2902 #undef DECLARE_CONCRETE_INSTRUCTION |
2903 | 2903 |
2904 } } // namespace v8::internal | 2904 } } // namespace v8::internal |
2905 | 2905 |
2906 #endif // V8_ARM_LITHIUM_ARM_H_ | 2906 #endif // V8_ARM_LITHIUM_ARM_H_ |
OLD | NEW |