OLD | NEW |
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 Loading... |
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 1446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1503 | 1501 |
1504 DECLARE_CONCRETE_INSTRUCTION(SmiUntag, "smi-untag") | 1502 DECLARE_CONCRETE_INSTRUCTION(SmiUntag, "smi-untag") |
1505 | 1503 |
1506 bool needs_check() const { return needs_check_; } | 1504 bool needs_check() const { return needs_check_; } |
1507 | 1505 |
1508 private: | 1506 private: |
1509 bool needs_check_; | 1507 bool needs_check_; |
1510 }; | 1508 }; |
1511 | 1509 |
1512 | 1510 |
1513 class LStoreNamed: public LTemplateInstruction<0, 2, 0> { | 1511 class LStoreNamedField: public LTemplateInstruction<0, 2, 0> { |
1514 public: | 1512 public: |
1515 LStoreNamed(LOperand* obj, LOperand* val) { | 1513 LStoreNamedField(LOperand* obj, LOperand* val) { |
1516 inputs_[0] = obj; | 1514 inputs_[0] = obj; |
1517 inputs_[1] = val; | 1515 inputs_[1] = val; |
1518 } | 1516 } |
1519 | 1517 |
1520 DECLARE_INSTRUCTION(StoreNamed) | 1518 DECLARE_CONCRETE_INSTRUCTION(StoreNamedField, "store-named-field") |
1521 DECLARE_HYDROGEN_ACCESSOR(StoreNamed) | 1519 DECLARE_HYDROGEN_ACCESSOR(StoreNamedField) |
1522 | 1520 |
1523 virtual void PrintDataTo(StringStream* stream); | 1521 virtual void PrintDataTo(StringStream* stream); |
1524 | 1522 |
1525 LOperand* object() { return inputs_[0]; } | 1523 LOperand* object() { return inputs_[0]; } |
1526 LOperand* value() { return inputs_[1]; } | 1524 LOperand* value() { return inputs_[1]; } |
| 1525 |
1527 Handle<Object> name() const { return hydrogen()->name(); } | 1526 Handle<Object> name() const { return hydrogen()->name(); } |
1528 }; | |
1529 | |
1530 | |
1531 class LStoreNamedField: public LStoreNamed { | |
1532 public: | |
1533 LStoreNamedField(LOperand* obj, LOperand* val) | |
1534 : LStoreNamed(obj, val) { } | |
1535 | |
1536 DECLARE_CONCRETE_INSTRUCTION(StoreNamedField, "store-named-field") | |
1537 DECLARE_HYDROGEN_ACCESSOR(StoreNamedField) | |
1538 | |
1539 bool is_in_object() { return hydrogen()->is_in_object(); } | 1527 bool is_in_object() { return hydrogen()->is_in_object(); } |
1540 int offset() { return hydrogen()->offset(); } | 1528 int offset() { return hydrogen()->offset(); } |
1541 bool needs_write_barrier() { return hydrogen()->NeedsWriteBarrier(); } | 1529 bool needs_write_barrier() { return hydrogen()->NeedsWriteBarrier(); } |
1542 Handle<Map> transition() const { return hydrogen()->transition(); } | 1530 Handle<Map> transition() const { return hydrogen()->transition(); } |
1543 }; | 1531 }; |
1544 | 1532 |
1545 | 1533 |
1546 class LStoreNamedGeneric: public LStoreNamed { | 1534 class LStoreNamedGeneric: public LTemplateInstruction<0, 2, 0> { |
1547 public: | 1535 public: |
1548 LStoreNamedGeneric(LOperand* obj, LOperand* val) | 1536 LStoreNamedGeneric(LOperand* obj, LOperand* val) { |
1549 : LStoreNamed(obj, val) { } | 1537 inputs_[0] = obj; |
| 1538 inputs_[1] = val; |
| 1539 } |
1550 | 1540 |
1551 DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric, "store-named-generic") | 1541 DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric, "store-named-generic") |
1552 DECLARE_HYDROGEN_ACCESSOR(StoreNamedGeneric) | 1542 DECLARE_HYDROGEN_ACCESSOR(StoreNamedGeneric) |
| 1543 |
| 1544 virtual void PrintDataTo(StringStream* stream); |
| 1545 |
| 1546 LOperand* object() { return inputs_[0]; } |
| 1547 LOperand* value() { return inputs_[1]; } |
| 1548 Handle<Object> name() const { return hydrogen()->name(); } |
1553 }; | 1549 }; |
1554 | 1550 |
1555 | 1551 |
1556 class LStoreKeyed: public LTemplateInstruction<0, 3, 0> { | 1552 class LStoreKeyedFastElement: public LTemplateInstruction<0, 3, 0> { |
1557 public: | 1553 public: |
1558 LStoreKeyed(LOperand* obj, LOperand* key, LOperand* val) { | 1554 LStoreKeyedFastElement(LOperand* obj, LOperand* key, LOperand* val) { |
1559 inputs_[0] = obj; | 1555 inputs_[0] = obj; |
1560 inputs_[1] = key; | 1556 inputs_[1] = key; |
1561 inputs_[2] = val; | 1557 inputs_[2] = val; |
1562 } | 1558 } |
1563 | 1559 |
1564 DECLARE_INSTRUCTION(StoreKeyed) | 1560 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedFastElement, |
| 1561 "store-keyed-fast-element") |
| 1562 DECLARE_HYDROGEN_ACCESSOR(StoreKeyedFastElement) |
1565 | 1563 |
1566 virtual void PrintDataTo(StringStream* stream); | 1564 virtual void PrintDataTo(StringStream* stream); |
1567 | 1565 |
1568 LOperand* object() { return inputs_[0]; } | 1566 LOperand* object() { return inputs_[0]; } |
1569 LOperand* key() { return inputs_[1]; } | 1567 LOperand* key() { return inputs_[1]; } |
1570 LOperand* value() { return inputs_[2]; } | 1568 LOperand* value() { return inputs_[2]; } |
1571 }; | 1569 }; |
1572 | 1570 |
1573 | 1571 |
1574 class LStoreKeyedFastElement: public LStoreKeyed { | 1572 class LStoreKeyedGeneric: public LTemplateInstruction<0, 3, 0> { |
1575 public: | 1573 public: |
1576 LStoreKeyedFastElement(LOperand* obj, LOperand* key, LOperand* val) | 1574 LStoreKeyedGeneric(LOperand* obj, LOperand* key, LOperand* val) { |
1577 : LStoreKeyed(obj, key, val) {} | 1575 inputs_[0] = obj; |
| 1576 inputs_[1] = key; |
| 1577 inputs_[2] = val; |
| 1578 } |
1578 | 1579 |
1579 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedFastElement, | 1580 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedGeneric, "store-keyed-generic") |
1580 "store-keyed-fast-element") | 1581 |
1581 DECLARE_HYDROGEN_ACCESSOR(StoreKeyedFastElement) | 1582 virtual void PrintDataTo(StringStream* stream); |
| 1583 |
| 1584 LOperand* object() { return inputs_[0]; } |
| 1585 LOperand* key() { return inputs_[1]; } |
| 1586 LOperand* value() { return inputs_[2]; } |
1582 }; | 1587 }; |
1583 | 1588 |
1584 | 1589 |
1585 class LStoreKeyedGeneric: public LStoreKeyed { | |
1586 public: | |
1587 LStoreKeyedGeneric(LOperand* obj, LOperand* key, LOperand* val) | |
1588 : LStoreKeyed(obj, key, val) { } | |
1589 | |
1590 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedGeneric, "store-keyed-generic") | |
1591 }; | |
1592 | |
1593 | |
1594 class LStringCharCodeAt: public LTemplateInstruction<1, 2, 0> { | 1590 class LStringCharCodeAt: public LTemplateInstruction<1, 2, 0> { |
1595 public: | 1591 public: |
1596 LStringCharCodeAt(LOperand* string, LOperand* index) { | 1592 LStringCharCodeAt(LOperand* string, LOperand* index) { |
1597 inputs_[0] = string; | 1593 inputs_[0] = string; |
1598 inputs_[1] = index; | 1594 inputs_[1] = index; |
1599 } | 1595 } |
1600 | 1596 |
1601 DECLARE_CONCRETE_INSTRUCTION(StringCharCodeAt, "string-char-code-at") | 1597 DECLARE_CONCRETE_INSTRUCTION(StringCharCodeAt, "string-char-code-at") |
1602 DECLARE_HYDROGEN_ACCESSOR(StringCharCodeAt) | 1598 DECLARE_HYDROGEN_ACCESSOR(StringCharCodeAt) |
1603 | 1599 |
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2028 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2024 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
2029 }; | 2025 }; |
2030 | 2026 |
2031 #undef DECLARE_HYDROGEN_ACCESSOR | 2027 #undef DECLARE_HYDROGEN_ACCESSOR |
2032 #undef DECLARE_INSTRUCTION | 2028 #undef DECLARE_INSTRUCTION |
2033 #undef DECLARE_CONCRETE_INSTRUCTION | 2029 #undef DECLARE_CONCRETE_INSTRUCTION |
2034 | 2030 |
2035 } } // namespace v8::internal | 2031 } } // namespace v8::internal |
2036 | 2032 |
2037 #endif // V8_ARM_LITHIUM_ARM_H_ | 2033 #endif // V8_ARM_LITHIUM_ARM_H_ |
OLD | NEW |