Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(633)

Side by Side Diff: src/ia32/lithium-ia32.h

Issue 8305001: Introduce HTransitionElementsKind instruction. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: nits fixed Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/ia32/lithium-codegen-ia32.cc ('k') | src/ia32/lithium-ia32.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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,
1740 LOperand* new_map_temp,
1741 LOperand* temp_reg) {
1742 inputs_[0] = object;
1743 temps_[0] = new_map_temp;
1744 temps_[1] = temp_reg;
1745 }
1746
1747 DECLARE_CONCRETE_INSTRUCTION(TransitionElementsKind,
1748 "transition-elements-kind")
1749 DECLARE_HYDROGEN_ACCESSOR(TransitionElementsKind)
1750
1751 virtual void PrintDataTo(StringStream* stream);
1752
1753 LOperand* object() { return inputs_[0]; }
1754 LOperand* new_map_reg() { return temps_[0]; }
1755 LOperand* temp_reg() { return temps_[1]; }
1756 Handle<Map> original_map() { return hydrogen()->original_map(); }
1757 Handle<Map> transitioned_map() { return hydrogen()->transitioned_map(); }
1758 };
1759
1760
1736 class LStringAdd: public LTemplateInstruction<1, 3, 0> { 1761 class LStringAdd: public LTemplateInstruction<1, 3, 0> {
1737 public: 1762 public:
1738 LStringAdd(LOperand* context, LOperand* left, LOperand* right) { 1763 LStringAdd(LOperand* context, LOperand* left, LOperand* right) {
1739 inputs_[0] = context; 1764 inputs_[0] = context;
1740 inputs_[1] = left; 1765 inputs_[1] = left;
1741 inputs_[2] = right; 1766 inputs_[2] = right;
1742 } 1767 }
1743 1768
1744 DECLARE_CONCRETE_INSTRUCTION(StringAdd, "string-add") 1769 DECLARE_CONCRETE_INSTRUCTION(StringAdd, "string-add")
1745 DECLARE_HYDROGEN_ACCESSOR(StringAdd) 1770 DECLARE_HYDROGEN_ACCESSOR(StringAdd)
(...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after
2296 2321
2297 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 2322 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
2298 }; 2323 };
2299 2324
2300 #undef DECLARE_HYDROGEN_ACCESSOR 2325 #undef DECLARE_HYDROGEN_ACCESSOR
2301 #undef DECLARE_CONCRETE_INSTRUCTION 2326 #undef DECLARE_CONCRETE_INSTRUCTION
2302 2327
2303 } } // namespace v8::internal 2328 } } // namespace v8::internal
2304 2329
2305 #endif // V8_IA32_LITHIUM_IA32_H_ 2330 #endif // V8_IA32_LITHIUM_IA32_H_
OLDNEW
« no previous file with comments | « src/ia32/lithium-codegen-ia32.cc ('k') | src/ia32/lithium-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698