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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 V(SubI) \ | 164 V(SubI) \ |
165 V(TaggedToI) \ | 165 V(TaggedToI) \ |
166 V(ThisFunction) \ | 166 V(ThisFunction) \ |
167 V(Throw) \ | 167 V(Throw) \ |
168 V(ToFastProperties) \ | 168 V(ToFastProperties) \ |
169 V(TransitionElementsKind) \ | 169 V(TransitionElementsKind) \ |
170 V(Typeof) \ | 170 V(Typeof) \ |
171 V(TypeofIsAndBranch) \ | 171 V(TypeofIsAndBranch) \ |
172 V(UnaryMathOperation) \ | 172 V(UnaryMathOperation) \ |
173 V(UnknownOSRValue) \ | 173 V(UnknownOSRValue) \ |
174 V(ValueOf) | 174 V(ValueOf) \ |
| 175 V(DateField) \ |
| 176 V(SetDateField) |
175 | 177 |
176 | 178 |
177 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \ | 179 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \ |
178 virtual Opcode opcode() const { return LInstruction::k##type; } \ | 180 virtual Opcode opcode() const { return LInstruction::k##type; } \ |
179 virtual void CompileToNative(LCodeGen* generator); \ | 181 virtual void CompileToNative(LCodeGen* generator); \ |
180 virtual const char* Mnemonic() const { return mnemonic; } \ | 182 virtual const char* Mnemonic() const { return mnemonic; } \ |
181 static L##type* cast(LInstruction* instr) { \ | 183 static L##type* cast(LInstruction* instr) { \ |
182 ASSERT(instr->Is##type()); \ | 184 ASSERT(instr->Is##type()); \ |
183 return reinterpret_cast<L##type*>(instr); \ | 185 return reinterpret_cast<L##type*>(instr); \ |
184 } | 186 } |
(...skipping 791 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
976 LValueOf(LOperand* value, LOperand* temp) { | 978 LValueOf(LOperand* value, LOperand* temp) { |
977 inputs_[0] = value; | 979 inputs_[0] = value; |
978 temps_[0] = temp; | 980 temps_[0] = temp; |
979 } | 981 } |
980 | 982 |
981 DECLARE_CONCRETE_INSTRUCTION(ValueOf, "value-of") | 983 DECLARE_CONCRETE_INSTRUCTION(ValueOf, "value-of") |
982 DECLARE_HYDROGEN_ACCESSOR(ValueOf) | 984 DECLARE_HYDROGEN_ACCESSOR(ValueOf) |
983 }; | 985 }; |
984 | 986 |
985 | 987 |
| 988 class LDateField: public LTemplateInstruction<1, 1, 1> { |
| 989 public: |
| 990 LDateField(LOperand* date, LOperand* temp, int index) : index_(index) { |
| 991 inputs_[0] = date; |
| 992 temps_[0] = temp; |
| 993 } |
| 994 |
| 995 DECLARE_CONCRETE_INSTRUCTION(ValueOf, "date-field") |
| 996 DECLARE_HYDROGEN_ACCESSOR(ValueOf) |
| 997 int index() const { return index_; } |
| 998 |
| 999 private: |
| 1000 int index_; |
| 1001 }; |
| 1002 |
| 1003 |
| 1004 class LSetDateField: public LTemplateInstruction<1, 2, 1> { |
| 1005 public: |
| 1006 LSetDateField(LOperand* date, LOperand* value, LOperand* temp, int index) |
| 1007 : index_(index) { |
| 1008 inputs_[0] = date; |
| 1009 inputs_[1] = value; |
| 1010 temps_[0] = temp; |
| 1011 } |
| 1012 |
| 1013 DECLARE_CONCRETE_INSTRUCTION(DateField, "date-set-field") |
| 1014 DECLARE_HYDROGEN_ACCESSOR(DateField) |
| 1015 |
| 1016 int index() const { return index_; } |
| 1017 |
| 1018 private: |
| 1019 int index_; |
| 1020 }; |
| 1021 |
| 1022 |
986 class LThrow: public LTemplateInstruction<0, 1, 0> { | 1023 class LThrow: public LTemplateInstruction<0, 1, 0> { |
987 public: | 1024 public: |
988 explicit LThrow(LOperand* value) { | 1025 explicit LThrow(LOperand* value) { |
989 inputs_[0] = value; | 1026 inputs_[0] = value; |
990 } | 1027 } |
991 | 1028 |
992 DECLARE_CONCRETE_INSTRUCTION(Throw, "throw") | 1029 DECLARE_CONCRETE_INSTRUCTION(Throw, "throw") |
993 }; | 1030 }; |
994 | 1031 |
995 | 1032 |
(...skipping 1275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2271 | 2308 |
2272 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2309 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
2273 }; | 2310 }; |
2274 | 2311 |
2275 #undef DECLARE_HYDROGEN_ACCESSOR | 2312 #undef DECLARE_HYDROGEN_ACCESSOR |
2276 #undef DECLARE_CONCRETE_INSTRUCTION | 2313 #undef DECLARE_CONCRETE_INSTRUCTION |
2277 | 2314 |
2278 } } // namespace v8::internal | 2315 } } // namespace v8::internal |
2279 | 2316 |
2280 #endif // V8_ARM_LITHIUM_ARM_H_ | 2317 #endif // V8_ARM_LITHIUM_ARM_H_ |
OLD | NEW |