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

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

Issue 6538080: Add template parameter for hydrogen input operands. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: added other platforms Created 9 years, 10 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/hydrogen-instructions.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 24 matching lines...) Expand all
35 35
36 namespace v8 { 36 namespace v8 {
37 namespace internal { 37 namespace internal {
38 38
39 // Forward declarations. 39 // Forward declarations.
40 class LCodeGen; 40 class LCodeGen;
41 41
42 #define LITHIUM_ALL_INSTRUCTION_LIST(V) \ 42 #define LITHIUM_ALL_INSTRUCTION_LIST(V) \
43 V(ControlInstruction) \ 43 V(ControlInstruction) \
44 V(Call) \ 44 V(Call) \
45 V(StoreKeyed) \
46 V(StoreNamed) \
47 LITHIUM_CONCRETE_INSTRUCTION_LIST(V) 45 LITHIUM_CONCRETE_INSTRUCTION_LIST(V)
48 46
49 47
50 #define LITHIUM_CONCRETE_INSTRUCTION_LIST(V) \ 48 #define LITHIUM_CONCRETE_INSTRUCTION_LIST(V) \
51 V(AccessArgumentsAt) \ 49 V(AccessArgumentsAt) \
52 V(AddI) \ 50 V(AddI) \
53 V(ApplyArguments) \ 51 V(ApplyArguments) \
54 V(ArgumentsElements) \ 52 V(ArgumentsElements) \
55 V(ArgumentsLength) \ 53 V(ArgumentsLength) \
56 V(ArithmeticD) \ 54 V(ArithmeticD) \
(...skipping 1517 matching lines...) Expand 10 before | Expand all | Expand 10 after
1574 1572
1575 DECLARE_CONCRETE_INSTRUCTION(SmiUntag, "smi-untag") 1573 DECLARE_CONCRETE_INSTRUCTION(SmiUntag, "smi-untag")
1576 1574
1577 bool needs_check() const { return needs_check_; } 1575 bool needs_check() const { return needs_check_; }
1578 1576
1579 private: 1577 private:
1580 bool needs_check_; 1578 bool needs_check_;
1581 }; 1579 };
1582 1580
1583 1581
1584 class LStoreNamed: public LTemplateInstruction<0, 2, 1> { 1582 class LStoreNamedField: public LTemplateInstruction<0, 2, 1> {
1585 public: 1583 public:
1586 LStoreNamed(LOperand* obj, LOperand* val) { 1584 LStoreNamedField(LOperand* obj, LOperand* val, LOperand* temp) {
1587 inputs_[0] = obj; 1585 inputs_[0] = obj;
1588 inputs_[1] = val; 1586 inputs_[1] = val;
1589 }
1590
1591 DECLARE_INSTRUCTION(StoreNamed)
1592 DECLARE_HYDROGEN_ACCESSOR(StoreNamed)
1593
1594 virtual void PrintDataTo(StringStream* stream);
1595
1596 LOperand* object() { return inputs_[0]; }
1597 LOperand* value() { return inputs_[1]; }
1598 Handle<Object> name() const { return hydrogen()->name(); }
1599 };
1600
1601
1602 class LStoreNamedField: public LStoreNamed {
1603 public:
1604 LStoreNamedField(LOperand* obj, LOperand* val, LOperand* temp)
1605 : LStoreNamed(obj, val) {
1606 temps_[0] = temp; 1587 temps_[0] = temp;
1607 } 1588 }
1608 1589
1609 DECLARE_CONCRETE_INSTRUCTION(StoreNamedField, "store-named-field") 1590 DECLARE_CONCRETE_INSTRUCTION(StoreNamedField, "store-named-field")
1610 DECLARE_HYDROGEN_ACCESSOR(StoreNamedField) 1591 DECLARE_HYDROGEN_ACCESSOR(StoreNamedField)
1611 1592
1593 virtual void PrintDataTo(StringStream* stream);
1594
1595 LOperand* object() { return inputs_[0]; }
1596 LOperand* value() { return inputs_[1]; }
1597
1598 Handle<Object> name() const { return hydrogen()->name(); }
1612 bool is_in_object() { return hydrogen()->is_in_object(); } 1599 bool is_in_object() { return hydrogen()->is_in_object(); }
1613 int offset() { return hydrogen()->offset(); } 1600 int offset() { return hydrogen()->offset(); }
1614 bool needs_write_barrier() { return hydrogen()->NeedsWriteBarrier(); } 1601 bool needs_write_barrier() { return hydrogen()->NeedsWriteBarrier(); }
1615 Handle<Map> transition() const { return hydrogen()->transition(); } 1602 Handle<Map> transition() const { return hydrogen()->transition(); }
1616 }; 1603 };
1617 1604
1618 1605
1619 class LStoreNamedGeneric: public LTemplateInstruction<0, 3, 0> { 1606 class LStoreNamedGeneric: public LTemplateInstruction<0, 3, 0> {
1620 public: 1607 public:
1621 LStoreNamedGeneric(LOperand* context, LOperand* object, LOperand* value) { 1608 LStoreNamedGeneric(LOperand* context, LOperand* object, LOperand* value) {
1622 inputs_[0] = context; 1609 inputs_[0] = context;
1623 inputs_[1] = object; 1610 inputs_[1] = object;
1624 inputs_[2] = value; 1611 inputs_[2] = value;
1625 } 1612 }
1626 1613
1627 DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric, "store-named-generic") 1614 DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric, "store-named-generic")
1628 DECLARE_HYDROGEN_ACCESSOR(StoreNamedGeneric) 1615 DECLARE_HYDROGEN_ACCESSOR(StoreNamedGeneric)
1629 1616
1617 virtual void PrintDataTo(StringStream* stream);
1618
1630 LOperand* context() { return inputs_[0]; } 1619 LOperand* context() { return inputs_[0]; }
1631 LOperand* object() { return inputs_[1]; } 1620 LOperand* object() { return inputs_[1]; }
1632 LOperand* value() { return inputs_[2]; } 1621 LOperand* value() { return inputs_[2]; }
1633 Handle<Object> name() const { return hydrogen()->name(); } 1622 Handle<Object> name() const { return hydrogen()->name(); }
1634 }; 1623 };
1635 1624
1636 1625
1637 class LStoreKeyed: public LTemplateInstruction<0, 3, 0> { 1626 class LStoreKeyedFastElement: public LTemplateInstruction<0, 3, 0> {
1638 public: 1627 public:
1639 LStoreKeyed(LOperand* obj, LOperand* key, LOperand* val) { 1628 LStoreKeyedFastElement(LOperand* obj, LOperand* key, LOperand* val) {
1640 inputs_[0] = obj; 1629 inputs_[0] = obj;
1641 inputs_[1] = key; 1630 inputs_[1] = key;
1642 inputs_[2] = val; 1631 inputs_[2] = val;
1643 } 1632 }
1644 1633
1645 DECLARE_INSTRUCTION(StoreKeyed) 1634 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedFastElement,
1635 "store-keyed-fast-element")
1636 DECLARE_HYDROGEN_ACCESSOR(StoreKeyedFastElement)
1646 1637
1647 virtual void PrintDataTo(StringStream* stream); 1638 virtual void PrintDataTo(StringStream* stream);
1648 1639
1649 LOperand* object() { return inputs_[0]; } 1640 LOperand* object() { return inputs_[0]; }
1650 LOperand* key() { return inputs_[1]; } 1641 LOperand* key() { return inputs_[1]; }
1651 LOperand* value() { return inputs_[2]; } 1642 LOperand* value() { return inputs_[2]; }
1652 }; 1643 };
1653 1644
1654 1645
1655 class LStoreKeyedFastElement: public LStoreKeyed {
1656 public:
1657 LStoreKeyedFastElement(LOperand* obj, LOperand* key, LOperand* val)
1658 : LStoreKeyed(obj, key, val) {}
1659
1660 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedFastElement,
1661 "store-keyed-fast-element")
1662 DECLARE_HYDROGEN_ACCESSOR(StoreKeyedFastElement)
1663 };
1664
1665
1666 class LStorePixelArrayElement: public LTemplateInstruction<0, 3, 1> { 1646 class LStorePixelArrayElement: public LTemplateInstruction<0, 3, 1> {
1667 public: 1647 public:
1668 LStorePixelArrayElement(LOperand* external_pointer, 1648 LStorePixelArrayElement(LOperand* external_pointer,
1669 LOperand* key, 1649 LOperand* key,
1670 LOperand* val, 1650 LOperand* val,
1671 LOperand* clamped) { 1651 LOperand* clamped) {
1672 inputs_[0] = external_pointer; 1652 inputs_[0] = external_pointer;
1673 inputs_[1] = key; 1653 inputs_[1] = key;
1674 inputs_[2] = val; 1654 inputs_[2] = val;
1675 temps_[0] = clamped; 1655 temps_[0] = clamped;
(...skipping 16 matching lines...) Expand all
1692 LOperand* key, 1672 LOperand* key,
1693 LOperand* value) { 1673 LOperand* value) {
1694 inputs_[0] = context; 1674 inputs_[0] = context;
1695 inputs_[1] = object; 1675 inputs_[1] = object;
1696 inputs_[2] = key; 1676 inputs_[2] = key;
1697 inputs_[3] = value; 1677 inputs_[3] = value;
1698 } 1678 }
1699 1679
1700 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedGeneric, "store-keyed-generic") 1680 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedGeneric, "store-keyed-generic")
1701 1681
1682 virtual void PrintDataTo(StringStream* stream);
1683
1702 LOperand* context() { return inputs_[0]; } 1684 LOperand* context() { return inputs_[0]; }
1703 LOperand* object() { return inputs_[1]; } 1685 LOperand* object() { return inputs_[1]; }
1704 LOperand* key() { return inputs_[2]; } 1686 LOperand* key() { return inputs_[2]; }
1705 LOperand* value() { return inputs_[3]; } 1687 LOperand* value() { return inputs_[3]; }
1706 }; 1688 };
1707 1689
1708 1690
1709 class LStringCharCodeAt: public LTemplateInstruction<1, 2, 0> { 1691 class LStringCharCodeAt: public LTemplateInstruction<1, 2, 0> {
1710 public: 1692 public:
1711 LStringCharCodeAt(LOperand* string, LOperand* index) { 1693 LStringCharCodeAt(LOperand* string, LOperand* index) {
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after
2136 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 2118 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
2137 }; 2119 };
2138 2120
2139 #undef DECLARE_HYDROGEN_ACCESSOR 2121 #undef DECLARE_HYDROGEN_ACCESSOR
2140 #undef DECLARE_INSTRUCTION 2122 #undef DECLARE_INSTRUCTION
2141 #undef DECLARE_CONCRETE_INSTRUCTION 2123 #undef DECLARE_CONCRETE_INSTRUCTION
2142 2124
2143 } } // namespace v8::internal 2125 } } // namespace v8::internal
2144 2126
2145 #endif // V8_IA32_LITHIUM_IA32_H_ 2127 #endif // V8_IA32_LITHIUM_IA32_H_
OLDNEW
« no previous file with comments | « src/hydrogen-instructions.cc ('k') | src/ia32/lithium-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698