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) \ |
| 182 V(SetDateField) |
181 | 183 |
182 | 184 |
183 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \ | 185 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \ |
184 virtual Opcode opcode() const { return LInstruction::k##type; } \ | 186 virtual Opcode opcode() const { return LInstruction::k##type; } \ |
185 virtual void CompileToNative(LCodeGen* generator); \ | 187 virtual void CompileToNative(LCodeGen* generator); \ |
186 virtual const char* Mnemonic() const { return mnemonic; } \ | 188 virtual const char* Mnemonic() const { return mnemonic; } \ |
187 static L##type* cast(LInstruction* instr) { \ | 189 static L##type* cast(LInstruction* instr) { \ |
188 ASSERT(instr->Is##type()); \ | 190 ASSERT(instr->Is##type()); \ |
189 return reinterpret_cast<L##type*>(instr); \ | 191 return reinterpret_cast<L##type*>(instr); \ |
190 } | 192 } |
(...skipping 789 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
980 public: | 982 public: |
981 explicit LValueOf(LOperand* value) { | 983 explicit LValueOf(LOperand* value) { |
982 inputs_[0] = value; | 984 inputs_[0] = value; |
983 } | 985 } |
984 | 986 |
985 DECLARE_CONCRETE_INSTRUCTION(ValueOf, "value-of") | 987 DECLARE_CONCRETE_INSTRUCTION(ValueOf, "value-of") |
986 DECLARE_HYDROGEN_ACCESSOR(ValueOf) | 988 DECLARE_HYDROGEN_ACCESSOR(ValueOf) |
987 }; | 989 }; |
988 | 990 |
989 | 991 |
| 992 class LDateField: public LTemplateInstruction<1, 1, 0> { |
| 993 public: |
| 994 LDateField(LOperand* date, int index) : index_(index) { |
| 995 inputs_[0] = date; |
| 996 } |
| 997 |
| 998 DECLARE_CONCRETE_INSTRUCTION(ValueOf, "date-field") |
| 999 DECLARE_HYDROGEN_ACCESSOR(ValueOf) |
| 1000 |
| 1001 int index() const { return index_; } |
| 1002 |
| 1003 private: |
| 1004 int index_; |
| 1005 }; |
| 1006 |
| 1007 |
| 1008 class LSetDateField: public LTemplateInstruction<1, 2, 0> { |
| 1009 public: |
| 1010 LSetDateField(LOperand* date, LOperand* value, int index) : index_(index) { |
| 1011 inputs_[0] = date; |
| 1012 inputs_[1] = value; |
| 1013 } |
| 1014 |
| 1015 DECLARE_CONCRETE_INSTRUCTION(DateField, "date-set-field") |
| 1016 DECLARE_HYDROGEN_ACCESSOR(DateField) |
| 1017 |
| 1018 int index() const { return index_; } |
| 1019 |
| 1020 private: |
| 1021 int index_; |
| 1022 }; |
| 1023 |
| 1024 |
990 class LThrow: public LTemplateInstruction<0, 1, 0> { | 1025 class LThrow: public LTemplateInstruction<0, 1, 0> { |
991 public: | 1026 public: |
992 explicit LThrow(LOperand* value) { | 1027 explicit LThrow(LOperand* value) { |
993 inputs_[0] = value; | 1028 inputs_[0] = value; |
994 } | 1029 } |
995 | 1030 |
996 DECLARE_CONCRETE_INSTRUCTION(Throw, "throw") | 1031 DECLARE_CONCRETE_INSTRUCTION(Throw, "throw") |
997 }; | 1032 }; |
998 | 1033 |
999 | 1034 |
(...skipping 1333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2333 | 2368 |
2334 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2369 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
2335 }; | 2370 }; |
2336 | 2371 |
2337 #undef DECLARE_HYDROGEN_ACCESSOR | 2372 #undef DECLARE_HYDROGEN_ACCESSOR |
2338 #undef DECLARE_CONCRETE_INSTRUCTION | 2373 #undef DECLARE_CONCRETE_INSTRUCTION |
2339 | 2374 |
2340 } } // namespace v8::int | 2375 } } // namespace v8::int |
2341 | 2376 |
2342 #endif // V8_X64_LITHIUM_X64_H_ | 2377 #endif // V8_X64_LITHIUM_X64_H_ |
OLD | NEW |