| 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 158 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 169 | 169 | 
| 170 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic)                        \ | 170 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic)                        \ | 
| 171   virtual Opcode opcode() const V8_FINAL V8_OVERRIDE {                      \ | 171   virtual Opcode opcode() const V8_FINAL V8_OVERRIDE {                      \ | 
| 172     return LInstruction::k##type;                                           \ | 172     return LInstruction::k##type;                                           \ | 
| 173   }                                                                         \ | 173   }                                                                         \ | 
| 174   virtual void CompileToNative(LCodeGen* generator) V8_FINAL V8_OVERRIDE;   \ | 174   virtual void CompileToNative(LCodeGen* generator) V8_FINAL V8_OVERRIDE;   \ | 
| 175   virtual const char* Mnemonic() const V8_FINAL V8_OVERRIDE {               \ | 175   virtual const char* Mnemonic() const V8_FINAL V8_OVERRIDE {               \ | 
| 176     return mnemonic;                                                        \ | 176     return mnemonic;                                                        \ | 
| 177   }                                                                         \ | 177   }                                                                         \ | 
| 178   static L##type* cast(LInstruction* instr) {                               \ | 178   static L##type* cast(LInstruction* instr) {                               \ | 
| 179     ASSERT(instr->Is##type());                                              \ | 179     DCHECK(instr->Is##type());                                              \ | 
| 180     return reinterpret_cast<L##type*>(instr);                               \ | 180     return reinterpret_cast<L##type*>(instr);                               \ | 
| 181   } | 181   } | 
| 182 | 182 | 
| 183 | 183 | 
| 184 #define DECLARE_HYDROGEN_ACCESSOR(type)     \ | 184 #define DECLARE_HYDROGEN_ACCESSOR(type)     \ | 
| 185   H##type* hydrogen() const {               \ | 185   H##type* hydrogen() const {               \ | 
| 186     return H##type::cast(hydrogen_value()); \ | 186     return H##type::cast(hydrogen_value()); \ | 
| 187   } | 187   } | 
| 188 | 188 | 
| 189 | 189 | 
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 332     parallel_moves_[BEFORE] = NULL; | 332     parallel_moves_[BEFORE] = NULL; | 
| 333     parallel_moves_[START] = NULL; | 333     parallel_moves_[START] = NULL; | 
| 334     parallel_moves_[END] = NULL; | 334     parallel_moves_[END] = NULL; | 
| 335     parallel_moves_[AFTER] = NULL; | 335     parallel_moves_[AFTER] = NULL; | 
| 336   } | 336   } | 
| 337 | 337 | 
| 338   // Can't use the DECLARE-macro here because of sub-classes. | 338   // Can't use the DECLARE-macro here because of sub-classes. | 
| 339   virtual bool IsGap() const V8_FINAL V8_OVERRIDE { return true; } | 339   virtual bool IsGap() const V8_FINAL V8_OVERRIDE { return true; } | 
| 340   virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; | 340   virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; | 
| 341   static LGap* cast(LInstruction* instr) { | 341   static LGap* cast(LInstruction* instr) { | 
| 342     ASSERT(instr->IsGap()); | 342     DCHECK(instr->IsGap()); | 
| 343     return reinterpret_cast<LGap*>(instr); | 343     return reinterpret_cast<LGap*>(instr); | 
| 344   } | 344   } | 
| 345 | 345 | 
| 346   bool IsRedundant() const; | 346   bool IsRedundant() const; | 
| 347 | 347 | 
| 348   HBasicBlock* block() const { return block_; } | 348   HBasicBlock* block() const { return block_; } | 
| 349 | 349 | 
| 350   enum InnerPosition { | 350   enum InnerPosition { | 
| 351     BEFORE, | 351     BEFORE, | 
| 352     START, | 352     START, | 
| (...skipping 1229 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1582                    LOperand* parameter_count) { | 1582                    LOperand* parameter_count) { | 
| 1583     inputs_[0] = value; | 1583     inputs_[0] = value; | 
| 1584     inputs_[1] = context; | 1584     inputs_[1] = context; | 
| 1585     inputs_[2] = parameter_count; | 1585     inputs_[2] = parameter_count; | 
| 1586   } | 1586   } | 
| 1587 | 1587 | 
| 1588   bool has_constant_parameter_count() { | 1588   bool has_constant_parameter_count() { | 
| 1589     return parameter_count()->IsConstantOperand(); | 1589     return parameter_count()->IsConstantOperand(); | 
| 1590   } | 1590   } | 
| 1591   LConstantOperand* constant_parameter_count() { | 1591   LConstantOperand* constant_parameter_count() { | 
| 1592     ASSERT(has_constant_parameter_count()); | 1592     DCHECK(has_constant_parameter_count()); | 
| 1593     return LConstantOperand::cast(parameter_count()); | 1593     return LConstantOperand::cast(parameter_count()); | 
| 1594   } | 1594   } | 
| 1595   LOperand* parameter_count() { return inputs_[2]; } | 1595   LOperand* parameter_count() { return inputs_[2]; } | 
| 1596 | 1596 | 
| 1597   DECLARE_CONCRETE_INSTRUCTION(Return, "return") | 1597   DECLARE_CONCRETE_INSTRUCTION(Return, "return") | 
| 1598   DECLARE_HYDROGEN_ACCESSOR(Return) | 1598   DECLARE_HYDROGEN_ACCESSOR(Return) | 
| 1599 }; | 1599 }; | 
| 1600 | 1600 | 
| 1601 | 1601 | 
| 1602 class LLoadNamedField V8_FINAL : public LTemplateInstruction<1, 1, 0> { | 1602 class LLoadNamedField V8_FINAL : public LTemplateInstruction<1, 1, 0> { | 
| (...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1903   int arity() const { return hydrogen()->argument_count() - 1; } | 1903   int arity() const { return hydrogen()->argument_count() - 1; } | 
| 1904 }; | 1904 }; | 
| 1905 | 1905 | 
| 1906 | 1906 | 
| 1907 class LCallWithDescriptor V8_FINAL : public LTemplateResultInstruction<1> { | 1907 class LCallWithDescriptor V8_FINAL : public LTemplateResultInstruction<1> { | 
| 1908  public: | 1908  public: | 
| 1909   LCallWithDescriptor(const InterfaceDescriptor* descriptor, | 1909   LCallWithDescriptor(const InterfaceDescriptor* descriptor, | 
| 1910                       const ZoneList<LOperand*>& operands, | 1910                       const ZoneList<LOperand*>& operands, | 
| 1911                       Zone* zone) | 1911                       Zone* zone) | 
| 1912     : inputs_(descriptor->GetRegisterParameterCount() + 1, zone) { | 1912     : inputs_(descriptor->GetRegisterParameterCount() + 1, zone) { | 
| 1913     ASSERT(descriptor->GetRegisterParameterCount() + 1 == operands.length()); | 1913     DCHECK(descriptor->GetRegisterParameterCount() + 1 == operands.length()); | 
| 1914     inputs_.AddAll(operands, zone); | 1914     inputs_.AddAll(operands, zone); | 
| 1915   } | 1915   } | 
| 1916 | 1916 | 
| 1917   LOperand* target() const { return inputs_[0]; } | 1917   LOperand* target() const { return inputs_[0]; } | 
| 1918 | 1918 | 
| 1919  private: | 1919  private: | 
| 1920   DECLARE_CONCRETE_INSTRUCTION(CallWithDescriptor, "call-with-descriptor") | 1920   DECLARE_CONCRETE_INSTRUCTION(CallWithDescriptor, "call-with-descriptor") | 
| 1921   DECLARE_HYDROGEN_ACCESSOR(CallWithDescriptor) | 1921   DECLARE_HYDROGEN_ACCESSOR(CallWithDescriptor) | 
| 1922 | 1922 | 
| 1923   virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; | 1923   virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; | 
| (...skipping 984 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 2908 | 2908 | 
| 2909   DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2909   DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 
| 2910 }; | 2910 }; | 
| 2911 | 2911 | 
| 2912 #undef DECLARE_HYDROGEN_ACCESSOR | 2912 #undef DECLARE_HYDROGEN_ACCESSOR | 
| 2913 #undef DECLARE_CONCRETE_INSTRUCTION | 2913 #undef DECLARE_CONCRETE_INSTRUCTION | 
| 2914 | 2914 | 
| 2915 } }  // namespace v8::internal | 2915 } }  // namespace v8::internal | 
| 2916 | 2916 | 
| 2917 #endif  // V8_X87_LITHIUM_X87_H_ | 2917 #endif  // V8_X87_LITHIUM_X87_H_ | 
| OLD | NEW | 
|---|