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

Side by Side Diff: src/ia32/lithium-ia32.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/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 1119 matching lines...) Expand 10 before | Expand all | Expand 10 after
1288 inputs_[1] = value; 1289 inputs_[1] = value;
1289 temps_[0] = temp; 1290 temps_[0] = temp;
1290 } 1291 }
1291 1292
1292 DECLARE_CONCRETE_INSTRUCTION(StoreContextSlot, "store-context-slot") 1293 DECLARE_CONCRETE_INSTRUCTION(StoreContextSlot, "store-context-slot")
1293 DECLARE_HYDROGEN_ACCESSOR(StoreContextSlot) 1294 DECLARE_HYDROGEN_ACCESSOR(StoreContextSlot)
1294 1295
1295 LOperand* context() { return InputAt(0); } 1296 LOperand* context() { return InputAt(0); }
1296 LOperand* value() { return InputAt(1); } 1297 LOperand* value() { return InputAt(1); }
1297 int slot_index() { return hydrogen()->slot_index(); } 1298 int slot_index() { return hydrogen()->slot_index(); }
1298 int needs_write_barrier() { return hydrogen()->NeedsWriteBarrier(); }
1299 1299
1300 virtual void PrintDataTo(StringStream* stream); 1300 virtual void PrintDataTo(StringStream* stream);
1301 }; 1301 };
1302 1302
1303 1303
1304 class LPushArgument: public LTemplateInstruction<0, 1, 0> { 1304 class LPushArgument: public LTemplateInstruction<0, 1, 0> {
1305 public: 1305 public:
1306 explicit LPushArgument(LOperand* value) { 1306 explicit LPushArgument(LOperand* value) {
1307 inputs_[0] = value; 1307 inputs_[0] = value;
1308 } 1308 }
1309 1309
1310 DECLARE_CONCRETE_INSTRUCTION(PushArgument, "push-argument") 1310 DECLARE_CONCRETE_INSTRUCTION(PushArgument, "push-argument")
1311 }; 1311 };
1312 1312
1313 1313
1314 class LThisFunction: public LTemplateInstruction<1, 0, 0> { 1314 class LThisFunction: public LTemplateInstruction<1, 0, 0> {
1315 public:
1315 DECLARE_CONCRETE_INSTRUCTION(ThisFunction, "this-function") 1316 DECLARE_CONCRETE_INSTRUCTION(ThisFunction, "this-function")
1317 DECLARE_HYDROGEN_ACCESSOR(ThisFunction)
1316 }; 1318 };
1317 1319
1318 1320
1319 class LContext: public LTemplateInstruction<1, 0, 0> { 1321 class LContext: public LTemplateInstruction<1, 0, 0> {
1320 public: 1322 public:
1321 DECLARE_CONCRETE_INSTRUCTION(Context, "context") 1323 DECLARE_CONCRETE_INSTRUCTION(Context, "context")
1322 }; 1324 };
1323 1325
1324 1326
1325 class LOuterContext: public LTemplateInstruction<1, 1, 0> { 1327 class LOuterContext: public LTemplateInstruction<1, 1, 0> {
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
1610 DECLARE_HYDROGEN_ACCESSOR(StoreNamedField) 1612 DECLARE_HYDROGEN_ACCESSOR(StoreNamedField)
1611 1613
1612 virtual void PrintDataTo(StringStream* stream); 1614 virtual void PrintDataTo(StringStream* stream);
1613 1615
1614 LOperand* object() { return inputs_[0]; } 1616 LOperand* object() { return inputs_[0]; }
1615 LOperand* value() { return inputs_[1]; } 1617 LOperand* value() { return inputs_[1]; }
1616 1618
1617 Handle<Object> name() const { return hydrogen()->name(); } 1619 Handle<Object> name() const { return hydrogen()->name(); }
1618 bool is_in_object() { return hydrogen()->is_in_object(); } 1620 bool is_in_object() { return hydrogen()->is_in_object(); }
1619 int offset() { return hydrogen()->offset(); } 1621 int offset() { return hydrogen()->offset(); }
1620 bool needs_write_barrier() { return hydrogen()->NeedsWriteBarrier(); }
1621 Handle<Map> transition() const { return hydrogen()->transition(); } 1622 Handle<Map> transition() const { return hydrogen()->transition(); }
1622 }; 1623 };
1623 1624
1624 1625
1625 class LStoreNamedGeneric: public LTemplateInstruction<0, 3, 0> { 1626 class LStoreNamedGeneric: public LTemplateInstruction<0, 3, 0> {
1626 public: 1627 public:
1627 LStoreNamedGeneric(LOperand* context, LOperand* object, LOperand* value) { 1628 LStoreNamedGeneric(LOperand* context, LOperand* object, LOperand* value) {
1628 inputs_[0] = context; 1629 inputs_[0] = context;
1629 inputs_[1] = object; 1630 inputs_[1] = object;
1630 inputs_[2] = value; 1631 inputs_[2] = value;
1631 } 1632 }
1632 1633
1633 DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric, "store-named-generic") 1634 DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric, "store-named-generic")
1634 DECLARE_HYDROGEN_ACCESSOR(StoreNamedGeneric) 1635 DECLARE_HYDROGEN_ACCESSOR(StoreNamedGeneric)
1635 1636
1636 virtual void PrintDataTo(StringStream* stream); 1637 virtual void PrintDataTo(StringStream* stream);
1637 1638
1638 LOperand* context() { return inputs_[0]; } 1639 LOperand* context() { return inputs_[0]; }
1639 LOperand* object() { return inputs_[1]; } 1640 LOperand* object() { return inputs_[1]; }
1640 LOperand* value() { return inputs_[2]; } 1641 LOperand* value() { return inputs_[2]; }
1641 Handle<Object> name() const { return hydrogen()->name(); } 1642 Handle<Object> name() const { return hydrogen()->name(); }
1642 bool strict_mode() { return hydrogen()->strict_mode(); } 1643 StrictModeFlag strict_mode_flag() { return hydrogen()->strict_mode_flag(); }
1644 bool strict_mode() { return strict_mode_flag() == kStrictMode; }
1643 }; 1645 };
1644 1646
1645 1647
1646 class LStoreKeyedFastElement: public LTemplateInstruction<0, 3, 0> { 1648 class LStoreKeyedFastElement: public LTemplateInstruction<0, 3, 0> {
1647 public: 1649 public:
1648 LStoreKeyedFastElement(LOperand* obj, LOperand* key, LOperand* val) { 1650 LStoreKeyedFastElement(LOperand* obj, LOperand* key, LOperand* val) {
1649 inputs_[0] = obj; 1651 inputs_[0] = obj;
1650 inputs_[1] = key; 1652 inputs_[1] = key;
1651 inputs_[2] = val; 1653 inputs_[2] = val;
1652 } 1654 }
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
1726 virtual void PrintDataTo(StringStream* stream); 1728 virtual void PrintDataTo(StringStream* stream);
1727 1729
1728 LOperand* context() { return inputs_[0]; } 1730 LOperand* context() { return inputs_[0]; }
1729 LOperand* object() { return inputs_[1]; } 1731 LOperand* object() { return inputs_[1]; }
1730 LOperand* key() { return inputs_[2]; } 1732 LOperand* key() { return inputs_[2]; }
1731 LOperand* value() { return inputs_[3]; } 1733 LOperand* value() { return inputs_[3]; }
1732 bool strict_mode() { return hydrogen()->strict_mode(); } 1734 bool strict_mode() { return hydrogen()->strict_mode(); }
1733 }; 1735 };
1734 1736
1735 1737
1738 class LTransitionElementsKind: public LTemplateInstruction<1, 1, 2> {
1739 public:
1740 LTransitionElementsKind(LOperand* object,
1741 LOperand* new_map_temp,
1742 LOperand* temp_reg) {
1743 inputs_[0] = object;
1744 temps_[0] = new_map_temp;
1745 temps_[1] = temp_reg;
1746 }
1747
1748 DECLARE_CONCRETE_INSTRUCTION(TransitionElementsKind,
1749 "transition-elements-kind")
1750 DECLARE_HYDROGEN_ACCESSOR(TransitionElementsKind)
1751
1752 virtual void PrintDataTo(StringStream* stream);
1753
1754 LOperand* object() { return inputs_[0]; }
1755 LOperand* new_map_reg() { return temps_[0]; }
1756 LOperand* temp_reg() { return temps_[1]; }
1757 Handle<Map> original_map() { return hydrogen()->original_map(); }
1758 Handle<Map> transitioned_map() { return hydrogen()->transitioned_map(); }
1759 };
1760
1761
1736 class LStringAdd: public LTemplateInstruction<1, 3, 0> { 1762 class LStringAdd: public LTemplateInstruction<1, 3, 0> {
1737 public: 1763 public:
1738 LStringAdd(LOperand* context, LOperand* left, LOperand* right) { 1764 LStringAdd(LOperand* context, LOperand* left, LOperand* right) {
1739 inputs_[0] = context; 1765 inputs_[0] = context;
1740 inputs_[1] = left; 1766 inputs_[1] = left;
1741 inputs_[2] = right; 1767 inputs_[2] = right;
1742 } 1768 }
1743 1769
1744 DECLARE_CONCRETE_INSTRUCTION(StringAdd, "string-add") 1770 DECLARE_CONCRETE_INSTRUCTION(StringAdd, "string-add")
1745 DECLARE_HYDROGEN_ACCESSOR(StringAdd) 1771 DECLARE_HYDROGEN_ACCESSOR(StringAdd)
(...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after
2296 2322
2297 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 2323 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
2298 }; 2324 };
2299 2325
2300 #undef DECLARE_HYDROGEN_ACCESSOR 2326 #undef DECLARE_HYDROGEN_ACCESSOR
2301 #undef DECLARE_CONCRETE_INSTRUCTION 2327 #undef DECLARE_CONCRETE_INSTRUCTION
2302 2328
2303 } } // namespace v8::internal 2329 } } // namespace v8::internal
2304 2330
2305 #endif // V8_IA32_LITHIUM_IA32_H_ 2331 #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