OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 160 matching lines...) Loading... |
171 V(TransitionElementsKind) \ | 171 V(TransitionElementsKind) \ |
172 V(Typeof) \ | 172 V(Typeof) \ |
173 V(TypeofIsAndBranch) \ | 173 V(TypeofIsAndBranch) \ |
174 V(UnaryMathOperation) \ | 174 V(UnaryMathOperation) \ |
175 V(UnknownOSRValue) \ | 175 V(UnknownOSRValue) \ |
176 V(ValueOf) \ | 176 V(ValueOf) \ |
177 V(ForInPrepareMap) \ | 177 V(ForInPrepareMap) \ |
178 V(ForInCacheArray) \ | 178 V(ForInCacheArray) \ |
179 V(CheckMapValue) \ | 179 V(CheckMapValue) \ |
180 V(LoadFieldByIndex) \ | 180 V(LoadFieldByIndex) \ |
181 V(DateField) \ | 181 V(DateField) |
182 V(SetDateField) | |
183 | 182 |
184 | 183 |
185 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \ | 184 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \ |
186 virtual Opcode opcode() const { return LInstruction::k##type; } \ | 185 virtual Opcode opcode() const { return LInstruction::k##type; } \ |
187 virtual void CompileToNative(LCodeGen* generator); \ | 186 virtual void CompileToNative(LCodeGen* generator); \ |
188 virtual const char* Mnemonic() const { return mnemonic; } \ | 187 virtual const char* Mnemonic() const { return mnemonic; } \ |
189 static L##type* cast(LInstruction* instr) { \ | 188 static L##type* cast(LInstruction* instr) { \ |
190 ASSERT(instr->Is##type()); \ | 189 ASSERT(instr->Is##type()); \ |
191 return reinterpret_cast<L##type*>(instr); \ | 190 return reinterpret_cast<L##type*>(instr); \ |
192 } | 191 } |
(...skipping 793 matching lines...) Loading... |
986 temps_[0] = temp; | 985 temps_[0] = temp; |
987 } | 986 } |
988 | 987 |
989 DECLARE_CONCRETE_INSTRUCTION(ValueOf, "value-of") | 988 DECLARE_CONCRETE_INSTRUCTION(ValueOf, "value-of") |
990 DECLARE_HYDROGEN_ACCESSOR(ValueOf) | 989 DECLARE_HYDROGEN_ACCESSOR(ValueOf) |
991 }; | 990 }; |
992 | 991 |
993 | 992 |
994 class LDateField: public LTemplateInstruction<1, 1, 1> { | 993 class LDateField: public LTemplateInstruction<1, 1, 1> { |
995 public: | 994 public: |
996 LDateField(LOperand* date, LOperand* temp, int index) : index_(index) { | 995 LDateField(LOperand* date, LOperand* temp, Smi* index) : index_(index) { |
997 inputs_[0] = date; | 996 inputs_[0] = date; |
998 temps_[0] = temp; | 997 temps_[0] = temp; |
999 } | 998 } |
1000 | 999 |
1001 DECLARE_CONCRETE_INSTRUCTION(ValueOf, "date-field") | 1000 DECLARE_CONCRETE_INSTRUCTION(ValueOf, "date-field") |
1002 DECLARE_HYDROGEN_ACCESSOR(ValueOf) | 1001 DECLARE_HYDROGEN_ACCESSOR(ValueOf) |
1003 int index() const { return index_; } | 1002 Smi* index() const { return index_; } |
1004 | 1003 |
1005 private: | 1004 private: |
1006 int index_; | 1005 Smi* index_; |
1007 }; | 1006 }; |
1008 | 1007 |
1009 | 1008 |
1010 class LSetDateField: public LTemplateInstruction<1, 2, 1> { | 1009 class LSetDateField: public LTemplateInstruction<1, 2, 1> { |
1011 public: | 1010 public: |
1012 LSetDateField(LOperand* date, LOperand* value, LOperand* temp, int index) | 1011 LSetDateField(LOperand* date, LOperand* value, LOperand* temp, int index) |
1013 : index_(index) { | 1012 : index_(index) { |
1014 inputs_[0] = date; | 1013 inputs_[0] = date; |
1015 inputs_[1] = value; | 1014 inputs_[1] = value; |
1016 temps_[0] = temp; | 1015 temps_[0] = temp; |
(...skipping 1372 matching lines...) Loading... |
2389 | 2388 |
2390 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2389 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
2391 }; | 2390 }; |
2392 | 2391 |
2393 #undef DECLARE_HYDROGEN_ACCESSOR | 2392 #undef DECLARE_HYDROGEN_ACCESSOR |
2394 #undef DECLARE_CONCRETE_INSTRUCTION | 2393 #undef DECLARE_CONCRETE_INSTRUCTION |
2395 | 2394 |
2396 } } // namespace v8::internal | 2395 } } // namespace v8::internal |
2397 | 2396 |
2398 #endif // V8_ARM_LITHIUM_ARM_H_ | 2397 #endif // V8_ARM_LITHIUM_ARM_H_ |
OLD | NEW |