OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 V(StoreNamedGeneric) \ | 149 V(StoreNamedGeneric) \ |
150 V(StringAdd) \ | 150 V(StringAdd) \ |
151 V(StringCharCodeAt) \ | 151 V(StringCharCodeAt) \ |
152 V(StringCharFromCode) \ | 152 V(StringCharFromCode) \ |
153 V(StringLength) \ | 153 V(StringLength) \ |
154 V(SubI) \ | 154 V(SubI) \ |
155 V(TaggedToI) \ | 155 V(TaggedToI) \ |
156 V(ThisFunction) \ | 156 V(ThisFunction) \ |
157 V(Throw) \ | 157 V(Throw) \ |
158 V(ToFastProperties) \ | 158 V(ToFastProperties) \ |
| 159 V(TransitionElementsKind) \ |
159 V(Typeof) \ | 160 V(Typeof) \ |
160 V(TypeofIsAndBranch) \ | 161 V(TypeofIsAndBranch) \ |
161 V(UnaryMathOperation) \ | 162 V(UnaryMathOperation) \ |
162 V(UnknownOSRValue) \ | 163 V(UnknownOSRValue) \ |
163 V(ValueOf) | 164 V(ValueOf) |
164 | 165 |
165 | 166 |
166 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \ | 167 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \ |
167 virtual Opcode opcode() const { return LInstruction::k##type; } \ | 168 virtual Opcode opcode() const { return LInstruction::k##type; } \ |
168 virtual void CompileToNative(LCodeGen* generator); \ | 169 virtual void CompileToNative(LCodeGen* generator); \ |
(...skipping 1557 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1726 virtual void PrintDataTo(StringStream* stream); | 1727 virtual void PrintDataTo(StringStream* stream); |
1727 | 1728 |
1728 LOperand* context() { return inputs_[0]; } | 1729 LOperand* context() { return inputs_[0]; } |
1729 LOperand* object() { return inputs_[1]; } | 1730 LOperand* object() { return inputs_[1]; } |
1730 LOperand* key() { return inputs_[2]; } | 1731 LOperand* key() { return inputs_[2]; } |
1731 LOperand* value() { return inputs_[3]; } | 1732 LOperand* value() { return inputs_[3]; } |
1732 bool strict_mode() { return hydrogen()->strict_mode(); } | 1733 bool strict_mode() { return hydrogen()->strict_mode(); } |
1733 }; | 1734 }; |
1734 | 1735 |
1735 | 1736 |
| 1737 class LTransitionElementsKind: public LTemplateInstruction<1, 1, 2> { |
| 1738 public: |
| 1739 LTransitionElementsKind(LOperand* object, LOperand* new_map_temp, |
| 1740 LOperand* temp_reg) { |
| 1741 inputs_[0] = object; |
| 1742 temps_[0] = new_map_temp; |
| 1743 temps_[1] = temp_reg; |
| 1744 } |
| 1745 |
| 1746 DECLARE_CONCRETE_INSTRUCTION(TransitionElementsKind, |
| 1747 "transition-elements-kind") |
| 1748 DECLARE_HYDROGEN_ACCESSOR(TransitionElementsKind) |
| 1749 |
| 1750 virtual void PrintDataTo(StringStream* stream); |
| 1751 |
| 1752 LOperand* object() { return inputs_[0]; } |
| 1753 LOperand* new_map_reg() { return temps_[0]; } |
| 1754 LOperand* temp_reg() { return temps_[1]; } |
| 1755 Handle<Map> original_map() { return hydrogen()->original_map(); } |
| 1756 Handle<Map> transitioned_map() { return hydrogen()->transitioned_map(); } |
| 1757 }; |
| 1758 |
| 1759 |
1736 class LStringAdd: public LTemplateInstruction<1, 3, 0> { | 1760 class LStringAdd: public LTemplateInstruction<1, 3, 0> { |
1737 public: | 1761 public: |
1738 LStringAdd(LOperand* context, LOperand* left, LOperand* right) { | 1762 LStringAdd(LOperand* context, LOperand* left, LOperand* right) { |
1739 inputs_[0] = context; | 1763 inputs_[0] = context; |
1740 inputs_[1] = left; | 1764 inputs_[1] = left; |
1741 inputs_[2] = right; | 1765 inputs_[2] = right; |
1742 } | 1766 } |
1743 | 1767 |
1744 DECLARE_CONCRETE_INSTRUCTION(StringAdd, "string-add") | 1768 DECLARE_CONCRETE_INSTRUCTION(StringAdd, "string-add") |
1745 DECLARE_HYDROGEN_ACCESSOR(StringAdd) | 1769 DECLARE_HYDROGEN_ACCESSOR(StringAdd) |
(...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2296 | 2320 |
2297 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2321 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
2298 }; | 2322 }; |
2299 | 2323 |
2300 #undef DECLARE_HYDROGEN_ACCESSOR | 2324 #undef DECLARE_HYDROGEN_ACCESSOR |
2301 #undef DECLARE_CONCRETE_INSTRUCTION | 2325 #undef DECLARE_CONCRETE_INSTRUCTION |
2302 | 2326 |
2303 } } // namespace v8::internal | 2327 } } // namespace v8::internal |
2304 | 2328 |
2305 #endif // V8_IA32_LITHIUM_IA32_H_ | 2329 #endif // V8_IA32_LITHIUM_IA32_H_ |
OLD | NEW |