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 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
170 V(ToFastProperties) \ | 170 V(ToFastProperties) \ |
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 | 181 V(DateField) |
182 | 182 |
183 | 183 |
184 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \ | 184 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \ |
185 virtual Opcode opcode() const { return LInstruction::k##type; } \ | 185 virtual Opcode opcode() const { return LInstruction::k##type; } \ |
186 virtual void CompileToNative(LCodeGen* generator); \ | 186 virtual void CompileToNative(LCodeGen* generator); \ |
187 virtual const char* Mnemonic() const { return mnemonic; } \ | 187 virtual const char* Mnemonic() const { return mnemonic; } \ |
188 static L##type* cast(LInstruction* instr) { \ | 188 static L##type* cast(LInstruction* instr) { \ |
189 ASSERT(instr->Is##type()); \ | 189 ASSERT(instr->Is##type()); \ |
190 return reinterpret_cast<L##type*>(instr); \ | 190 return reinterpret_cast<L##type*>(instr); \ |
191 } | 191 } |
(...skipping 791 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
983 LValueOf(LOperand* value, LOperand* temp) { | 983 LValueOf(LOperand* value, LOperand* temp) { |
984 inputs_[0] = value; | 984 inputs_[0] = value; |
985 temps_[0] = temp; | 985 temps_[0] = temp; |
986 } | 986 } |
987 | 987 |
988 DECLARE_CONCRETE_INSTRUCTION(ValueOf, "value-of") | 988 DECLARE_CONCRETE_INSTRUCTION(ValueOf, "value-of") |
989 DECLARE_HYDROGEN_ACCESSOR(ValueOf) | 989 DECLARE_HYDROGEN_ACCESSOR(ValueOf) |
990 }; | 990 }; |
991 | 991 |
992 | 992 |
993 class LDateField: public LTemplateInstruction<1, 1, 1> { | |
994 public: | |
995 LDateField(LOperand* date, LOperand* temp, Smi* index) : index_(index) { | |
rossberg
2012/03/06 15:55:50
Again, I'm not fond of using Smi here. I don't see
ulan
2012/03/07 10:55:21
Replied above (in full-codegen-arm.cc).
| |
996 inputs_[0] = date; | |
997 temps_[0] = temp; | |
998 } | |
999 | |
1000 DECLARE_CONCRETE_INSTRUCTION(ValueOf, "date-field") | |
1001 DECLARE_HYDROGEN_ACCESSOR(ValueOf) | |
1002 Smi* index() const { return index_; } | |
1003 | |
1004 private: | |
1005 Smi* index_; | |
1006 }; | |
1007 | |
1008 | |
1009 class LSetDateField: public LTemplateInstruction<1, 2, 1> { | |
1010 public: | |
1011 LSetDateField(LOperand* date, LOperand* value, LOperand* temp, int index) | |
1012 : index_(index) { | |
1013 inputs_[0] = date; | |
1014 inputs_[1] = value; | |
1015 temps_[0] = temp; | |
1016 } | |
1017 | |
1018 DECLARE_CONCRETE_INSTRUCTION(DateField, "date-set-field") | |
1019 DECLARE_HYDROGEN_ACCESSOR(DateField) | |
1020 | |
1021 int index() const { return index_; } | |
1022 | |
1023 private: | |
1024 int index_; | |
1025 }; | |
1026 | |
1027 | |
993 class LThrow: public LTemplateInstruction<0, 1, 0> { | 1028 class LThrow: public LTemplateInstruction<0, 1, 0> { |
994 public: | 1029 public: |
995 explicit LThrow(LOperand* value) { | 1030 explicit LThrow(LOperand* value) { |
996 inputs_[0] = value; | 1031 inputs_[0] = value; |
997 } | 1032 } |
998 | 1033 |
999 DECLARE_CONCRETE_INSTRUCTION(Throw, "throw") | 1034 DECLARE_CONCRETE_INSTRUCTION(Throw, "throw") |
1000 }; | 1035 }; |
1001 | 1036 |
1002 | 1037 |
(...skipping 1345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2348 | 2383 |
2349 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2384 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
2350 }; | 2385 }; |
2351 | 2386 |
2352 #undef DECLARE_HYDROGEN_ACCESSOR | 2387 #undef DECLARE_HYDROGEN_ACCESSOR |
2353 #undef DECLARE_CONCRETE_INSTRUCTION | 2388 #undef DECLARE_CONCRETE_INSTRUCTION |
2354 | 2389 |
2355 } } // namespace v8::internal | 2390 } } // namespace v8::internal |
2356 | 2391 |
2357 #endif // V8_ARM_LITHIUM_ARM_H_ | 2392 #endif // V8_ARM_LITHIUM_ARM_H_ |
OLD | NEW |