| 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 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 | 168 |
| 169 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \ | 169 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \ |
| 170 virtual Opcode opcode() const V8_FINAL V8_OVERRIDE { \ | 170 virtual Opcode opcode() const V8_FINAL V8_OVERRIDE { \ |
| 171 return LInstruction::k##type; \ | 171 return LInstruction::k##type; \ |
| 172 } \ | 172 } \ |
| 173 virtual void CompileToNative(LCodeGen* generator) V8_FINAL V8_OVERRIDE; \ | 173 virtual void CompileToNative(LCodeGen* generator) V8_FINAL V8_OVERRIDE; \ |
| 174 virtual const char* Mnemonic() const V8_FINAL V8_OVERRIDE { \ | 174 virtual const char* Mnemonic() const V8_FINAL V8_OVERRIDE { \ |
| 175 return mnemonic; \ | 175 return mnemonic; \ |
| 176 } \ | 176 } \ |
| 177 static L##type* cast(LInstruction* instr) { \ | 177 static L##type* cast(LInstruction* instr) { \ |
| 178 ASSERT(instr->Is##type()); \ | 178 DCHECK(instr->Is##type()); \ |
| 179 return reinterpret_cast<L##type*>(instr); \ | 179 return reinterpret_cast<L##type*>(instr); \ |
| 180 } | 180 } |
| 181 | 181 |
| 182 | 182 |
| 183 #define DECLARE_HYDROGEN_ACCESSOR(type) \ | 183 #define DECLARE_HYDROGEN_ACCESSOR(type) \ |
| 184 H##type* hydrogen() const { \ | 184 H##type* hydrogen() const { \ |
| 185 return H##type::cast(hydrogen_value()); \ | 185 return H##type::cast(hydrogen_value()); \ |
| 186 } | 186 } |
| 187 | 187 |
| 188 | 188 |
| (...skipping 138 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_FINAL V8_OVERRIDE { return true; } | 334 virtual bool IsGap() const V8_FINAL 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 1219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1567 LOperand* parameter_count) { | 1567 LOperand* parameter_count) { |
| 1568 inputs_[0] = value; | 1568 inputs_[0] = value; |
| 1569 inputs_[1] = context; | 1569 inputs_[1] = context; |
| 1570 inputs_[2] = parameter_count; | 1570 inputs_[2] = parameter_count; |
| 1571 } | 1571 } |
| 1572 | 1572 |
| 1573 bool has_constant_parameter_count() { | 1573 bool has_constant_parameter_count() { |
| 1574 return parameter_count()->IsConstantOperand(); | 1574 return parameter_count()->IsConstantOperand(); |
| 1575 } | 1575 } |
| 1576 LConstantOperand* constant_parameter_count() { | 1576 LConstantOperand* constant_parameter_count() { |
| 1577 ASSERT(has_constant_parameter_count()); | 1577 DCHECK(has_constant_parameter_count()); |
| 1578 return LConstantOperand::cast(parameter_count()); | 1578 return LConstantOperand::cast(parameter_count()); |
| 1579 } | 1579 } |
| 1580 LOperand* parameter_count() { return inputs_[2]; } | 1580 LOperand* parameter_count() { return inputs_[2]; } |
| 1581 | 1581 |
| 1582 DECLARE_CONCRETE_INSTRUCTION(Return, "return") | 1582 DECLARE_CONCRETE_INSTRUCTION(Return, "return") |
| 1583 DECLARE_HYDROGEN_ACCESSOR(Return) | 1583 DECLARE_HYDROGEN_ACCESSOR(Return) |
| 1584 }; | 1584 }; |
| 1585 | 1585 |
| 1586 | 1586 |
| 1587 class LLoadNamedField V8_FINAL : public LTemplateInstruction<1, 1, 0> { | 1587 class LLoadNamedField V8_FINAL : public LTemplateInstruction<1, 1, 0> { |
| (...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1888 int arity() const { return hydrogen()->argument_count() - 1; } | 1888 int arity() const { return hydrogen()->argument_count() - 1; } |
| 1889 }; | 1889 }; |
| 1890 | 1890 |
| 1891 | 1891 |
| 1892 class LCallWithDescriptor V8_FINAL : public LTemplateResultInstruction<1> { | 1892 class LCallWithDescriptor V8_FINAL : public LTemplateResultInstruction<1> { |
| 1893 public: | 1893 public: |
| 1894 LCallWithDescriptor(const InterfaceDescriptor* descriptor, | 1894 LCallWithDescriptor(const InterfaceDescriptor* descriptor, |
| 1895 const ZoneList<LOperand*>& operands, | 1895 const ZoneList<LOperand*>& operands, |
| 1896 Zone* zone) | 1896 Zone* zone) |
| 1897 : inputs_(descriptor->GetRegisterParameterCount() + 1, zone) { | 1897 : inputs_(descriptor->GetRegisterParameterCount() + 1, zone) { |
| 1898 ASSERT(descriptor->GetRegisterParameterCount() + 1 == operands.length()); | 1898 DCHECK(descriptor->GetRegisterParameterCount() + 1 == operands.length()); |
| 1899 inputs_.AddAll(operands, zone); | 1899 inputs_.AddAll(operands, zone); |
| 1900 } | 1900 } |
| 1901 | 1901 |
| 1902 LOperand* target() const { return inputs_[0]; } | 1902 LOperand* target() const { return inputs_[0]; } |
| 1903 | 1903 |
| 1904 private: | 1904 private: |
| 1905 DECLARE_CONCRETE_INSTRUCTION(CallWithDescriptor, "call-with-descriptor") | 1905 DECLARE_CONCRETE_INSTRUCTION(CallWithDescriptor, "call-with-descriptor") |
| 1906 DECLARE_HYDROGEN_ACCESSOR(CallWithDescriptor) | 1906 DECLARE_HYDROGEN_ACCESSOR(CallWithDescriptor) |
| 1907 | 1907 |
| 1908 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; | 1908 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; |
| (...skipping 983 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2892 | 2892 |
| 2893 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2893 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
| 2894 }; | 2894 }; |
| 2895 | 2895 |
| 2896 #undef DECLARE_HYDROGEN_ACCESSOR | 2896 #undef DECLARE_HYDROGEN_ACCESSOR |
| 2897 #undef DECLARE_CONCRETE_INSTRUCTION | 2897 #undef DECLARE_CONCRETE_INSTRUCTION |
| 2898 | 2898 |
| 2899 } } // namespace v8::internal | 2899 } } // namespace v8::internal |
| 2900 | 2900 |
| 2901 #endif // V8_IA32_LITHIUM_IA32_H_ | 2901 #endif // V8_IA32_LITHIUM_IA32_H_ |
| OLD | NEW |