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 V(DateField) |
181 | 182 |
182 | 183 |
183 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \ | 184 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \ |
184 virtual Opcode opcode() const { return LInstruction::k##type; } \ | 185 virtual Opcode opcode() const { return LInstruction::k##type; } \ |
185 virtual void CompileToNative(LCodeGen* generator); \ | 186 virtual void CompileToNative(LCodeGen* generator); \ |
186 virtual const char* Mnemonic() const { return mnemonic; } \ | 187 virtual const char* Mnemonic() const { return mnemonic; } \ |
187 static L##type* cast(LInstruction* instr) { \ | 188 static L##type* cast(LInstruction* instr) { \ |
188 ASSERT(instr->Is##type()); \ | 189 ASSERT(instr->Is##type()); \ |
189 return reinterpret_cast<L##type*>(instr); \ | 190 return reinterpret_cast<L##type*>(instr); \ |
190 } | 191 } |
(...skipping 789 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
980 public: | 981 public: |
981 explicit LValueOf(LOperand* value) { | 982 explicit LValueOf(LOperand* value) { |
982 inputs_[0] = value; | 983 inputs_[0] = value; |
983 } | 984 } |
984 | 985 |
985 DECLARE_CONCRETE_INSTRUCTION(ValueOf, "value-of") | 986 DECLARE_CONCRETE_INSTRUCTION(ValueOf, "value-of") |
986 DECLARE_HYDROGEN_ACCESSOR(ValueOf) | 987 DECLARE_HYDROGEN_ACCESSOR(ValueOf) |
987 }; | 988 }; |
988 | 989 |
989 | 990 |
| 991 class LDateField: public LTemplateInstruction<1, 1, 0> { |
| 992 public: |
| 993 LDateField(LOperand* date, Smi* index) : index_(index) { |
| 994 inputs_[0] = date; |
| 995 } |
| 996 |
| 997 DECLARE_CONCRETE_INSTRUCTION(ValueOf, "date-field") |
| 998 DECLARE_HYDROGEN_ACCESSOR(ValueOf) |
| 999 |
| 1000 Smi* index() const { return index_; } |
| 1001 |
| 1002 private: |
| 1003 Smi* index_; |
| 1004 }; |
| 1005 |
| 1006 |
990 class LThrow: public LTemplateInstruction<0, 1, 0> { | 1007 class LThrow: public LTemplateInstruction<0, 1, 0> { |
991 public: | 1008 public: |
992 explicit LThrow(LOperand* value) { | 1009 explicit LThrow(LOperand* value) { |
993 inputs_[0] = value; | 1010 inputs_[0] = value; |
994 } | 1011 } |
995 | 1012 |
996 DECLARE_CONCRETE_INSTRUCTION(Throw, "throw") | 1013 DECLARE_CONCRETE_INSTRUCTION(Throw, "throw") |
997 }; | 1014 }; |
998 | 1015 |
999 | 1016 |
(...skipping 1333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2333 | 2350 |
2334 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2351 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
2335 }; | 2352 }; |
2336 | 2353 |
2337 #undef DECLARE_HYDROGEN_ACCESSOR | 2354 #undef DECLARE_HYDROGEN_ACCESSOR |
2338 #undef DECLARE_CONCRETE_INSTRUCTION | 2355 #undef DECLARE_CONCRETE_INSTRUCTION |
2339 | 2356 |
2340 } } // namespace v8::int | 2357 } } // namespace v8::int |
2341 | 2358 |
2342 #endif // V8_X64_LITHIUM_X64_H_ | 2359 #endif // V8_X64_LITHIUM_X64_H_ |
OLD | NEW |