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

Side by Side Diff: src/x64/lithium-x64.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/x64/lithium-codegen-x64.cc ('k') | src/x64/lithium-x64.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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 V(StoreNamedGeneric) \ 155 V(StoreNamedGeneric) \
156 V(StringAdd) \ 156 V(StringAdd) \
157 V(StringCharCodeAt) \ 157 V(StringCharCodeAt) \
158 V(StringCharFromCode) \ 158 V(StringCharFromCode) \
159 V(StringLength) \ 159 V(StringLength) \
160 V(SubI) \ 160 V(SubI) \
161 V(TaggedToI) \ 161 V(TaggedToI) \
162 V(ThisFunction) \ 162 V(ThisFunction) \
163 V(Throw) \ 163 V(Throw) \
164 V(ToFastProperties) \ 164 V(ToFastProperties) \
165 V(TransitionElementsKind) \
165 V(Typeof) \ 166 V(Typeof) \
166 V(TypeofIsAndBranch) \ 167 V(TypeofIsAndBranch) \
167 V(UnaryMathOperation) \ 168 V(UnaryMathOperation) \
168 V(UnknownOSRValue) \ 169 V(UnknownOSRValue) \
169 V(ValueOf) 170 V(ValueOf)
170 171
171 172
172 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \ 173 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \
173 virtual Opcode opcode() const { return LInstruction::k##type; } \ 174 virtual Opcode opcode() const { return LInstruction::k##type; } \
174 virtual void CompileToNative(LCodeGen* generator); \ 175 virtual void CompileToNative(LCodeGen* generator); \
(...skipping 1478 matching lines...) Expand 10 before | Expand all | Expand 10 after
1653 1654
1654 virtual void PrintDataTo(StringStream* stream); 1655 virtual void PrintDataTo(StringStream* stream);
1655 1656
1656 LOperand* object() { return inputs_[0]; } 1657 LOperand* object() { return inputs_[0]; }
1657 LOperand* key() { return inputs_[1]; } 1658 LOperand* key() { return inputs_[1]; }
1658 LOperand* value() { return inputs_[2]; } 1659 LOperand* value() { return inputs_[2]; }
1659 bool strict_mode() { return hydrogen()->strict_mode(); } 1660 bool strict_mode() { return hydrogen()->strict_mode(); }
1660 }; 1661 };
1661 1662
1662 1663
1664 class LTransitionElementsKind: public LTemplateInstruction<1, 1, 2> {
1665 public:
1666 LTransitionElementsKind(LOperand* object,
1667 LOperand* new_map_temp,
1668 LOperand* temp_reg) {
1669 inputs_[0] = object;
1670 temps_[0] = new_map_temp;
1671 temps_[1] = temp_reg;
1672 }
1673
1674 DECLARE_CONCRETE_INSTRUCTION(TransitionElementsKind,
1675 "transition-elements-kind")
1676 DECLARE_HYDROGEN_ACCESSOR(TransitionElementsKind)
1677
1678 virtual void PrintDataTo(StringStream* stream);
1679
1680 LOperand* object() { return inputs_[0]; }
1681 LOperand* new_map_reg() { return temps_[0]; }
1682 LOperand* temp_reg() { return temps_[1]; }
1683 Handle<Map> original_map() { return hydrogen()->original_map(); }
1684 Handle<Map> transitioned_map() { return hydrogen()->transitioned_map(); }
1685 };
1686
1687
1663 class LStringAdd: public LTemplateInstruction<1, 2, 0> { 1688 class LStringAdd: public LTemplateInstruction<1, 2, 0> {
1664 public: 1689 public:
1665 LStringAdd(LOperand* left, LOperand* right) { 1690 LStringAdd(LOperand* left, LOperand* right) {
1666 inputs_[0] = left; 1691 inputs_[0] = left;
1667 inputs_[1] = right; 1692 inputs_[1] = right;
1668 } 1693 }
1669 1694
1670 DECLARE_CONCRETE_INSTRUCTION(StringAdd, "string-add") 1695 DECLARE_CONCRETE_INSTRUCTION(StringAdd, "string-add")
1671 DECLARE_HYDROGEN_ACCESSOR(StringAdd) 1696 DECLARE_HYDROGEN_ACCESSOR(StringAdd)
1672 1697
(...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after
2177 2202
2178 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 2203 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
2179 }; 2204 };
2180 2205
2181 #undef DECLARE_HYDROGEN_ACCESSOR 2206 #undef DECLARE_HYDROGEN_ACCESSOR
2182 #undef DECLARE_CONCRETE_INSTRUCTION 2207 #undef DECLARE_CONCRETE_INSTRUCTION
2183 2208
2184 } } // namespace v8::int 2209 } } // namespace v8::int
2185 2210
2186 #endif // V8_X64_LITHIUM_X64_H_ 2211 #endif // V8_X64_LITHIUM_X64_H_
OLDNEW
« no previous file with comments | « src/x64/lithium-codegen-x64.cc ('k') | src/x64/lithium-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698