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

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

Issue 8404030: Version 3.7.1 (Closed) Base URL: http://v8.googlecode.com/svn/trunk/
Patch Set: Created 9 years, 1 month 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 1078 matching lines...) Expand 10 before | Expand all | Expand 10 after
1253 inputs_[1] = value; 1254 inputs_[1] = value;
1254 temps_[0] = temp; 1255 temps_[0] = temp;
1255 } 1256 }
1256 1257
1257 DECLARE_CONCRETE_INSTRUCTION(StoreContextSlot, "store-context-slot") 1258 DECLARE_CONCRETE_INSTRUCTION(StoreContextSlot, "store-context-slot")
1258 DECLARE_HYDROGEN_ACCESSOR(StoreContextSlot) 1259 DECLARE_HYDROGEN_ACCESSOR(StoreContextSlot)
1259 1260
1260 LOperand* context() { return InputAt(0); } 1261 LOperand* context() { return InputAt(0); }
1261 LOperand* value() { return InputAt(1); } 1262 LOperand* value() { return InputAt(1); }
1262 int slot_index() { return hydrogen()->slot_index(); } 1263 int slot_index() { return hydrogen()->slot_index(); }
1263 int needs_write_barrier() { return hydrogen()->NeedsWriteBarrier(); }
1264 1264
1265 virtual void PrintDataTo(StringStream* stream); 1265 virtual void PrintDataTo(StringStream* stream);
1266 }; 1266 };
1267 1267
1268 1268
1269 class LPushArgument: public LTemplateInstruction<0, 1, 0> { 1269 class LPushArgument: public LTemplateInstruction<0, 1, 0> {
1270 public: 1270 public:
1271 explicit LPushArgument(LOperand* value) { 1271 explicit LPushArgument(LOperand* value) {
1272 inputs_[0] = value; 1272 inputs_[0] = value;
1273 } 1273 }
1274 1274
1275 DECLARE_CONCRETE_INSTRUCTION(PushArgument, "push-argument") 1275 DECLARE_CONCRETE_INSTRUCTION(PushArgument, "push-argument")
1276 }; 1276 };
1277 1277
1278 1278
1279 class LThisFunction: public LTemplateInstruction<1, 0, 0> { 1279 class LThisFunction: public LTemplateInstruction<1, 0, 0> {
1280 public:
1280 DECLARE_CONCRETE_INSTRUCTION(ThisFunction, "this-function") 1281 DECLARE_CONCRETE_INSTRUCTION(ThisFunction, "this-function")
1282 DECLARE_HYDROGEN_ACCESSOR(ThisFunction)
1281 }; 1283 };
1282 1284
1283 1285
1284 class LContext: public LTemplateInstruction<1, 0, 0> { 1286 class LContext: public LTemplateInstruction<1, 0, 0> {
1285 public: 1287 public:
1286 DECLARE_CONCRETE_INSTRUCTION(Context, "context") 1288 DECLARE_CONCRETE_INSTRUCTION(Context, "context")
1287 }; 1289 };
1288 1290
1289 1291
1290 class LOuterContext: public LTemplateInstruction<1, 1, 0> { 1292 class LOuterContext: public LTemplateInstruction<1, 1, 0> {
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
1544 DECLARE_HYDROGEN_ACCESSOR(StoreNamedField) 1546 DECLARE_HYDROGEN_ACCESSOR(StoreNamedField)
1545 1547
1546 virtual void PrintDataTo(StringStream* stream); 1548 virtual void PrintDataTo(StringStream* stream);
1547 1549
1548 LOperand* object() { return inputs_[0]; } 1550 LOperand* object() { return inputs_[0]; }
1549 LOperand* value() { return inputs_[1]; } 1551 LOperand* value() { return inputs_[1]; }
1550 1552
1551 Handle<Object> name() const { return hydrogen()->name(); } 1553 Handle<Object> name() const { return hydrogen()->name(); }
1552 bool is_in_object() { return hydrogen()->is_in_object(); } 1554 bool is_in_object() { return hydrogen()->is_in_object(); }
1553 int offset() { return hydrogen()->offset(); } 1555 int offset() { return hydrogen()->offset(); }
1554 bool needs_write_barrier() { return hydrogen()->NeedsWriteBarrier(); }
1555 Handle<Map> transition() const { return hydrogen()->transition(); } 1556 Handle<Map> transition() const { return hydrogen()->transition(); }
1556 }; 1557 };
1557 1558
1558 1559
1559 class LStoreNamedGeneric: public LTemplateInstruction<0, 2, 0> { 1560 class LStoreNamedGeneric: public LTemplateInstruction<0, 2, 0> {
1560 public: 1561 public:
1561 LStoreNamedGeneric(LOperand* object, LOperand* value) { 1562 LStoreNamedGeneric(LOperand* object, LOperand* value) {
1562 inputs_[0] = object; 1563 inputs_[0] = object;
1563 inputs_[1] = value; 1564 inputs_[1] = value;
1564 } 1565 }
1565 1566
1566 DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric, "store-named-generic") 1567 DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric, "store-named-generic")
1567 DECLARE_HYDROGEN_ACCESSOR(StoreNamedGeneric) 1568 DECLARE_HYDROGEN_ACCESSOR(StoreNamedGeneric)
1568 1569
1569 virtual void PrintDataTo(StringStream* stream); 1570 virtual void PrintDataTo(StringStream* stream);
1570 1571
1571 LOperand* object() { return inputs_[0]; } 1572 LOperand* object() { return inputs_[0]; }
1572 LOperand* value() { return inputs_[1]; } 1573 LOperand* value() { return inputs_[1]; }
1573 Handle<Object> name() const { return hydrogen()->name(); } 1574 Handle<Object> name() const { return hydrogen()->name(); }
1574 bool strict_mode() { return hydrogen()->strict_mode(); } 1575 StrictModeFlag strict_mode_flag() { return hydrogen()->strict_mode_flag(); }
1576 bool strict_mode() { return strict_mode_flag() == kStrictMode; }
1575 }; 1577 };
1576 1578
1577 1579
1578 class LStoreKeyedFastElement: public LTemplateInstruction<0, 3, 0> { 1580 class LStoreKeyedFastElement: public LTemplateInstruction<0, 3, 0> {
1579 public: 1581 public:
1580 LStoreKeyedFastElement(LOperand* obj, LOperand* key, LOperand* val) { 1582 LStoreKeyedFastElement(LOperand* obj, LOperand* key, LOperand* val) {
1581 inputs_[0] = obj; 1583 inputs_[0] = obj;
1582 inputs_[1] = key; 1584 inputs_[1] = key;
1583 inputs_[2] = val; 1585 inputs_[2] = val;
1584 } 1586 }
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
1653 1655
1654 virtual void PrintDataTo(StringStream* stream); 1656 virtual void PrintDataTo(StringStream* stream);
1655 1657
1656 LOperand* object() { return inputs_[0]; } 1658 LOperand* object() { return inputs_[0]; }
1657 LOperand* key() { return inputs_[1]; } 1659 LOperand* key() { return inputs_[1]; }
1658 LOperand* value() { return inputs_[2]; } 1660 LOperand* value() { return inputs_[2]; }
1659 bool strict_mode() { return hydrogen()->strict_mode(); } 1661 bool strict_mode() { return hydrogen()->strict_mode(); }
1660 }; 1662 };
1661 1663
1662 1664
1665 class LTransitionElementsKind: public LTemplateInstruction<1, 1, 2> {
1666 public:
1667 LTransitionElementsKind(LOperand* object,
1668 LOperand* new_map_temp,
1669 LOperand* temp_reg) {
1670 inputs_[0] = object;
1671 temps_[0] = new_map_temp;
1672 temps_[1] = temp_reg;
1673 }
1674
1675 DECLARE_CONCRETE_INSTRUCTION(TransitionElementsKind,
1676 "transition-elements-kind")
1677 DECLARE_HYDROGEN_ACCESSOR(TransitionElementsKind)
1678
1679 virtual void PrintDataTo(StringStream* stream);
1680
1681 LOperand* object() { return inputs_[0]; }
1682 LOperand* new_map_reg() { return temps_[0]; }
1683 LOperand* temp_reg() { return temps_[1]; }
1684 Handle<Map> original_map() { return hydrogen()->original_map(); }
1685 Handle<Map> transitioned_map() { return hydrogen()->transitioned_map(); }
1686 };
1687
1688
1663 class LStringAdd: public LTemplateInstruction<1, 2, 0> { 1689 class LStringAdd: public LTemplateInstruction<1, 2, 0> {
1664 public: 1690 public:
1665 LStringAdd(LOperand* left, LOperand* right) { 1691 LStringAdd(LOperand* left, LOperand* right) {
1666 inputs_[0] = left; 1692 inputs_[0] = left;
1667 inputs_[1] = right; 1693 inputs_[1] = right;
1668 } 1694 }
1669 1695
1670 DECLARE_CONCRETE_INSTRUCTION(StringAdd, "string-add") 1696 DECLARE_CONCRETE_INSTRUCTION(StringAdd, "string-add")
1671 DECLARE_HYDROGEN_ACCESSOR(StringAdd) 1697 DECLARE_HYDROGEN_ACCESSOR(StringAdd)
1672 1698
(...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after
2177 2203
2178 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 2204 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
2179 }; 2205 };
2180 2206
2181 #undef DECLARE_HYDROGEN_ACCESSOR 2207 #undef DECLARE_HYDROGEN_ACCESSOR
2182 #undef DECLARE_CONCRETE_INSTRUCTION 2208 #undef DECLARE_CONCRETE_INSTRUCTION
2183 2209
2184 } } // namespace v8::int 2210 } } // namespace v8::int
2185 2211
2186 #endif // V8_X64_LITHIUM_X64_H_ 2212 #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