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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 V(SubI) \ | 159 V(SubI) \ |
160 V(TaggedToI) \ | 160 V(TaggedToI) \ |
161 V(ThisFunction) \ | 161 V(ThisFunction) \ |
162 V(Throw) \ | 162 V(Throw) \ |
163 V(ToFastProperties) \ | 163 V(ToFastProperties) \ |
164 V(TransitionElementsKind) \ | 164 V(TransitionElementsKind) \ |
165 V(Typeof) \ | 165 V(Typeof) \ |
166 V(TypeofIsAndBranch) \ | 166 V(TypeofIsAndBranch) \ |
167 V(UnaryMathOperation) \ | 167 V(UnaryMathOperation) \ |
168 V(UnknownOSRValue) \ | 168 V(UnknownOSRValue) \ |
169 V(ValueOf) | 169 V(ValueOf) \ |
| 170 V(DateField) \ |
| 171 V(SetDateField) |
170 | 172 |
171 | 173 |
172 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \ | 174 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \ |
173 virtual Opcode opcode() const { return LInstruction::k##type; } \ | 175 virtual Opcode opcode() const { return LInstruction::k##type; } \ |
174 virtual void CompileToNative(LCodeGen* generator); \ | 176 virtual void CompileToNative(LCodeGen* generator); \ |
175 virtual const char* Mnemonic() const { return mnemonic; } \ | 177 virtual const char* Mnemonic() const { return mnemonic; } \ |
176 static L##type* cast(LInstruction* instr) { \ | 178 static L##type* cast(LInstruction* instr) { \ |
177 ASSERT(instr->Is##type()); \ | 179 ASSERT(instr->Is##type()); \ |
178 return reinterpret_cast<L##type*>(instr); \ | 180 return reinterpret_cast<L##type*>(instr); \ |
179 } | 181 } |
(...skipping 809 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
989 LValueOf(LOperand* value, LOperand* temp) { | 991 LValueOf(LOperand* value, LOperand* temp) { |
990 inputs_[0] = value; | 992 inputs_[0] = value; |
991 temps_[0] = temp; | 993 temps_[0] = temp; |
992 } | 994 } |
993 | 995 |
994 DECLARE_CONCRETE_INSTRUCTION(ValueOf, "value-of") | 996 DECLARE_CONCRETE_INSTRUCTION(ValueOf, "value-of") |
995 DECLARE_HYDROGEN_ACCESSOR(ValueOf) | 997 DECLARE_HYDROGEN_ACCESSOR(ValueOf) |
996 }; | 998 }; |
997 | 999 |
998 | 1000 |
| 1001 class LDateField: public LTemplateInstruction<1, 1, 1> { |
| 1002 public: |
| 1003 LDateField(LOperand* date, LOperand* temp, int index) : index_(index) { |
| 1004 inputs_[0] = date; |
| 1005 temps_[0] = temp; |
| 1006 } |
| 1007 |
| 1008 DECLARE_CONCRETE_INSTRUCTION(DateField, "date-field") |
| 1009 DECLARE_HYDROGEN_ACCESSOR(DateField) |
| 1010 |
| 1011 int index() const { return index_; } |
| 1012 |
| 1013 private: |
| 1014 int index_; |
| 1015 }; |
| 1016 |
| 1017 |
| 1018 class LSetDateField: public LTemplateInstruction<1, 2, 1> { |
| 1019 public: |
| 1020 LSetDateField(LOperand* date, LOperand* value, LOperand* temp, int index) |
| 1021 : index_(index) { |
| 1022 inputs_[0] = date; |
| 1023 inputs_[1] = value; |
| 1024 temps_[0] = temp; |
| 1025 } |
| 1026 |
| 1027 DECLARE_CONCRETE_INSTRUCTION(DateField, "date-set-field") |
| 1028 DECLARE_HYDROGEN_ACCESSOR(DateField) |
| 1029 |
| 1030 int index() const { return index_; } |
| 1031 |
| 1032 private: |
| 1033 int index_; |
| 1034 }; |
| 1035 |
| 1036 |
999 class LThrow: public LTemplateInstruction<0, 2, 0> { | 1037 class LThrow: public LTemplateInstruction<0, 2, 0> { |
1000 public: | 1038 public: |
1001 LThrow(LOperand* context, LOperand* value) { | 1039 LThrow(LOperand* context, LOperand* value) { |
1002 inputs_[0] = context; | 1040 inputs_[0] = context; |
1003 inputs_[1] = value; | 1041 inputs_[1] = value; |
1004 } | 1042 } |
1005 | 1043 |
1006 LOperand* context() { return inputs_[0]; } | 1044 LOperand* context() { return inputs_[0]; } |
1007 LOperand* value() { return inputs_[1]; } | 1045 LOperand* value() { return inputs_[1]; } |
1008 | 1046 |
(...skipping 1379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2388 | 2426 |
2389 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2427 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
2390 }; | 2428 }; |
2391 | 2429 |
2392 #undef DECLARE_HYDROGEN_ACCESSOR | 2430 #undef DECLARE_HYDROGEN_ACCESSOR |
2393 #undef DECLARE_CONCRETE_INSTRUCTION | 2431 #undef DECLARE_CONCRETE_INSTRUCTION |
2394 | 2432 |
2395 } } // namespace v8::internal | 2433 } } // namespace v8::internal |
2396 | 2434 |
2397 #endif // V8_IA32_LITHIUM_IA32_H_ | 2435 #endif // V8_IA32_LITHIUM_IA32_H_ |
OLD | NEW |