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 155 matching lines...) Loading... |
166 V(TransitionElementsKind) \ | 166 V(TransitionElementsKind) \ |
167 V(Typeof) \ | 167 V(Typeof) \ |
168 V(TypeofIsAndBranch) \ | 168 V(TypeofIsAndBranch) \ |
169 V(UnaryMathOperation) \ | 169 V(UnaryMathOperation) \ |
170 V(UnknownOSRValue) \ | 170 V(UnknownOSRValue) \ |
171 V(ValueOf) \ | 171 V(ValueOf) \ |
172 V(ForInPrepareMap) \ | 172 V(ForInPrepareMap) \ |
173 V(ForInCacheArray) \ | 173 V(ForInCacheArray) \ |
174 V(CheckMapValue) \ | 174 V(CheckMapValue) \ |
175 V(LoadFieldByIndex) \ | 175 V(LoadFieldByIndex) \ |
176 V(DateField) \ | 176 V(DateField) |
177 V(SetDateField) | |
178 | 177 |
179 | 178 |
180 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \ | 179 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \ |
181 virtual Opcode opcode() const { return LInstruction::k##type; } \ | 180 virtual Opcode opcode() const { return LInstruction::k##type; } \ |
182 virtual void CompileToNative(LCodeGen* generator); \ | 181 virtual void CompileToNative(LCodeGen* generator); \ |
183 virtual const char* Mnemonic() const { return mnemonic; } \ | 182 virtual const char* Mnemonic() const { return mnemonic; } \ |
184 static L##type* cast(LInstruction* instr) { \ | 183 static L##type* cast(LInstruction* instr) { \ |
185 ASSERT(instr->Is##type()); \ | 184 ASSERT(instr->Is##type()); \ |
186 return reinterpret_cast<L##type*>(instr); \ | 185 return reinterpret_cast<L##type*>(instr); \ |
187 } | 186 } |
(...skipping 811 matching lines...) Loading... |
999 temps_[0] = temp; | 998 temps_[0] = temp; |
1000 } | 999 } |
1001 | 1000 |
1002 DECLARE_CONCRETE_INSTRUCTION(ValueOf, "value-of") | 1001 DECLARE_CONCRETE_INSTRUCTION(ValueOf, "value-of") |
1003 DECLARE_HYDROGEN_ACCESSOR(ValueOf) | 1002 DECLARE_HYDROGEN_ACCESSOR(ValueOf) |
1004 }; | 1003 }; |
1005 | 1004 |
1006 | 1005 |
1007 class LDateField: public LTemplateInstruction<1, 1, 1> { | 1006 class LDateField: public LTemplateInstruction<1, 1, 1> { |
1008 public: | 1007 public: |
1009 LDateField(LOperand* date, LOperand* temp, int index) : index_(index) { | 1008 LDateField(LOperand* date, LOperand* temp, Smi* index) |
| 1009 : index_(index) { |
1010 inputs_[0] = date; | 1010 inputs_[0] = date; |
1011 temps_[0] = temp; | 1011 temps_[0] = temp; |
1012 } | 1012 } |
1013 | 1013 |
1014 DECLARE_CONCRETE_INSTRUCTION(DateField, "date-field") | 1014 DECLARE_CONCRETE_INSTRUCTION(DateField, "date-field") |
1015 DECLARE_HYDROGEN_ACCESSOR(DateField) | 1015 DECLARE_HYDROGEN_ACCESSOR(DateField) |
1016 | 1016 |
1017 int index() const { return index_; } | 1017 Smi* index() const { return index_; } |
1018 | 1018 |
1019 private: | 1019 private: |
1020 int index_; | 1020 Smi* index_; |
1021 }; | 1021 }; |
1022 | 1022 |
1023 | 1023 |
1024 class LSetDateField: public LTemplateInstruction<1, 2, 1> { | |
1025 public: | |
1026 LSetDateField(LOperand* date, LOperand* value, LOperand* temp, int index) | |
1027 : index_(index) { | |
1028 inputs_[0] = date; | |
1029 inputs_[1] = value; | |
1030 temps_[0] = temp; | |
1031 } | |
1032 | |
1033 DECLARE_CONCRETE_INSTRUCTION(DateField, "date-set-field") | |
1034 DECLARE_HYDROGEN_ACCESSOR(DateField) | |
1035 | |
1036 int index() const { return index_; } | |
1037 | |
1038 private: | |
1039 int index_; | |
1040 }; | |
1041 | |
1042 | |
1043 class LThrow: public LTemplateInstruction<0, 2, 0> { | 1024 class LThrow: public LTemplateInstruction<0, 2, 0> { |
1044 public: | 1025 public: |
1045 LThrow(LOperand* context, LOperand* value) { | 1026 LThrow(LOperand* context, LOperand* value) { |
1046 inputs_[0] = context; | 1027 inputs_[0] = context; |
1047 inputs_[1] = value; | 1028 inputs_[1] = value; |
1048 } | 1029 } |
1049 | 1030 |
1050 LOperand* context() { return inputs_[0]; } | 1031 LOperand* context() { return inputs_[0]; } |
1051 LOperand* value() { return inputs_[1]; } | 1032 LOperand* value() { return inputs_[1]; } |
1052 | 1033 |
(...skipping 1459 matching lines...) Loading... |
2512 | 2493 |
2513 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2494 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
2514 }; | 2495 }; |
2515 | 2496 |
2516 #undef DECLARE_HYDROGEN_ACCESSOR | 2497 #undef DECLARE_HYDROGEN_ACCESSOR |
2517 #undef DECLARE_CONCRETE_INSTRUCTION | 2498 #undef DECLARE_CONCRETE_INSTRUCTION |
2518 | 2499 |
2519 } } // namespace v8::internal | 2500 } } // namespace v8::internal |
2520 | 2501 |
2521 #endif // V8_IA32_LITHIUM_IA32_H_ | 2502 #endif // V8_IA32_LITHIUM_IA32_H_ |
OLD | NEW |