| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef VM_INTERMEDIATE_LANGUAGE_H_ | 5 #ifndef VM_INTERMEDIATE_LANGUAGE_H_ |
| 6 #define VM_INTERMEDIATE_LANGUAGE_H_ | 6 #define VM_INTERMEDIATE_LANGUAGE_H_ |
| 7 | 7 |
| 8 #include "vm/allocation.h" | 8 #include "vm/allocation.h" |
| 9 #include "vm/ast.h" | 9 #include "vm/ast.h" |
| 10 #include "vm/growable_array.h" | 10 #include "vm/growable_array.h" |
| (...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 592 #define DECLARE_INSTRUCTION_BACKEND() \ | 592 #define DECLARE_INSTRUCTION_BACKEND() \ |
| 593 virtual LocationSummary* MakeLocationSummary(Zone* zone, \ | 593 virtual LocationSummary* MakeLocationSummary(Zone* zone, \ |
| 594 bool optimizing) const; \ | 594 bool optimizing) const; \ |
| 595 virtual void EmitNativeCode(FlowGraphCompiler* compiler); \ | 595 virtual void EmitNativeCode(FlowGraphCompiler* compiler); \ |
| 596 | 596 |
| 597 // Functions required in all concrete instruction classes. | 597 // Functions required in all concrete instruction classes. |
| 598 #define DECLARE_INSTRUCTION(type) \ | 598 #define DECLARE_INSTRUCTION(type) \ |
| 599 DECLARE_INSTRUCTION_NO_BACKEND(type) \ | 599 DECLARE_INSTRUCTION_NO_BACKEND(type) \ |
| 600 DECLARE_INSTRUCTION_BACKEND() \ | 600 DECLARE_INSTRUCTION_BACKEND() \ |
| 601 | 601 |
| 602 #ifndef PRODUCT |
| 603 #define PRINT_TO_SUPPORT \ |
| 604 virtual void PrintTo(BufferFormatter* f) const; |
| 605 #else |
| 606 #define PRINT_TO_SUPPORT |
| 607 #endif // !PRODUCT |
| 608 |
| 609 #ifndef PRODUCT |
| 610 #define PRINT_OPERANDS_TO_SUPPORT \ |
| 611 virtual void PrintOperandsTo(BufferFormatter* f) const; |
| 612 #else |
| 613 #define PRINT_OPERANDS_TO_SUPPORT |
| 614 #endif // !PRODUCT |
| 615 |
| 602 class Instruction : public ZoneAllocated { | 616 class Instruction : public ZoneAllocated { |
| 603 public: | 617 public: |
| 604 #define DECLARE_TAG(type) k##type, | 618 #define DECLARE_TAG(type) k##type, |
| 605 enum Tag { | 619 enum Tag { |
| 606 FOR_EACH_INSTRUCTION(DECLARE_TAG) | 620 FOR_EACH_INSTRUCTION(DECLARE_TAG) |
| 607 }; | 621 }; |
| 608 #undef DECLARE_TAG | 622 #undef DECLARE_TAG |
| 609 | 623 |
| 610 explicit Instruction(intptr_t deopt_id = Thread::kNoDeoptId) | 624 explicit Instruction(intptr_t deopt_id = Thread::kNoDeoptId) |
| 611 : deopt_id_(deopt_id), | 625 : deopt_id_(deopt_id), |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 697 // function. | 711 // function. |
| 698 virtual intptr_t SuccessorCount() const; | 712 virtual intptr_t SuccessorCount() const; |
| 699 virtual BlockEntryInstr* SuccessorAt(intptr_t index) const; | 713 virtual BlockEntryInstr* SuccessorAt(intptr_t index) const; |
| 700 | 714 |
| 701 void Goto(JoinEntryInstr* entry); | 715 void Goto(JoinEntryInstr* entry); |
| 702 | 716 |
| 703 virtual const char* DebugName() const = 0; | 717 virtual const char* DebugName() const = 0; |
| 704 | 718 |
| 705 // Printing support. | 719 // Printing support. |
| 706 const char* ToCString() const; | 720 const char* ToCString() const; |
| 721 #ifndef PRODUCT |
| 707 virtual void PrintTo(BufferFormatter* f) const; | 722 virtual void PrintTo(BufferFormatter* f) const; |
| 708 virtual void PrintOperandsTo(BufferFormatter* f) const; | 723 virtual void PrintOperandsTo(BufferFormatter* f) const; |
| 724 #endif |
| 709 | 725 |
| 710 #define DECLARE_INSTRUCTION_TYPE_CHECK(Name, Type) \ | 726 #define DECLARE_INSTRUCTION_TYPE_CHECK(Name, Type) \ |
| 711 bool Is##Name() { return (As##Name() != NULL); } \ | 727 bool Is##Name() { return (As##Name() != NULL); } \ |
| 712 virtual Type* As##Name() { return NULL; } | 728 virtual Type* As##Name() { return NULL; } |
| 713 #define INSTRUCTION_TYPE_CHECK(Name) \ | 729 #define INSTRUCTION_TYPE_CHECK(Name) \ |
| 714 DECLARE_INSTRUCTION_TYPE_CHECK(Name, Name##Instr) | 730 DECLARE_INSTRUCTION_TYPE_CHECK(Name, Name##Instr) |
| 715 | 731 |
| 716 DECLARE_INSTRUCTION_TYPE_CHECK(Definition, Definition) | 732 DECLARE_INSTRUCTION_TYPE_CHECK(Definition, Definition) |
| 717 FOR_EACH_INSTRUCTION(INSTRUCTION_TYPE_CHECK) | 733 FOR_EACH_INSTRUCTION(INSTRUCTION_TYPE_CHECK) |
| 718 FOR_EACH_ABSTRACT_INSTRUCTION(INSTRUCTION_TYPE_CHECK) | 734 FOR_EACH_ABSTRACT_INSTRUCTION(INSTRUCTION_TYPE_CHECK) |
| (...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1047 moves_.Add(move); | 1063 moves_.Add(move); |
| 1048 return move; | 1064 return move; |
| 1049 } | 1065 } |
| 1050 | 1066 |
| 1051 MoveOperands* MoveOperandsAt(intptr_t index) const { return moves_[index]; } | 1067 MoveOperands* MoveOperandsAt(intptr_t index) const { return moves_[index]; } |
| 1052 | 1068 |
| 1053 intptr_t NumMoves() const { return moves_.length(); } | 1069 intptr_t NumMoves() const { return moves_.length(); } |
| 1054 | 1070 |
| 1055 bool IsRedundant() const; | 1071 bool IsRedundant() const; |
| 1056 | 1072 |
| 1057 virtual void PrintTo(BufferFormatter* f) const; | |
| 1058 | |
| 1059 virtual TokenPosition token_pos() const { | 1073 virtual TokenPosition token_pos() const { |
| 1060 return TokenPosition::kParallelMove; | 1074 return TokenPosition::kParallelMove; |
| 1061 } | 1075 } |
| 1062 | 1076 |
| 1077 PRINT_TO_SUPPORT |
| 1078 |
| 1063 private: | 1079 private: |
| 1064 GrowableArray<MoveOperands*> moves_; // Elements cannot be null. | 1080 GrowableArray<MoveOperands*> moves_; // Elements cannot be null. |
| 1065 | 1081 |
| 1066 DISALLOW_COPY_AND_ASSIGN(ParallelMoveInstr); | 1082 DISALLOW_COPY_AND_ASSIGN(ParallelMoveInstr); |
| 1067 }; | 1083 }; |
| 1068 | 1084 |
| 1069 | 1085 |
| 1070 // Basic block entries are administrative nodes. There is a distinguished | 1086 // Basic block entries are administrative nodes. There is a distinguished |
| 1071 // graph entry with no predecessor. Joins are the only nodes with multiple | 1087 // graph entry with no predecessor. Joins are the only nodes with multiple |
| 1072 // predecessors. Targets are all other basic block entries. The types | 1088 // predecessors. Targets are all other basic block entries. The types |
| (...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1368 } | 1384 } |
| 1369 | 1385 |
| 1370 const GrowableArray<CatchBlockEntryInstr*>& catch_entries() const { | 1386 const GrowableArray<CatchBlockEntryInstr*>& catch_entries() const { |
| 1371 return catch_entries_; | 1387 return catch_entries_; |
| 1372 } | 1388 } |
| 1373 | 1389 |
| 1374 const GrowableArray<IndirectEntryInstr*>& indirect_entries() const { | 1390 const GrowableArray<IndirectEntryInstr*>& indirect_entries() const { |
| 1375 return indirect_entries_; | 1391 return indirect_entries_; |
| 1376 } | 1392 } |
| 1377 | 1393 |
| 1378 virtual void PrintTo(BufferFormatter* f) const; | 1394 PRINT_TO_SUPPORT |
| 1379 | 1395 |
| 1380 private: | 1396 private: |
| 1381 virtual void ClearPredecessors() {} | 1397 virtual void ClearPredecessors() {} |
| 1382 virtual void AddPredecessor(BlockEntryInstr* predecessor) { UNREACHABLE(); } | 1398 virtual void AddPredecessor(BlockEntryInstr* predecessor) { UNREACHABLE(); } |
| 1383 | 1399 |
| 1384 const ParsedFunction& parsed_function_; | 1400 const ParsedFunction& parsed_function_; |
| 1385 TargetEntryInstr* normal_entry_; | 1401 TargetEntryInstr* normal_entry_; |
| 1386 GrowableArray<CatchBlockEntryInstr*> catch_entries_; | 1402 GrowableArray<CatchBlockEntryInstr*> catch_entries_; |
| 1387 // Indirect targets are blocks reachable only through indirect gotos. | 1403 // Indirect targets are blocks reachable only through indirect gotos. |
| 1388 GrowableArray<IndirectEntryInstr*> indirect_entries_; | 1404 GrowableArray<IndirectEntryInstr*> indirect_entries_; |
| (...skipping 25 matching lines...) Expand all Loading... |
| 1414 intptr_t IndexOfPredecessor(BlockEntryInstr* pred) const; | 1430 intptr_t IndexOfPredecessor(BlockEntryInstr* pred) const; |
| 1415 | 1431 |
| 1416 ZoneGrowableArray<PhiInstr*>* phis() const { return phis_; } | 1432 ZoneGrowableArray<PhiInstr*>* phis() const { return phis_; } |
| 1417 | 1433 |
| 1418 PhiInstr* InsertPhi(intptr_t var_index, intptr_t var_count); | 1434 PhiInstr* InsertPhi(intptr_t var_index, intptr_t var_count); |
| 1419 void RemoveDeadPhis(Definition* replacement); | 1435 void RemoveDeadPhis(Definition* replacement); |
| 1420 | 1436 |
| 1421 void InsertPhi(PhiInstr* phi); | 1437 void InsertPhi(PhiInstr* phi); |
| 1422 void RemovePhi(PhiInstr* phi); | 1438 void RemovePhi(PhiInstr* phi); |
| 1423 | 1439 |
| 1424 virtual void PrintTo(BufferFormatter* f) const; | |
| 1425 | |
| 1426 virtual EffectSet Effects() const { return EffectSet::None(); } | 1440 virtual EffectSet Effects() const { return EffectSet::None(); } |
| 1427 virtual EffectSet Dependencies() const { return EffectSet::None(); } | 1441 virtual EffectSet Dependencies() const { return EffectSet::None(); } |
| 1428 | 1442 |
| 1443 PRINT_TO_SUPPORT |
| 1444 |
| 1429 private: | 1445 private: |
| 1430 // Classes that have access to predecessors_ when inlining. | 1446 // Classes that have access to predecessors_ when inlining. |
| 1431 friend class BlockEntryInstr; | 1447 friend class BlockEntryInstr; |
| 1432 friend class InlineExitCollector; | 1448 friend class InlineExitCollector; |
| 1433 friend class PolymorphicInliner; | 1449 friend class PolymorphicInliner; |
| 1434 friend class IndirectEntryInstr; // Access in il_printer.cc. | 1450 friend class IndirectEntryInstr; // Access in il_printer.cc. |
| 1435 | 1451 |
| 1436 // Direct access to phis_ in order to resize it due to phi elimination. | 1452 // Direct access to phis_ in order to resize it due to phi elimination. |
| 1437 friend class ConstantPropagator; | 1453 friend class ConstantPropagator; |
| 1438 friend class DeadCodeElimination; | 1454 friend class DeadCodeElimination; |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1485 void adjust_edge_weight(double scale_factor) { edge_weight_ *= scale_factor; } | 1501 void adjust_edge_weight(double scale_factor) { edge_weight_ *= scale_factor; } |
| 1486 | 1502 |
| 1487 virtual intptr_t PredecessorCount() const { | 1503 virtual intptr_t PredecessorCount() const { |
| 1488 return (predecessor_ == NULL) ? 0 : 1; | 1504 return (predecessor_ == NULL) ? 0 : 1; |
| 1489 } | 1505 } |
| 1490 virtual BlockEntryInstr* PredecessorAt(intptr_t index) const { | 1506 virtual BlockEntryInstr* PredecessorAt(intptr_t index) const { |
| 1491 ASSERT((index == 0) && (predecessor_ != NULL)); | 1507 ASSERT((index == 0) && (predecessor_ != NULL)); |
| 1492 return predecessor_; | 1508 return predecessor_; |
| 1493 } | 1509 } |
| 1494 | 1510 |
| 1495 virtual void PrintTo(BufferFormatter* f) const; | 1511 PRINT_TO_SUPPORT |
| 1496 | 1512 |
| 1497 private: | 1513 private: |
| 1498 friend class BlockEntryInstr; // Access to predecessor_ when inlining. | 1514 friend class BlockEntryInstr; // Access to predecessor_ when inlining. |
| 1499 | 1515 |
| 1500 virtual void ClearPredecessors() { predecessor_ = NULL; } | 1516 virtual void ClearPredecessors() { predecessor_ = NULL; } |
| 1501 virtual void AddPredecessor(BlockEntryInstr* predecessor) { | 1517 virtual void AddPredecessor(BlockEntryInstr* predecessor) { |
| 1502 ASSERT(predecessor_ == NULL); | 1518 ASSERT(predecessor_ == NULL); |
| 1503 predecessor_ = predecessor; | 1519 predecessor_ = predecessor; |
| 1504 } | 1520 } |
| 1505 | 1521 |
| 1506 BlockEntryInstr* predecessor_; | 1522 BlockEntryInstr* predecessor_; |
| 1507 double edge_weight_; | 1523 double edge_weight_; |
| 1508 | 1524 |
| 1509 DISALLOW_COPY_AND_ASSIGN(TargetEntryInstr); | 1525 DISALLOW_COPY_AND_ASSIGN(TargetEntryInstr); |
| 1510 }; | 1526 }; |
| 1511 | 1527 |
| 1512 | 1528 |
| 1513 class IndirectEntryInstr : public JoinEntryInstr { | 1529 class IndirectEntryInstr : public JoinEntryInstr { |
| 1514 public: | 1530 public: |
| 1515 IndirectEntryInstr(intptr_t block_id, | 1531 IndirectEntryInstr(intptr_t block_id, |
| 1516 intptr_t indirect_id, | 1532 intptr_t indirect_id, |
| 1517 intptr_t try_index) | 1533 intptr_t try_index) |
| 1518 : JoinEntryInstr(block_id, try_index), | 1534 : JoinEntryInstr(block_id, try_index), |
| 1519 indirect_id_(indirect_id) { } | 1535 indirect_id_(indirect_id) { } |
| 1520 | 1536 |
| 1521 DECLARE_INSTRUCTION(IndirectEntry) | 1537 DECLARE_INSTRUCTION(IndirectEntry) |
| 1522 | 1538 |
| 1523 virtual void PrintTo(BufferFormatter* f) const; | 1539 intptr_t indirect_id() const { return indirect_id_; } |
| 1524 | 1540 |
| 1525 intptr_t indirect_id() const { return indirect_id_; } | 1541 PRINT_TO_SUPPORT |
| 1526 | 1542 |
| 1527 private: | 1543 private: |
| 1528 const intptr_t indirect_id_; | 1544 const intptr_t indirect_id_; |
| 1529 }; | 1545 }; |
| 1530 | 1546 |
| 1531 | 1547 |
| 1532 class CatchBlockEntryInstr : public BlockEntryInstr { | 1548 class CatchBlockEntryInstr : public BlockEntryInstr { |
| 1533 public: | 1549 public: |
| 1534 CatchBlockEntryInstr(intptr_t block_id, | 1550 CatchBlockEntryInstr(intptr_t block_id, |
| 1535 intptr_t try_index, | 1551 intptr_t try_index, |
| (...skipping 27 matching lines...) Expand all Loading... |
| 1563 | 1579 |
| 1564 // Returns try index for the try block to which this catch handler | 1580 // Returns try index for the try block to which this catch handler |
| 1565 // corresponds. | 1581 // corresponds. |
| 1566 intptr_t catch_try_index() const { | 1582 intptr_t catch_try_index() const { |
| 1567 return catch_try_index_; | 1583 return catch_try_index_; |
| 1568 } | 1584 } |
| 1569 GrowableArray<Definition*>* initial_definitions() { | 1585 GrowableArray<Definition*>* initial_definitions() { |
| 1570 return &initial_definitions_; | 1586 return &initial_definitions_; |
| 1571 } | 1587 } |
| 1572 | 1588 |
| 1573 virtual void PrintTo(BufferFormatter* f) const; | 1589 PRINT_TO_SUPPORT |
| 1574 | 1590 |
| 1575 private: | 1591 private: |
| 1576 friend class BlockEntryInstr; // Access to predecessor_ when inlining. | 1592 friend class BlockEntryInstr; // Access to predecessor_ when inlining. |
| 1577 | 1593 |
| 1578 virtual void ClearPredecessors() { predecessor_ = NULL; } | 1594 virtual void ClearPredecessors() { predecessor_ = NULL; } |
| 1579 virtual void AddPredecessor(BlockEntryInstr* predecessor) { | 1595 virtual void AddPredecessor(BlockEntryInstr* predecessor) { |
| 1580 ASSERT(predecessor_ == NULL); | 1596 ASSERT(predecessor_ == NULL); |
| 1581 predecessor_ = predecessor; | 1597 predecessor_ = predecessor; |
| 1582 } | 1598 } |
| 1583 | 1599 |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1705 // building). | 1721 // building). |
| 1706 virtual CompileType ComputeType() const { | 1722 virtual CompileType ComputeType() const { |
| 1707 return CompileType::Dynamic(); | 1723 return CompileType::Dynamic(); |
| 1708 } | 1724 } |
| 1709 | 1725 |
| 1710 // Update CompileType of the definition. Returns true if the type has changed. | 1726 // Update CompileType of the definition. Returns true if the type has changed. |
| 1711 virtual bool RecomputeType() { | 1727 virtual bool RecomputeType() { |
| 1712 return false; | 1728 return false; |
| 1713 } | 1729 } |
| 1714 | 1730 |
| 1731 PRINT_OPERANDS_TO_SUPPORT |
| 1732 PRINT_TO_SUPPORT |
| 1733 |
| 1715 bool UpdateType(CompileType new_type) { | 1734 bool UpdateType(CompileType new_type) { |
| 1716 if (type_ == NULL) { | 1735 if (type_ == NULL) { |
| 1717 type_ = ZoneCompileType::Wrap(new_type); | 1736 type_ = ZoneCompileType::Wrap(new_type); |
| 1718 return true; | 1737 return true; |
| 1719 } | 1738 } |
| 1720 | 1739 |
| 1721 if (type_->IsNone() || !type_->IsEqualTo(&new_type)) { | 1740 if (type_->IsNone() || !type_->IsEqualTo(&new_type)) { |
| 1722 *type_ = new_type; | 1741 *type_ = new_type; |
| 1723 return true; | 1742 return true; |
| 1724 } | 1743 } |
| (...skipping 21 matching lines...) Expand all Loading... |
| 1746 // Precondition: use lists must be properly calculated. | 1765 // Precondition: use lists must be properly calculated. |
| 1747 // Postcondition: use lists and use values are still valid. | 1766 // Postcondition: use lists and use values are still valid. |
| 1748 void ReplaceUsesWith(Definition* other); | 1767 void ReplaceUsesWith(Definition* other); |
| 1749 | 1768 |
| 1750 // Replace this definition and all uses with another definition. If | 1769 // Replace this definition and all uses with another definition. If |
| 1751 // replacing during iteration, pass the iterator so that the instruction | 1770 // replacing during iteration, pass the iterator so that the instruction |
| 1752 // can be replaced without affecting iteration order, otherwise pass a | 1771 // can be replaced without affecting iteration order, otherwise pass a |
| 1753 // NULL iterator. | 1772 // NULL iterator. |
| 1754 void ReplaceWith(Definition* other, ForwardInstructionIterator* iterator); | 1773 void ReplaceWith(Definition* other, ForwardInstructionIterator* iterator); |
| 1755 | 1774 |
| 1756 // Printing support. These functions are sometimes overridden for custom | |
| 1757 // formatting. Otherwise, it prints in the format "opcode(op1, op2, op3)". | |
| 1758 virtual void PrintTo(BufferFormatter* f) const; | |
| 1759 virtual void PrintOperandsTo(BufferFormatter* f) const; | |
| 1760 | |
| 1761 // A value in the constant propagation lattice. | 1775 // A value in the constant propagation lattice. |
| 1762 // - non-constant sentinel | 1776 // - non-constant sentinel |
| 1763 // - a constant (any non-sentinel value) | 1777 // - a constant (any non-sentinel value) |
| 1764 // - unknown sentinel | 1778 // - unknown sentinel |
| 1765 Object& constant_value(); | 1779 Object& constant_value(); |
| 1766 | 1780 |
| 1767 virtual void InferRange(RangeAnalysis* analysis, Range* range); | 1781 virtual void InferRange(RangeAnalysis* analysis, Range* range); |
| 1768 | 1782 |
| 1769 Range* range() const { return range_; } | 1783 Range* range() const { return range_; } |
| 1770 void set_range(const Range&); | 1784 void set_range(const Range&); |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1930 representation_ = r; | 1944 representation_ = r; |
| 1931 } | 1945 } |
| 1932 | 1946 |
| 1933 virtual intptr_t Hashcode() const { | 1947 virtual intptr_t Hashcode() const { |
| 1934 UNREACHABLE(); | 1948 UNREACHABLE(); |
| 1935 return 0; | 1949 return 0; |
| 1936 } | 1950 } |
| 1937 | 1951 |
| 1938 DECLARE_INSTRUCTION(Phi) | 1952 DECLARE_INSTRUCTION(Phi) |
| 1939 | 1953 |
| 1940 virtual void PrintTo(BufferFormatter* f) const; | |
| 1941 | |
| 1942 virtual void InferRange(RangeAnalysis* analysis, Range* range); | 1954 virtual void InferRange(RangeAnalysis* analysis, Range* range); |
| 1943 | 1955 |
| 1944 BitVector* reaching_defs() const { | 1956 BitVector* reaching_defs() const { |
| 1945 return reaching_defs_; | 1957 return reaching_defs_; |
| 1946 } | 1958 } |
| 1947 | 1959 |
| 1948 void set_reaching_defs(BitVector* reaching_defs) { | 1960 void set_reaching_defs(BitVector* reaching_defs) { |
| 1949 reaching_defs_ = reaching_defs; | 1961 reaching_defs_ = reaching_defs; |
| 1950 } | 1962 } |
| 1951 | 1963 |
| 1952 virtual bool MayThrow() const { return false; } | 1964 virtual bool MayThrow() const { return false; } |
| 1953 | 1965 |
| 1954 // A phi is redundant if all input operands are the same. | 1966 // A phi is redundant if all input operands are the same. |
| 1955 bool IsRedundant() const; | 1967 bool IsRedundant() const; |
| 1956 | 1968 |
| 1957 void set_induction_variable_info(InductionVariableInfo* info) { | 1969 void set_induction_variable_info(InductionVariableInfo* info) { |
| 1958 loop_variable_info_ = info; | 1970 loop_variable_info_ = info; |
| 1959 } | 1971 } |
| 1960 | 1972 |
| 1961 InductionVariableInfo* induction_variable_info() { | 1973 InductionVariableInfo* induction_variable_info() { |
| 1962 return loop_variable_info_; | 1974 return loop_variable_info_; |
| 1963 } | 1975 } |
| 1964 | 1976 |
| 1977 PRINT_TO_SUPPORT |
| 1978 |
| 1965 private: | 1979 private: |
| 1966 // Direct access to inputs_ in order to resize it due to unreachable | 1980 // Direct access to inputs_ in order to resize it due to unreachable |
| 1967 // predecessors. | 1981 // predecessors. |
| 1968 friend class ConstantPropagator; | 1982 friend class ConstantPropagator; |
| 1969 | 1983 |
| 1970 void RawSetInputAt(intptr_t i, Value* value) { inputs_[i] = value; } | 1984 void RawSetInputAt(intptr_t i, Value* value) { inputs_[i] = value; } |
| 1971 | 1985 |
| 1972 JoinEntryInstr* block_; | 1986 JoinEntryInstr* block_; |
| 1973 GrowableArray<Value*> inputs_; | 1987 GrowableArray<Value*> inputs_; |
| 1974 bool is_alive_; | 1988 bool is_alive_; |
| (...skipping 30 matching lines...) Expand all Loading... |
| 2005 virtual bool CanDeoptimize() const { return false; } | 2019 virtual bool CanDeoptimize() const { return false; } |
| 2006 | 2020 |
| 2007 virtual EffectSet Effects() const { return EffectSet::None(); } | 2021 virtual EffectSet Effects() const { return EffectSet::None(); } |
| 2008 virtual EffectSet Dependencies() const { return EffectSet::None(); } | 2022 virtual EffectSet Dependencies() const { return EffectSet::None(); } |
| 2009 | 2023 |
| 2010 virtual intptr_t Hashcode() const { | 2024 virtual intptr_t Hashcode() const { |
| 2011 UNREACHABLE(); | 2025 UNREACHABLE(); |
| 2012 return 0; | 2026 return 0; |
| 2013 } | 2027 } |
| 2014 | 2028 |
| 2015 virtual void PrintOperandsTo(BufferFormatter* f) const; | |
| 2016 | |
| 2017 virtual CompileType ComputeType() const; | 2029 virtual CompileType ComputeType() const; |
| 2018 | 2030 |
| 2019 virtual bool MayThrow() const { return false; } | 2031 virtual bool MayThrow() const { return false; } |
| 2020 | 2032 |
| 2033 PRINT_OPERANDS_TO_SUPPORT |
| 2034 |
| 2021 private: | 2035 private: |
| 2022 virtual void RawSetInputAt(intptr_t i, Value* value) { UNREACHABLE(); } | 2036 virtual void RawSetInputAt(intptr_t i, Value* value) { UNREACHABLE(); } |
| 2023 | 2037 |
| 2024 const intptr_t index_; | 2038 const intptr_t index_; |
| 2025 const Register base_reg_; | 2039 const Register base_reg_; |
| 2026 BlockEntryInstr* block_; | 2040 BlockEntryInstr* block_; |
| 2027 | 2041 |
| 2028 DISALLOW_COPY_AND_ASSIGN(ParameterInstr); | 2042 DISALLOW_COPY_AND_ASSIGN(ParameterInstr); |
| 2029 }; | 2043 }; |
| 2030 | 2044 |
| 2031 | 2045 |
| 2032 class PushArgumentInstr : public TemplateDefinition<1, NoThrow> { | 2046 class PushArgumentInstr : public TemplateDefinition<1, NoThrow> { |
| 2033 public: | 2047 public: |
| 2034 explicit PushArgumentInstr(Value* value) { | 2048 explicit PushArgumentInstr(Value* value) { |
| 2035 SetInputAt(0, value); | 2049 SetInputAt(0, value); |
| 2036 } | 2050 } |
| 2037 | 2051 |
| 2038 DECLARE_INSTRUCTION(PushArgument) | 2052 DECLARE_INSTRUCTION(PushArgument) |
| 2039 | 2053 |
| 2040 virtual CompileType ComputeType() const; | 2054 virtual CompileType ComputeType() const; |
| 2041 | 2055 |
| 2042 Value* value() const { return InputAt(0); } | 2056 Value* value() const { return InputAt(0); } |
| 2043 | 2057 |
| 2044 virtual bool CanDeoptimize() const { return false; } | 2058 virtual bool CanDeoptimize() const { return false; } |
| 2045 | 2059 |
| 2046 virtual EffectSet Effects() const { return EffectSet::None(); } | 2060 virtual EffectSet Effects() const { return EffectSet::None(); } |
| 2047 | 2061 |
| 2048 virtual void PrintOperandsTo(BufferFormatter* f) const; | |
| 2049 | 2062 |
| 2050 virtual TokenPosition token_pos() const { | 2063 virtual TokenPosition token_pos() const { |
| 2051 return TokenPosition::kPushArgument; | 2064 return TokenPosition::kPushArgument; |
| 2052 } | 2065 } |
| 2053 | 2066 |
| 2067 PRINT_OPERANDS_TO_SUPPORT |
| 2068 |
| 2054 private: | 2069 private: |
| 2055 DISALLOW_COPY_AND_ASSIGN(PushArgumentInstr); | 2070 DISALLOW_COPY_AND_ASSIGN(PushArgumentInstr); |
| 2056 }; | 2071 }; |
| 2057 | 2072 |
| 2058 | 2073 |
| 2059 inline Definition* Instruction::ArgumentAt(intptr_t index) const { | 2074 inline Definition* Instruction::ArgumentAt(intptr_t index) const { |
| 2060 return PushArgumentAt(index)->value()->definition(); | 2075 return PushArgumentAt(index)->value()->definition(); |
| 2061 } | 2076 } |
| 2062 | 2077 |
| 2063 | 2078 |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2216 return HasParallelMove() && !parallel_move()->IsRedundant(); | 2231 return HasParallelMove() && !parallel_move()->IsRedundant(); |
| 2217 } | 2232 } |
| 2218 | 2233 |
| 2219 ParallelMoveInstr* GetParallelMove() { | 2234 ParallelMoveInstr* GetParallelMove() { |
| 2220 if (parallel_move_ == NULL) { | 2235 if (parallel_move_ == NULL) { |
| 2221 parallel_move_ = new ParallelMoveInstr(); | 2236 parallel_move_ = new ParallelMoveInstr(); |
| 2222 } | 2237 } |
| 2223 return parallel_move_; | 2238 return parallel_move_; |
| 2224 } | 2239 } |
| 2225 | 2240 |
| 2226 virtual void PrintTo(BufferFormatter* f) const; | |
| 2227 | |
| 2228 virtual TokenPosition token_pos() const { | 2241 virtual TokenPosition token_pos() const { |
| 2229 return TokenPosition::kControlFlow; | 2242 return TokenPosition::kControlFlow; |
| 2230 } | 2243 } |
| 2231 | 2244 |
| 2245 PRINT_TO_SUPPORT |
| 2246 |
| 2232 private: | 2247 private: |
| 2233 BlockEntryInstr* block_; | 2248 BlockEntryInstr* block_; |
| 2234 JoinEntryInstr* successor_; | 2249 JoinEntryInstr* successor_; |
| 2235 double edge_weight_; | 2250 double edge_weight_; |
| 2236 | 2251 |
| 2237 // Parallel move that will be used by linear scan register allocator to | 2252 // Parallel move that will be used by linear scan register allocator to |
| 2238 // connect live ranges at the end of the block and resolve phis. | 2253 // connect live ranges at the end of the block and resolve phis. |
| 2239 ParallelMoveInstr* parallel_move_; | 2254 ParallelMoveInstr* parallel_move_; |
| 2240 }; | 2255 }; |
| 2241 | 2256 |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2279 virtual TargetEntryInstr* SuccessorAt(intptr_t index) const { | 2294 virtual TargetEntryInstr* SuccessorAt(intptr_t index) const { |
| 2280 ASSERT(index < SuccessorCount()); | 2295 ASSERT(index < SuccessorCount()); |
| 2281 return successors_[index]; | 2296 return successors_[index]; |
| 2282 } | 2297 } |
| 2283 | 2298 |
| 2284 virtual bool CanDeoptimize() const { return false; } | 2299 virtual bool CanDeoptimize() const { return false; } |
| 2285 virtual bool CanBecomeDeoptimizationTarget() const { return false; } | 2300 virtual bool CanBecomeDeoptimizationTarget() const { return false; } |
| 2286 | 2301 |
| 2287 virtual EffectSet Effects() const { return EffectSet::None(); } | 2302 virtual EffectSet Effects() const { return EffectSet::None(); } |
| 2288 | 2303 |
| 2289 virtual void PrintTo(BufferFormatter* f) const; | |
| 2290 | |
| 2291 Value* offset() const { return inputs_[0]; } | 2304 Value* offset() const { return inputs_[0]; } |
| 2292 void ComputeOffsetTable(); | 2305 void ComputeOffsetTable(); |
| 2293 | 2306 |
| 2307 PRINT_TO_SUPPORT |
| 2308 |
| 2294 private: | 2309 private: |
| 2295 GrowableArray<TargetEntryInstr*> successors_; | 2310 GrowableArray<TargetEntryInstr*> successors_; |
| 2296 TypedData& offsets_; | 2311 TypedData& offsets_; |
| 2297 }; | 2312 }; |
| 2298 | 2313 |
| 2299 | 2314 |
| 2300 class ComparisonInstr : public TemplateDefinition<2, NoThrow, Pure> { | 2315 class ComparisonInstr : public TemplateDefinition<2, NoThrow, Pure> { |
| 2301 public: | 2316 public: |
| 2302 Value* left() const { return inputs_[0]; } | 2317 Value* left() const { return inputs_[0]; } |
| 2303 Value* right() const { return inputs_[1]; } | 2318 Value* right() const { return inputs_[1]; } |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2410 virtual intptr_t DeoptimizationTarget() const { | 2425 virtual intptr_t DeoptimizationTarget() const { |
| 2411 return comparison()->DeoptimizationTarget(); | 2426 return comparison()->DeoptimizationTarget(); |
| 2412 } | 2427 } |
| 2413 | 2428 |
| 2414 virtual Representation RequiredInputRepresentation(intptr_t i) const { | 2429 virtual Representation RequiredInputRepresentation(intptr_t i) const { |
| 2415 return comparison()->RequiredInputRepresentation(i); | 2430 return comparison()->RequiredInputRepresentation(i); |
| 2416 } | 2431 } |
| 2417 | 2432 |
| 2418 virtual Instruction* Canonicalize(FlowGraph* flow_graph); | 2433 virtual Instruction* Canonicalize(FlowGraph* flow_graph); |
| 2419 | 2434 |
| 2420 virtual void PrintTo(BufferFormatter* f) const; | |
| 2421 | |
| 2422 // Set compile type constrained by the comparison of this branch. | 2435 // Set compile type constrained by the comparison of this branch. |
| 2423 // FlowGraphPropagator propagates it downwards into either true or false | 2436 // FlowGraphPropagator propagates it downwards into either true or false |
| 2424 // successor. | 2437 // successor. |
| 2425 void set_constrained_type(ConstrainedCompileType* type) { | 2438 void set_constrained_type(ConstrainedCompileType* type) { |
| 2426 constrained_type_ = type; | 2439 constrained_type_ = type; |
| 2427 } | 2440 } |
| 2428 | 2441 |
| 2429 // Return compile type constrained by the comparison of this branch. | 2442 // Return compile type constrained by the comparison of this branch. |
| 2430 ConstrainedCompileType* constrained_type() const { | 2443 ConstrainedCompileType* constrained_type() const { |
| 2431 return constrained_type_; | 2444 return constrained_type_; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 2447 | 2460 |
| 2448 TargetEntryInstr* true_successor() const { return true_successor_; } | 2461 TargetEntryInstr* true_successor() const { return true_successor_; } |
| 2449 TargetEntryInstr* false_successor() const { return false_successor_; } | 2462 TargetEntryInstr* false_successor() const { return false_successor_; } |
| 2450 | 2463 |
| 2451 TargetEntryInstr** true_successor_address() { return &true_successor_; } | 2464 TargetEntryInstr** true_successor_address() { return &true_successor_; } |
| 2452 TargetEntryInstr** false_successor_address() { return &false_successor_; } | 2465 TargetEntryInstr** false_successor_address() { return &false_successor_; } |
| 2453 | 2466 |
| 2454 virtual intptr_t SuccessorCount() const; | 2467 virtual intptr_t SuccessorCount() const; |
| 2455 virtual BlockEntryInstr* SuccessorAt(intptr_t index) const; | 2468 virtual BlockEntryInstr* SuccessorAt(intptr_t index) const; |
| 2456 | 2469 |
| 2470 PRINT_TO_SUPPORT |
| 2471 |
| 2457 private: | 2472 private: |
| 2458 virtual void RawSetInputAt(intptr_t i, Value* value) { | 2473 virtual void RawSetInputAt(intptr_t i, Value* value) { |
| 2459 comparison()->RawSetInputAt(i, value); | 2474 comparison()->RawSetInputAt(i, value); |
| 2460 } | 2475 } |
| 2461 | 2476 |
| 2462 TargetEntryInstr* true_successor_; | 2477 TargetEntryInstr* true_successor_; |
| 2463 TargetEntryInstr* false_successor_; | 2478 TargetEntryInstr* false_successor_; |
| 2464 ComparisonInstr* comparison_; | 2479 ComparisonInstr* comparison_; |
| 2465 bool is_checked_; | 2480 bool is_checked_; |
| 2466 ConstrainedCompileType* constrained_type_; | 2481 ConstrainedCompileType* constrained_type_; |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2528 | 2543 |
| 2529 virtual bool CanDeoptimize() const { return false; } | 2544 virtual bool CanDeoptimize() const { return false; } |
| 2530 | 2545 |
| 2531 virtual EffectSet Effects() const { return EffectSet::None(); } | 2546 virtual EffectSet Effects() const { return EffectSet::None(); } |
| 2532 | 2547 |
| 2533 virtual bool AttributesEqual(Instruction* other) const { | 2548 virtual bool AttributesEqual(Instruction* other) const { |
| 2534 UNREACHABLE(); | 2549 UNREACHABLE(); |
| 2535 return false; | 2550 return false; |
| 2536 } | 2551 } |
| 2537 | 2552 |
| 2538 virtual void PrintOperandsTo(BufferFormatter* f) const; | |
| 2539 | |
| 2540 Value* value() const { return inputs_[0]; } | 2553 Value* value() const { return inputs_[0]; } |
| 2541 Range* constraint() const { return constraint_; } | 2554 Range* constraint() const { return constraint_; } |
| 2542 | 2555 |
| 2543 virtual void InferRange(RangeAnalysis* analysis, Range* range); | 2556 virtual void InferRange(RangeAnalysis* analysis, Range* range); |
| 2544 | 2557 |
| 2545 // Constraints for branches have their target block stored in order | 2558 // Constraints for branches have their target block stored in order |
| 2546 // to find the the comparsion that generated the constraint: | 2559 // to find the the comparsion that generated the constraint: |
| 2547 // target->predecessor->last_instruction->comparison. | 2560 // target->predecessor->last_instruction->comparison. |
| 2548 void set_target(TargetEntryInstr* target) { | 2561 void set_target(TargetEntryInstr* target) { |
| 2549 target_ = target; | 2562 target_ = target; |
| 2550 } | 2563 } |
| 2551 TargetEntryInstr* target() const { | 2564 TargetEntryInstr* target() const { |
| 2552 return target_; | 2565 return target_; |
| 2553 } | 2566 } |
| 2554 | 2567 |
| 2568 PRINT_OPERANDS_TO_SUPPORT |
| 2569 |
| 2555 private: | 2570 private: |
| 2556 Range* constraint_; | 2571 Range* constraint_; |
| 2557 TargetEntryInstr* target_; | 2572 TargetEntryInstr* target_; |
| 2558 | 2573 |
| 2559 DISALLOW_COPY_AND_ASSIGN(ConstraintInstr); | 2574 DISALLOW_COPY_AND_ASSIGN(ConstraintInstr); |
| 2560 }; | 2575 }; |
| 2561 | 2576 |
| 2562 | 2577 |
| 2563 class ConstantInstr : public TemplateDefinition<0, NoThrow, Pure> { | 2578 class ConstantInstr : public TemplateDefinition<0, NoThrow, Pure> { |
| 2564 public: | 2579 public: |
| 2565 ConstantInstr(const Object& value, | 2580 ConstantInstr(const Object& value, |
| 2566 TokenPosition token_pos = TokenPosition::kConstant); | 2581 TokenPosition token_pos = TokenPosition::kConstant); |
| 2567 | 2582 |
| 2568 DECLARE_INSTRUCTION(Constant) | 2583 DECLARE_INSTRUCTION(Constant) |
| 2569 virtual CompileType ComputeType() const; | 2584 virtual CompileType ComputeType() const; |
| 2570 | 2585 |
| 2571 virtual Definition* Canonicalize(FlowGraph* flow_graph); | 2586 virtual Definition* Canonicalize(FlowGraph* flow_graph); |
| 2572 | 2587 |
| 2573 const Object& value() const { return value_; } | 2588 const Object& value() const { return value_; } |
| 2574 | 2589 |
| 2575 virtual void PrintOperandsTo(BufferFormatter* f) const; | |
| 2576 | |
| 2577 virtual bool CanDeoptimize() const { return false; } | 2590 virtual bool CanDeoptimize() const { return false; } |
| 2578 | 2591 |
| 2579 virtual void InferRange(RangeAnalysis* analysis, Range* range); | 2592 virtual void InferRange(RangeAnalysis* analysis, Range* range); |
| 2580 | 2593 |
| 2581 virtual bool AttributesEqual(Instruction* other) const; | 2594 virtual bool AttributesEqual(Instruction* other) const; |
| 2582 | 2595 |
| 2583 virtual TokenPosition token_pos() const { return token_pos_; } | 2596 virtual TokenPosition token_pos() const { return token_pos_; } |
| 2584 | 2597 |
| 2598 PRINT_OPERANDS_TO_SUPPORT |
| 2599 |
| 2585 private: | 2600 private: |
| 2586 const Object& value_; | 2601 const Object& value_; |
| 2587 const TokenPosition token_pos_; | 2602 const TokenPosition token_pos_; |
| 2588 | 2603 |
| 2589 DISALLOW_COPY_AND_ASSIGN(ConstantInstr); | 2604 DISALLOW_COPY_AND_ASSIGN(ConstantInstr); |
| 2590 }; | 2605 }; |
| 2591 | 2606 |
| 2592 | 2607 |
| 2593 // Merged ConstantInstr -> UnboxedXXX into UnboxedConstantInstr. | 2608 // Merged ConstantInstr -> UnboxedXXX into UnboxedConstantInstr. |
| 2594 // TODO(srdjan): Implemented currently for doubles only, should implement | 2609 // TODO(srdjan): Implemented currently for doubles only, should implement |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2640 Value* value() const { return inputs_[0]; } | 2655 Value* value() const { return inputs_[0]; } |
| 2641 Value* instantiator_type_arguments() const { return inputs_[1]; } | 2656 Value* instantiator_type_arguments() const { return inputs_[1]; } |
| 2642 | 2657 |
| 2643 virtual TokenPosition token_pos() const { return token_pos_; } | 2658 virtual TokenPosition token_pos() const { return token_pos_; } |
| 2644 const AbstractType& dst_type() const { return dst_type_; } | 2659 const AbstractType& dst_type() const { return dst_type_; } |
| 2645 void set_dst_type(const AbstractType& dst_type) { | 2660 void set_dst_type(const AbstractType& dst_type) { |
| 2646 dst_type_ = dst_type.raw(); | 2661 dst_type_ = dst_type.raw(); |
| 2647 } | 2662 } |
| 2648 const String& dst_name() const { return dst_name_; } | 2663 const String& dst_name() const { return dst_name_; } |
| 2649 | 2664 |
| 2650 virtual void PrintOperandsTo(BufferFormatter* f) const; | |
| 2651 | |
| 2652 virtual bool CanDeoptimize() const { return true; } | 2665 virtual bool CanDeoptimize() const { return true; } |
| 2653 | 2666 |
| 2654 virtual bool CanBecomeDeoptimizationTarget() const { | 2667 virtual bool CanBecomeDeoptimizationTarget() const { |
| 2655 // AssertAssignable instructions that are specialized by the optimizer | 2668 // AssertAssignable instructions that are specialized by the optimizer |
| 2656 // (e.g. replaced with CheckClass) need a deoptimization descriptor before. | 2669 // (e.g. replaced with CheckClass) need a deoptimization descriptor before. |
| 2657 return true; | 2670 return true; |
| 2658 } | 2671 } |
| 2659 | 2672 |
| 2660 virtual Definition* Canonicalize(FlowGraph* flow_graph); | 2673 virtual Definition* Canonicalize(FlowGraph* flow_graph); |
| 2661 | 2674 |
| 2662 virtual bool AttributesEqual(Instruction* other) const; | 2675 virtual bool AttributesEqual(Instruction* other) const; |
| 2663 | 2676 |
| 2677 PRINT_OPERANDS_TO_SUPPORT |
| 2678 |
| 2664 private: | 2679 private: |
| 2665 const TokenPosition token_pos_; | 2680 const TokenPosition token_pos_; |
| 2666 AbstractType& dst_type_; | 2681 AbstractType& dst_type_; |
| 2667 const String& dst_name_; | 2682 const String& dst_name_; |
| 2668 | 2683 |
| 2669 DISALLOW_COPY_AND_ASSIGN(AssertAssignableInstr); | 2684 DISALLOW_COPY_AND_ASSIGN(AssertAssignableInstr); |
| 2670 }; | 2685 }; |
| 2671 | 2686 |
| 2672 | 2687 |
| 2673 class AssertBooleanInstr : public TemplateDefinition<1, Throws, Pure> { | 2688 class AssertBooleanInstr : public TemplateDefinition<1, Throws, Pure> { |
| 2674 public: | 2689 public: |
| 2675 AssertBooleanInstr(TokenPosition token_pos, Value* value) | 2690 AssertBooleanInstr(TokenPosition token_pos, Value* value) |
| 2676 : TemplateDefinition(Thread::Current()->GetNextDeoptId()), | 2691 : TemplateDefinition(Thread::Current()->GetNextDeoptId()), |
| 2677 token_pos_(token_pos) { | 2692 token_pos_(token_pos) { |
| 2678 SetInputAt(0, value); | 2693 SetInputAt(0, value); |
| 2679 } | 2694 } |
| 2680 | 2695 |
| 2681 DECLARE_INSTRUCTION(AssertBoolean) | 2696 DECLARE_INSTRUCTION(AssertBoolean) |
| 2682 virtual CompileType ComputeType() const; | 2697 virtual CompileType ComputeType() const; |
| 2683 | 2698 |
| 2684 virtual TokenPosition token_pos() const { return token_pos_; } | 2699 virtual TokenPosition token_pos() const { return token_pos_; } |
| 2685 Value* value() const { return inputs_[0]; } | 2700 Value* value() const { return inputs_[0]; } |
| 2686 | 2701 |
| 2687 virtual void PrintOperandsTo(BufferFormatter* f) const; | |
| 2688 | |
| 2689 virtual bool CanDeoptimize() const { return true; } | 2702 virtual bool CanDeoptimize() const { return true; } |
| 2690 | 2703 |
| 2691 virtual Definition* Canonicalize(FlowGraph* flow_graph); | 2704 virtual Definition* Canonicalize(FlowGraph* flow_graph); |
| 2692 | 2705 |
| 2693 virtual bool AttributesEqual(Instruction* other) const { return true; } | 2706 virtual bool AttributesEqual(Instruction* other) const { return true; } |
| 2694 | 2707 |
| 2708 PRINT_OPERANDS_TO_SUPPORT |
| 2709 |
| 2695 private: | 2710 private: |
| 2696 const TokenPosition token_pos_; | 2711 const TokenPosition token_pos_; |
| 2697 | 2712 |
| 2698 DISALLOW_COPY_AND_ASSIGN(AssertBooleanInstr); | 2713 DISALLOW_COPY_AND_ASSIGN(AssertBooleanInstr); |
| 2699 }; | 2714 }; |
| 2700 | 2715 |
| 2701 | 2716 |
| 2702 // Denotes the current context, normally held in a register. This is | 2717 // Denotes the current context, normally held in a register. This is |
| 2703 // a computation, not a value, because it's mutable. | 2718 // a computation, not a value, because it's mutable. |
| 2704 class CurrentContextInstr : public TemplateDefinition<0, NoThrow> { | 2719 class CurrentContextInstr : public TemplateDefinition<0, NoThrow> { |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2740 } | 2755 } |
| 2741 | 2756 |
| 2742 virtual intptr_t ArgumentCount() const { return arguments_->length(); } | 2757 virtual intptr_t ArgumentCount() const { return arguments_->length(); } |
| 2743 virtual PushArgumentInstr* PushArgumentAt(intptr_t index) const { | 2758 virtual PushArgumentInstr* PushArgumentAt(intptr_t index) const { |
| 2744 return (*arguments_)[index]; | 2759 return (*arguments_)[index]; |
| 2745 } | 2760 } |
| 2746 | 2761 |
| 2747 // TODO(kmillikin): implement exact call counts for closure calls. | 2762 // TODO(kmillikin): implement exact call counts for closure calls. |
| 2748 virtual intptr_t CallCount() const { return 1; } | 2763 virtual intptr_t CallCount() const { return 1; } |
| 2749 | 2764 |
| 2750 virtual void PrintOperandsTo(BufferFormatter* f) const; | |
| 2751 | |
| 2752 virtual bool CanDeoptimize() const { return true; } | 2765 virtual bool CanDeoptimize() const { return true; } |
| 2753 | 2766 |
| 2754 virtual EffectSet Effects() const { return EffectSet::All(); } | 2767 virtual EffectSet Effects() const { return EffectSet::All(); } |
| 2755 | 2768 |
| 2769 PRINT_OPERANDS_TO_SUPPORT |
| 2770 |
| 2756 private: | 2771 private: |
| 2757 const ClosureCallNode& ast_node_; | 2772 const ClosureCallNode& ast_node_; |
| 2758 ZoneGrowableArray<PushArgumentInstr*>* arguments_; | 2773 ZoneGrowableArray<PushArgumentInstr*>* arguments_; |
| 2759 | 2774 |
| 2760 DISALLOW_COPY_AND_ASSIGN(ClosureCallInstr); | 2775 DISALLOW_COPY_AND_ASSIGN(ClosureCallInstr); |
| 2761 }; | 2776 }; |
| 2762 | 2777 |
| 2763 | 2778 |
| 2764 class InstanceCallInstr : public TemplateDefinition<0, Throws> { | 2779 class InstanceCallInstr : public TemplateDefinition<0, Throws> { |
| 2765 public: | 2780 public: |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2807 virtual TokenPosition token_pos() const { return token_pos_; } | 2822 virtual TokenPosition token_pos() const { return token_pos_; } |
| 2808 const String& function_name() const { return function_name_; } | 2823 const String& function_name() const { return function_name_; } |
| 2809 Token::Kind token_kind() const { return token_kind_; } | 2824 Token::Kind token_kind() const { return token_kind_; } |
| 2810 virtual intptr_t ArgumentCount() const { return arguments_->length(); } | 2825 virtual intptr_t ArgumentCount() const { return arguments_->length(); } |
| 2811 virtual PushArgumentInstr* PushArgumentAt(intptr_t index) const { | 2826 virtual PushArgumentInstr* PushArgumentAt(intptr_t index) const { |
| 2812 return (*arguments_)[index]; | 2827 return (*arguments_)[index]; |
| 2813 } | 2828 } |
| 2814 const Array& argument_names() const { return argument_names_; } | 2829 const Array& argument_names() const { return argument_names_; } |
| 2815 intptr_t checked_argument_count() const { return checked_argument_count_; } | 2830 intptr_t checked_argument_count() const { return checked_argument_count_; } |
| 2816 | 2831 |
| 2817 virtual void PrintOperandsTo(BufferFormatter* f) const; | |
| 2818 | |
| 2819 virtual bool CanDeoptimize() const { return true; } | 2832 virtual bool CanDeoptimize() const { return true; } |
| 2820 | 2833 |
| 2821 virtual bool CanBecomeDeoptimizationTarget() const { | 2834 virtual bool CanBecomeDeoptimizationTarget() const { |
| 2822 // Instance calls that are specialized by the optimizer need a | 2835 // Instance calls that are specialized by the optimizer need a |
| 2823 // deoptimization descriptor before the call. | 2836 // deoptimization descriptor before the call. |
| 2824 return true; | 2837 return true; |
| 2825 } | 2838 } |
| 2826 | 2839 |
| 2827 virtual EffectSet Effects() const { return EffectSet::All(); } | 2840 virtual EffectSet Effects() const { return EffectSet::All(); } |
| 2828 | 2841 |
| 2842 PRINT_OPERANDS_TO_SUPPORT |
| 2843 |
| 2829 protected: | 2844 protected: |
| 2830 friend class FlowGraphOptimizer; | 2845 friend class FlowGraphOptimizer; |
| 2831 void set_ic_data(ICData* value) { ic_data_ = value; } | 2846 void set_ic_data(ICData* value) { ic_data_ = value; } |
| 2832 | 2847 |
| 2833 private: | 2848 private: |
| 2834 const ICData* ic_data_; | 2849 const ICData* ic_data_; |
| 2835 const TokenPosition token_pos_; | 2850 const TokenPosition token_pos_; |
| 2836 const String& function_name_; | 2851 const String& function_name_; |
| 2837 const Token::Kind token_kind_; // Binary op, unary op, kGET or kILLEGAL. | 2852 const Token::Kind token_kind_; // Binary op, unary op, kGET or kILLEGAL. |
| 2838 ZoneGrowableArray<PushArgumentInstr*>* const arguments_; | 2853 ZoneGrowableArray<PushArgumentInstr*>* const arguments_; |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2876 virtual intptr_t CallCount() const { return ic_data().AggregateCount(); } | 2891 virtual intptr_t CallCount() const { return ic_data().AggregateCount(); } |
| 2877 | 2892 |
| 2878 DECLARE_INSTRUCTION(PolymorphicInstanceCall) | 2893 DECLARE_INSTRUCTION(PolymorphicInstanceCall) |
| 2879 | 2894 |
| 2880 const ICData& ic_data() const { return ic_data_; } | 2895 const ICData& ic_data() const { return ic_data_; } |
| 2881 | 2896 |
| 2882 virtual bool CanDeoptimize() const { return true; } | 2897 virtual bool CanDeoptimize() const { return true; } |
| 2883 | 2898 |
| 2884 virtual EffectSet Effects() const { return EffectSet::All(); } | 2899 virtual EffectSet Effects() const { return EffectSet::All(); } |
| 2885 | 2900 |
| 2886 virtual void PrintOperandsTo(BufferFormatter* f) const; | 2901 PRINT_OPERANDS_TO_SUPPORT |
| 2887 | 2902 |
| 2888 private: | 2903 private: |
| 2889 InstanceCallInstr* instance_call_; | 2904 InstanceCallInstr* instance_call_; |
| 2890 const ICData& ic_data_; | 2905 const ICData& ic_data_; |
| 2891 const bool with_checks_; | 2906 const bool with_checks_; |
| 2892 | 2907 |
| 2893 DISALLOW_COPY_AND_ASSIGN(PolymorphicInstanceCallInstr); | 2908 DISALLOW_COPY_AND_ASSIGN(PolymorphicInstanceCallInstr); |
| 2894 }; | 2909 }; |
| 2895 | 2910 |
| 2896 | 2911 |
| 2897 class StrictCompareInstr : public ComparisonInstr { | 2912 class StrictCompareInstr : public ComparisonInstr { |
| 2898 public: | 2913 public: |
| 2899 StrictCompareInstr(TokenPosition token_pos, | 2914 StrictCompareInstr(TokenPosition token_pos, |
| 2900 Token::Kind kind, | 2915 Token::Kind kind, |
| 2901 Value* left, | 2916 Value* left, |
| 2902 Value* right, | 2917 Value* right, |
| 2903 bool needs_number_check); | 2918 bool needs_number_check); |
| 2904 | 2919 |
| 2905 DECLARE_INSTRUCTION(StrictCompare) | 2920 DECLARE_INSTRUCTION(StrictCompare) |
| 2906 | 2921 |
| 2907 virtual ComparisonInstr* CopyWithNewOperands(Value* left, Value* right); | 2922 virtual ComparisonInstr* CopyWithNewOperands(Value* left, Value* right); |
| 2908 | 2923 |
| 2909 virtual CompileType ComputeType() const; | 2924 virtual CompileType ComputeType() const; |
| 2910 | 2925 |
| 2911 virtual void PrintOperandsTo(BufferFormatter* f) const; | |
| 2912 | |
| 2913 virtual bool CanDeoptimize() const { return false; } | 2926 virtual bool CanDeoptimize() const { return false; } |
| 2914 | 2927 |
| 2915 virtual Definition* Canonicalize(FlowGraph* flow_graph); | 2928 virtual Definition* Canonicalize(FlowGraph* flow_graph); |
| 2916 | 2929 |
| 2917 virtual void EmitBranchCode(FlowGraphCompiler* compiler, | 2930 virtual void EmitBranchCode(FlowGraphCompiler* compiler, |
| 2918 BranchInstr* branch); | 2931 BranchInstr* branch); |
| 2919 | 2932 |
| 2920 virtual Condition EmitComparisonCode(FlowGraphCompiler* compiler, | 2933 virtual Condition EmitComparisonCode(FlowGraphCompiler* compiler, |
| 2921 BranchLabels labels); | 2934 BranchLabels labels); |
| 2922 | 2935 |
| 2923 bool needs_number_check() const { return needs_number_check_; } | 2936 bool needs_number_check() const { return needs_number_check_; } |
| 2924 void set_needs_number_check(bool value) { needs_number_check_ = value; } | 2937 void set_needs_number_check(bool value) { needs_number_check_ = value; } |
| 2925 | 2938 |
| 2926 bool AttributesEqual(Instruction* other) const; | 2939 bool AttributesEqual(Instruction* other) const; |
| 2927 | 2940 |
| 2941 PRINT_OPERANDS_TO_SUPPORT |
| 2942 |
| 2928 private: | 2943 private: |
| 2929 // True if the comparison must check for double, Mint or Bigint and | 2944 // True if the comparison must check for double, Mint or Bigint and |
| 2930 // use value comparison instead. | 2945 // use value comparison instead. |
| 2931 bool needs_number_check_; | 2946 bool needs_number_check_; |
| 2932 | 2947 |
| 2933 DISALLOW_COPY_AND_ASSIGN(StrictCompareInstr); | 2948 DISALLOW_COPY_AND_ASSIGN(StrictCompareInstr); |
| 2934 }; | 2949 }; |
| 2935 | 2950 |
| 2936 | 2951 |
| 2937 // Comparison instruction that is equivalent to the (left & right) == 0 | 2952 // Comparison instruction that is equivalent to the (left & right) == 0 |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3007 } | 3022 } |
| 3008 | 3023 |
| 3009 virtual bool AttributesEqual(Instruction* other) const; | 3024 virtual bool AttributesEqual(Instruction* other) const; |
| 3010 | 3025 |
| 3011 virtual void EmitBranchCode(FlowGraphCompiler* compiler, | 3026 virtual void EmitBranchCode(FlowGraphCompiler* compiler, |
| 3012 BranchInstr* branch); | 3027 BranchInstr* branch); |
| 3013 | 3028 |
| 3014 virtual Condition EmitComparisonCode(FlowGraphCompiler* compiler, | 3029 virtual Condition EmitComparisonCode(FlowGraphCompiler* compiler, |
| 3015 BranchLabels labels); | 3030 BranchLabels labels); |
| 3016 | 3031 |
| 3017 virtual void PrintOperandsTo(BufferFormatter* f) const; | 3032 PRINT_OPERANDS_TO_SUPPORT |
| 3018 | 3033 |
| 3019 private: | 3034 private: |
| 3020 const ZoneGrowableArray<intptr_t>& cid_results_; | 3035 const ZoneGrowableArray<intptr_t>& cid_results_; |
| 3021 DISALLOW_COPY_AND_ASSIGN(TestCidsInstr); | 3036 DISALLOW_COPY_AND_ASSIGN(TestCidsInstr); |
| 3022 }; | 3037 }; |
| 3023 | 3038 |
| 3024 | 3039 |
| 3025 class EqualityCompareInstr : public ComparisonInstr { | 3040 class EqualityCompareInstr : public ComparisonInstr { |
| 3026 public: | 3041 public: |
| 3027 EqualityCompareInstr(TokenPosition token_pos, | 3042 EqualityCompareInstr(TokenPosition token_pos, |
| 3028 Token::Kind kind, | 3043 Token::Kind kind, |
| 3029 Value* left, | 3044 Value* left, |
| 3030 Value* right, | 3045 Value* right, |
| 3031 intptr_t cid, | 3046 intptr_t cid, |
| 3032 intptr_t deopt_id) | 3047 intptr_t deopt_id) |
| 3033 : ComparisonInstr(token_pos, kind, left, right, deopt_id) { | 3048 : ComparisonInstr(token_pos, kind, left, right, deopt_id) { |
| 3034 ASSERT(Token::IsEqualityOperator(kind)); | 3049 ASSERT(Token::IsEqualityOperator(kind)); |
| 3035 set_operation_cid(cid); | 3050 set_operation_cid(cid); |
| 3036 } | 3051 } |
| 3037 | 3052 |
| 3038 DECLARE_INSTRUCTION(EqualityCompare) | 3053 DECLARE_INSTRUCTION(EqualityCompare) |
| 3039 | 3054 |
| 3040 virtual ComparisonInstr* CopyWithNewOperands(Value* left, Value* right); | 3055 virtual ComparisonInstr* CopyWithNewOperands(Value* left, Value* right); |
| 3041 | 3056 |
| 3042 virtual CompileType ComputeType() const; | 3057 virtual CompileType ComputeType() const; |
| 3043 | 3058 |
| 3044 virtual void PrintOperandsTo(BufferFormatter* f) const; | |
| 3045 | |
| 3046 virtual bool CanDeoptimize() const { return false; } | 3059 virtual bool CanDeoptimize() const { return false; } |
| 3047 | 3060 |
| 3048 virtual void EmitBranchCode(FlowGraphCompiler* compiler, | 3061 virtual void EmitBranchCode(FlowGraphCompiler* compiler, |
| 3049 BranchInstr* branch); | 3062 BranchInstr* branch); |
| 3050 | 3063 |
| 3051 virtual Condition EmitComparisonCode(FlowGraphCompiler* compiler, | 3064 virtual Condition EmitComparisonCode(FlowGraphCompiler* compiler, |
| 3052 BranchLabels labels); | 3065 BranchLabels labels); |
| 3053 | 3066 |
| 3054 virtual Representation RequiredInputRepresentation(intptr_t idx) const { | 3067 virtual Representation RequiredInputRepresentation(intptr_t idx) const { |
| 3055 ASSERT((idx == 0) || (idx == 1)); | 3068 ASSERT((idx == 0) || (idx == 1)); |
| 3056 if (operation_cid() == kDoubleCid) return kUnboxedDouble; | 3069 if (operation_cid() == kDoubleCid) return kUnboxedDouble; |
| 3057 if (operation_cid() == kMintCid) return kUnboxedMint; | 3070 if (operation_cid() == kMintCid) return kUnboxedMint; |
| 3058 return kTagged; | 3071 return kTagged; |
| 3059 } | 3072 } |
| 3060 | 3073 |
| 3074 PRINT_OPERANDS_TO_SUPPORT |
| 3075 |
| 3061 private: | 3076 private: |
| 3062 DISALLOW_COPY_AND_ASSIGN(EqualityCompareInstr); | 3077 DISALLOW_COPY_AND_ASSIGN(EqualityCompareInstr); |
| 3063 }; | 3078 }; |
| 3064 | 3079 |
| 3065 | 3080 |
| 3066 class RelationalOpInstr : public ComparisonInstr { | 3081 class RelationalOpInstr : public ComparisonInstr { |
| 3067 public: | 3082 public: |
| 3068 RelationalOpInstr(TokenPosition token_pos, | 3083 RelationalOpInstr(TokenPosition token_pos, |
| 3069 Token::Kind kind, | 3084 Token::Kind kind, |
| 3070 Value* left, | 3085 Value* left, |
| 3071 Value* right, | 3086 Value* right, |
| 3072 intptr_t cid, | 3087 intptr_t cid, |
| 3073 intptr_t deopt_id) | 3088 intptr_t deopt_id) |
| 3074 : ComparisonInstr(token_pos, kind, left, right, deopt_id) { | 3089 : ComparisonInstr(token_pos, kind, left, right, deopt_id) { |
| 3075 ASSERT(Token::IsRelationalOperator(kind)); | 3090 ASSERT(Token::IsRelationalOperator(kind)); |
| 3076 set_operation_cid(cid); | 3091 set_operation_cid(cid); |
| 3077 } | 3092 } |
| 3078 | 3093 |
| 3079 DECLARE_INSTRUCTION(RelationalOp) | 3094 DECLARE_INSTRUCTION(RelationalOp) |
| 3080 | 3095 |
| 3081 virtual ComparisonInstr* CopyWithNewOperands(Value* left, Value* right); | 3096 virtual ComparisonInstr* CopyWithNewOperands(Value* left, Value* right); |
| 3082 | 3097 |
| 3083 virtual CompileType ComputeType() const; | 3098 virtual CompileType ComputeType() const; |
| 3084 | 3099 |
| 3085 virtual void PrintOperandsTo(BufferFormatter* f) const; | |
| 3086 | |
| 3087 virtual bool CanDeoptimize() const { return false; } | 3100 virtual bool CanDeoptimize() const { return false; } |
| 3088 | 3101 |
| 3089 virtual void EmitBranchCode(FlowGraphCompiler* compiler, | 3102 virtual void EmitBranchCode(FlowGraphCompiler* compiler, |
| 3090 BranchInstr* branch); | 3103 BranchInstr* branch); |
| 3091 | 3104 |
| 3092 virtual Condition EmitComparisonCode(FlowGraphCompiler* compiler, | 3105 virtual Condition EmitComparisonCode(FlowGraphCompiler* compiler, |
| 3093 BranchLabels labels); | 3106 BranchLabels labels); |
| 3094 | 3107 |
| 3095 virtual Representation RequiredInputRepresentation(intptr_t idx) const { | 3108 virtual Representation RequiredInputRepresentation(intptr_t idx) const { |
| 3096 ASSERT((idx == 0) || (idx == 1)); | 3109 ASSERT((idx == 0) || (idx == 1)); |
| 3097 if (operation_cid() == kDoubleCid) return kUnboxedDouble; | 3110 if (operation_cid() == kDoubleCid) return kUnboxedDouble; |
| 3098 if (operation_cid() == kMintCid) return kUnboxedMint; | 3111 if (operation_cid() == kMintCid) return kUnboxedMint; |
| 3099 return kTagged; | 3112 return kTagged; |
| 3100 } | 3113 } |
| 3101 | 3114 |
| 3115 PRINT_OPERANDS_TO_SUPPORT |
| 3116 |
| 3102 private: | 3117 private: |
| 3103 DISALLOW_COPY_AND_ASSIGN(RelationalOpInstr); | 3118 DISALLOW_COPY_AND_ASSIGN(RelationalOpInstr); |
| 3104 }; | 3119 }; |
| 3105 | 3120 |
| 3106 | 3121 |
| 3107 // TODO(vegorov): ComparisonInstr should be switched to use IfTheElseInstr for | 3122 // TODO(vegorov): ComparisonInstr should be switched to use IfTheElseInstr for |
| 3108 // materialization of true and false constants. | 3123 // materialization of true and false constants. |
| 3109 class IfThenElseInstr : public Definition { | 3124 class IfThenElseInstr : public Definition { |
| 3110 public: | 3125 public: |
| 3111 IfThenElseInstr(ComparisonInstr* comparison, | 3126 IfThenElseInstr(ComparisonInstr* comparison, |
| (...skipping 29 matching lines...) Expand all Loading... |
| 3141 } | 3156 } |
| 3142 | 3157 |
| 3143 virtual intptr_t DeoptimizationTarget() const { | 3158 virtual intptr_t DeoptimizationTarget() const { |
| 3144 return comparison()->DeoptimizationTarget(); | 3159 return comparison()->DeoptimizationTarget(); |
| 3145 } | 3160 } |
| 3146 | 3161 |
| 3147 virtual Representation RequiredInputRepresentation(intptr_t i) const { | 3162 virtual Representation RequiredInputRepresentation(intptr_t i) const { |
| 3148 return comparison()->RequiredInputRepresentation(i); | 3163 return comparison()->RequiredInputRepresentation(i); |
| 3149 } | 3164 } |
| 3150 | 3165 |
| 3151 virtual void PrintOperandsTo(BufferFormatter* f) const; | |
| 3152 | |
| 3153 virtual CompileType ComputeType() const; | 3166 virtual CompileType ComputeType() const; |
| 3154 | 3167 |
| 3155 virtual void InferRange(RangeAnalysis* analysis, Range* range); | 3168 virtual void InferRange(RangeAnalysis* analysis, Range* range); |
| 3156 | 3169 |
| 3157 ComparisonInstr* comparison() const { return comparison_; } | 3170 ComparisonInstr* comparison() const { return comparison_; } |
| 3158 intptr_t if_true() const { return if_true_; } | 3171 intptr_t if_true() const { return if_true_; } |
| 3159 intptr_t if_false() const { return if_false_; } | 3172 intptr_t if_false() const { return if_false_; } |
| 3160 | 3173 |
| 3161 virtual bool AllowsCSE() const { return comparison()->AllowsCSE(); } | 3174 virtual bool AllowsCSE() const { return comparison()->AllowsCSE(); } |
| 3162 virtual EffectSet Effects() const { return comparison()->Effects(); } | 3175 virtual EffectSet Effects() const { return comparison()->Effects(); } |
| 3163 virtual EffectSet Dependencies() const { | 3176 virtual EffectSet Dependencies() const { |
| 3164 return comparison()->Dependencies(); | 3177 return comparison()->Dependencies(); |
| 3165 } | 3178 } |
| 3166 virtual bool AttributesEqual(Instruction* other) const { | 3179 virtual bool AttributesEqual(Instruction* other) const { |
| 3167 IfThenElseInstr* other_if_then_else = other->AsIfThenElse(); | 3180 IfThenElseInstr* other_if_then_else = other->AsIfThenElse(); |
| 3168 return (comparison()->tag() == other_if_then_else->comparison()->tag()) && | 3181 return (comparison()->tag() == other_if_then_else->comparison()->tag()) && |
| 3169 comparison()->AttributesEqual(other_if_then_else->comparison()) && | 3182 comparison()->AttributesEqual(other_if_then_else->comparison()) && |
| 3170 (if_true_ == other_if_then_else->if_true_) && | 3183 (if_true_ == other_if_then_else->if_true_) && |
| 3171 (if_false_ == other_if_then_else->if_false_); | 3184 (if_false_ == other_if_then_else->if_false_); |
| 3172 } | 3185 } |
| 3173 | 3186 |
| 3174 virtual bool MayThrow() const { return comparison()->MayThrow(); } | 3187 virtual bool MayThrow() const { return comparison()->MayThrow(); } |
| 3175 | 3188 |
| 3189 PRINT_OPERANDS_TO_SUPPORT |
| 3190 |
| 3176 private: | 3191 private: |
| 3177 virtual void RawSetInputAt(intptr_t i, Value* value) { | 3192 virtual void RawSetInputAt(intptr_t i, Value* value) { |
| 3178 comparison()->RawSetInputAt(i, value); | 3193 comparison()->RawSetInputAt(i, value); |
| 3179 } | 3194 } |
| 3180 | 3195 |
| 3181 ComparisonInstr* comparison_; | 3196 ComparisonInstr* comparison_; |
| 3182 const intptr_t if_true_; | 3197 const intptr_t if_true_; |
| 3183 const intptr_t if_false_; | 3198 const intptr_t if_false_; |
| 3184 | 3199 |
| 3185 DISALLOW_COPY_AND_ASSIGN(IfThenElseInstr); | 3200 DISALLOW_COPY_AND_ASSIGN(IfThenElseInstr); |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3224 | 3239 |
| 3225 virtual intptr_t ArgumentCount() const { return arguments_->length(); } | 3240 virtual intptr_t ArgumentCount() const { return arguments_->length(); } |
| 3226 virtual PushArgumentInstr* PushArgumentAt(intptr_t index) const { | 3241 virtual PushArgumentInstr* PushArgumentAt(intptr_t index) const { |
| 3227 return (*arguments_)[index]; | 3242 return (*arguments_)[index]; |
| 3228 } | 3243 } |
| 3229 | 3244 |
| 3230 virtual intptr_t CallCount() const { | 3245 virtual intptr_t CallCount() const { |
| 3231 return ic_data() == NULL ? 0 : ic_data()->AggregateCount(); | 3246 return ic_data() == NULL ? 0 : ic_data()->AggregateCount(); |
| 3232 } | 3247 } |
| 3233 | 3248 |
| 3234 virtual void PrintOperandsTo(BufferFormatter* f) const; | |
| 3235 | |
| 3236 virtual bool CanDeoptimize() const { return true; } | 3249 virtual bool CanDeoptimize() const { return true; } |
| 3237 | 3250 |
| 3238 virtual bool CanBecomeDeoptimizationTarget() const { | 3251 virtual bool CanBecomeDeoptimizationTarget() const { |
| 3239 // Static calls that are specialized by the optimizer (e.g. sqrt) need a | 3252 // Static calls that are specialized by the optimizer (e.g. sqrt) need a |
| 3240 // deoptimization descriptor before the call. | 3253 // deoptimization descriptor before the call. |
| 3241 return true; | 3254 return true; |
| 3242 } | 3255 } |
| 3243 | 3256 |
| 3244 virtual EffectSet Effects() const { return EffectSet::All(); } | 3257 virtual EffectSet Effects() const { return EffectSet::All(); } |
| 3245 | 3258 |
| 3246 void set_result_cid(intptr_t value) { result_cid_ = value; } | 3259 void set_result_cid(intptr_t value) { result_cid_ = value; } |
| 3247 | 3260 |
| 3248 bool is_known_list_constructor() const { return is_known_list_constructor_; } | 3261 bool is_known_list_constructor() const { return is_known_list_constructor_; } |
| 3249 void set_is_known_list_constructor(bool value) { | 3262 void set_is_known_list_constructor(bool value) { |
| 3250 is_known_list_constructor_ = value; | 3263 is_known_list_constructor_ = value; |
| 3251 } | 3264 } |
| 3252 | 3265 |
| 3253 bool is_native_list_factory() const { return is_native_list_factory_; } | 3266 bool is_native_list_factory() const { return is_native_list_factory_; } |
| 3254 void set_is_native_list_factory(bool value) { | 3267 void set_is_native_list_factory(bool value) { |
| 3255 is_native_list_factory_ = value; | 3268 is_native_list_factory_ = value; |
| 3256 } | 3269 } |
| 3257 | 3270 |
| 3258 bool IsRecognizedFactory() const { | 3271 bool IsRecognizedFactory() const { |
| 3259 return is_known_list_constructor() || is_native_list_factory(); | 3272 return is_known_list_constructor() || is_native_list_factory(); |
| 3260 } | 3273 } |
| 3261 | 3274 |
| 3262 virtual AliasIdentity Identity() const { return identity_; } | 3275 virtual AliasIdentity Identity() const { return identity_; } |
| 3263 virtual void SetIdentity(AliasIdentity identity) { identity_ = identity; } | 3276 virtual void SetIdentity(AliasIdentity identity) { identity_ = identity; } |
| 3264 | 3277 |
| 3278 PRINT_OPERANDS_TO_SUPPORT |
| 3279 |
| 3265 private: | 3280 private: |
| 3266 const ICData* ic_data_; | 3281 const ICData* ic_data_; |
| 3267 const TokenPosition token_pos_; | 3282 const TokenPosition token_pos_; |
| 3268 const Function& function_; | 3283 const Function& function_; |
| 3269 const Array& argument_names_; | 3284 const Array& argument_names_; |
| 3270 ZoneGrowableArray<PushArgumentInstr*>* arguments_; | 3285 ZoneGrowableArray<PushArgumentInstr*>* arguments_; |
| 3271 intptr_t result_cid_; // For some library functions we know the result. | 3286 intptr_t result_cid_; // For some library functions we know the result. |
| 3272 | 3287 |
| 3273 // 'True' for recognized list constructors. | 3288 // 'True' for recognized list constructors. |
| 3274 bool is_known_list_constructor_; | 3289 bool is_known_list_constructor_; |
| 3275 bool is_native_list_factory_; | 3290 bool is_native_list_factory_; |
| 3276 | 3291 |
| 3277 AliasIdentity identity_; | 3292 AliasIdentity identity_; |
| 3278 | 3293 |
| 3279 DISALLOW_COPY_AND_ASSIGN(StaticCallInstr); | 3294 DISALLOW_COPY_AND_ASSIGN(StaticCallInstr); |
| 3280 }; | 3295 }; |
| 3281 | 3296 |
| 3282 | 3297 |
| 3283 class LoadLocalInstr : public TemplateDefinition<0, NoThrow> { | 3298 class LoadLocalInstr : public TemplateDefinition<0, NoThrow> { |
| 3284 public: | 3299 public: |
| 3285 LoadLocalInstr(const LocalVariable& local, | 3300 LoadLocalInstr(const LocalVariable& local, |
| 3286 TokenPosition token_pos) | 3301 TokenPosition token_pos) |
| 3287 : local_(local), is_last_(false), token_pos_(token_pos) { } | 3302 : local_(local), is_last_(false), token_pos_(token_pos) { } |
| 3288 | 3303 |
| 3289 DECLARE_INSTRUCTION(LoadLocal) | 3304 DECLARE_INSTRUCTION(LoadLocal) |
| 3290 virtual CompileType ComputeType() const; | 3305 virtual CompileType ComputeType() const; |
| 3291 | 3306 |
| 3292 const LocalVariable& local() const { return local_; } | 3307 const LocalVariable& local() const { return local_; } |
| 3293 | 3308 |
| 3294 virtual void PrintOperandsTo(BufferFormatter* f) const; | |
| 3295 | |
| 3296 virtual bool CanDeoptimize() const { return false; } | 3309 virtual bool CanDeoptimize() const { return false; } |
| 3297 | 3310 |
| 3298 virtual EffectSet Effects() const { | 3311 virtual EffectSet Effects() const { |
| 3299 UNREACHABLE(); // Eliminated by SSA construction. | 3312 UNREACHABLE(); // Eliminated by SSA construction. |
| 3300 return EffectSet::None(); | 3313 return EffectSet::None(); |
| 3301 } | 3314 } |
| 3302 | 3315 |
| 3303 void mark_last() { is_last_ = true; } | 3316 void mark_last() { is_last_ = true; } |
| 3304 bool is_last() const { return is_last_; } | 3317 bool is_last() const { return is_last_; } |
| 3305 | 3318 |
| 3306 virtual TokenPosition token_pos() const { return token_pos_; } | 3319 virtual TokenPosition token_pos() const { return token_pos_; } |
| 3307 | 3320 |
| 3321 PRINT_OPERANDS_TO_SUPPORT |
| 3322 |
| 3308 private: | 3323 private: |
| 3309 const LocalVariable& local_; | 3324 const LocalVariable& local_; |
| 3310 bool is_last_; | 3325 bool is_last_; |
| 3311 const TokenPosition token_pos_; | 3326 const TokenPosition token_pos_; |
| 3312 | 3327 |
| 3313 DISALLOW_COPY_AND_ASSIGN(LoadLocalInstr); | 3328 DISALLOW_COPY_AND_ASSIGN(LoadLocalInstr); |
| 3314 }; | 3329 }; |
| 3315 | 3330 |
| 3316 | 3331 |
| 3317 class PushTempInstr : public TemplateDefinition<1, NoThrow> { | 3332 class PushTempInstr : public TemplateDefinition<1, NoThrow> { |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3358 ASSERT((value_ != NULL) && (i == 0)); | 3373 ASSERT((value_ != NULL) && (i == 0)); |
| 3359 return value_; | 3374 return value_; |
| 3360 } | 3375 } |
| 3361 | 3376 |
| 3362 Value* value() const { return value_; } | 3377 Value* value() const { return value_; } |
| 3363 | 3378 |
| 3364 intptr_t num_temps() const { return num_temps_; } | 3379 intptr_t num_temps() const { return num_temps_; } |
| 3365 | 3380 |
| 3366 virtual CompileType ComputeType() const; | 3381 virtual CompileType ComputeType() const; |
| 3367 | 3382 |
| 3368 virtual void PrintOperandsTo(BufferFormatter* f) const; | |
| 3369 | |
| 3370 virtual bool CanDeoptimize() const { return false; } | 3383 virtual bool CanDeoptimize() const { return false; } |
| 3371 | 3384 |
| 3372 virtual EffectSet Effects() const { | 3385 virtual EffectSet Effects() const { |
| 3373 UNREACHABLE(); // Eliminated by SSA construction. | 3386 UNREACHABLE(); // Eliminated by SSA construction. |
| 3374 return EffectSet::None(); | 3387 return EffectSet::None(); |
| 3375 } | 3388 } |
| 3376 | 3389 |
| 3377 virtual bool MayThrow() const { | 3390 virtual bool MayThrow() const { |
| 3378 UNREACHABLE(); | 3391 UNREACHABLE(); |
| 3379 return false; | 3392 return false; |
| 3380 } | 3393 } |
| 3381 | 3394 |
| 3382 virtual TokenPosition token_pos() const { | 3395 virtual TokenPosition token_pos() const { |
| 3383 return TokenPosition::kTempMove; | 3396 return TokenPosition::kTempMove; |
| 3384 } | 3397 } |
| 3385 | 3398 |
| 3399 PRINT_OPERANDS_TO_SUPPORT |
| 3400 |
| 3386 private: | 3401 private: |
| 3387 virtual void RawSetInputAt(intptr_t i, Value* value) { | 3402 virtual void RawSetInputAt(intptr_t i, Value* value) { |
| 3388 value_ = value; | 3403 value_ = value; |
| 3389 } | 3404 } |
| 3390 | 3405 |
| 3391 const intptr_t num_temps_; | 3406 const intptr_t num_temps_; |
| 3392 Value* value_; | 3407 Value* value_; |
| 3393 | 3408 |
| 3394 DISALLOW_COPY_AND_ASSIGN(DropTempsInstr); | 3409 DISALLOW_COPY_AND_ASSIGN(DropTempsInstr); |
| 3395 }; | 3410 }; |
| 3396 | 3411 |
| 3397 | 3412 |
| 3398 class StoreLocalInstr : public TemplateDefinition<1, NoThrow> { | 3413 class StoreLocalInstr : public TemplateDefinition<1, NoThrow> { |
| 3399 public: | 3414 public: |
| 3400 StoreLocalInstr(const LocalVariable& local, | 3415 StoreLocalInstr(const LocalVariable& local, |
| 3401 Value* value, | 3416 Value* value, |
| 3402 TokenPosition token_pos) | 3417 TokenPosition token_pos) |
| 3403 : local_(local), is_dead_(false), is_last_(false), token_pos_(token_pos) { | 3418 : local_(local), is_dead_(false), is_last_(false), token_pos_(token_pos) { |
| 3404 SetInputAt(0, value); | 3419 SetInputAt(0, value); |
| 3405 } | 3420 } |
| 3406 | 3421 |
| 3407 DECLARE_INSTRUCTION(StoreLocal) | 3422 DECLARE_INSTRUCTION(StoreLocal) |
| 3408 virtual CompileType ComputeType() const; | 3423 virtual CompileType ComputeType() const; |
| 3409 | 3424 |
| 3410 const LocalVariable& local() const { return local_; } | 3425 const LocalVariable& local() const { return local_; } |
| 3411 Value* value() const { return inputs_[0]; } | 3426 Value* value() const { return inputs_[0]; } |
| 3412 | 3427 |
| 3413 virtual void PrintOperandsTo(BufferFormatter* f) const; | |
| 3414 | |
| 3415 virtual bool CanDeoptimize() const { return false; } | 3428 virtual bool CanDeoptimize() const { return false; } |
| 3416 | 3429 |
| 3417 void mark_dead() { is_dead_ = true; } | 3430 void mark_dead() { is_dead_ = true; } |
| 3418 bool is_dead() const { return is_dead_; } | 3431 bool is_dead() const { return is_dead_; } |
| 3419 | 3432 |
| 3420 void mark_last() { is_last_ = true; } | 3433 void mark_last() { is_last_ = true; } |
| 3421 bool is_last() const { return is_last_; } | 3434 bool is_last() const { return is_last_; } |
| 3422 | 3435 |
| 3423 virtual EffectSet Effects() const { | 3436 virtual EffectSet Effects() const { |
| 3424 UNREACHABLE(); // Eliminated by SSA construction. | 3437 UNREACHABLE(); // Eliminated by SSA construction. |
| 3425 return EffectSet::None(); | 3438 return EffectSet::None(); |
| 3426 } | 3439 } |
| 3427 | 3440 |
| 3428 virtual TokenPosition token_pos() const { return token_pos_; } | 3441 virtual TokenPosition token_pos() const { return token_pos_; } |
| 3429 | 3442 |
| 3443 PRINT_OPERANDS_TO_SUPPORT |
| 3444 |
| 3430 private: | 3445 private: |
| 3431 const LocalVariable& local_; | 3446 const LocalVariable& local_; |
| 3432 bool is_dead_; | 3447 bool is_dead_; |
| 3433 bool is_last_; | 3448 bool is_last_; |
| 3434 const TokenPosition token_pos_; | 3449 const TokenPosition token_pos_; |
| 3435 | 3450 |
| 3436 DISALLOW_COPY_AND_ASSIGN(StoreLocalInstr); | 3451 DISALLOW_COPY_AND_ASSIGN(StoreLocalInstr); |
| 3437 }; | 3452 }; |
| 3438 | 3453 |
| 3439 | 3454 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 3461 } | 3476 } |
| 3462 | 3477 |
| 3463 bool is_bootstrap_native() const { | 3478 bool is_bootstrap_native() const { |
| 3464 return is_bootstrap_native_; | 3479 return is_bootstrap_native_; |
| 3465 } | 3480 } |
| 3466 | 3481 |
| 3467 bool link_lazily() const { | 3482 bool link_lazily() const { |
| 3468 return ast_node_.link_lazily(); | 3483 return ast_node_.link_lazily(); |
| 3469 } | 3484 } |
| 3470 | 3485 |
| 3471 virtual void PrintOperandsTo(BufferFormatter* f) const; | |
| 3472 | |
| 3473 virtual bool CanDeoptimize() const { return false; } | 3486 virtual bool CanDeoptimize() const { return false; } |
| 3474 | 3487 |
| 3475 virtual EffectSet Effects() const { return EffectSet::All(); } | 3488 virtual EffectSet Effects() const { return EffectSet::All(); } |
| 3476 | 3489 |
| 3477 void SetupNative(); | 3490 void SetupNative(); |
| 3478 | 3491 |
| 3492 PRINT_OPERANDS_TO_SUPPORT |
| 3493 |
| 3479 private: | 3494 private: |
| 3480 void set_native_c_function(NativeFunction value) { | 3495 void set_native_c_function(NativeFunction value) { |
| 3481 native_c_function_ = value; | 3496 native_c_function_ = value; |
| 3482 } | 3497 } |
| 3483 | 3498 |
| 3484 void set_is_bootstrap_native(bool value) { is_bootstrap_native_ = value; } | 3499 void set_is_bootstrap_native(bool value) { is_bootstrap_native_ = value; } |
| 3485 | 3500 |
| 3486 const NativeBodyNode& ast_node_; | 3501 const NativeBodyNode& ast_node_; |
| 3487 NativeFunction native_c_function_; | 3502 NativeFunction native_c_function_; |
| 3488 bool is_bootstrap_native_; | 3503 bool is_bootstrap_native_; |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3577 virtual TokenPosition token_pos() const { return token_pos_; } | 3592 virtual TokenPosition token_pos() const { return token_pos_; } |
| 3578 | 3593 |
| 3579 const Field& field() const { return field_; } | 3594 const Field& field() const { return field_; } |
| 3580 intptr_t offset_in_bytes() const { return offset_in_bytes_; } | 3595 intptr_t offset_in_bytes() const { return offset_in_bytes_; } |
| 3581 | 3596 |
| 3582 bool ShouldEmitStoreBarrier() const { | 3597 bool ShouldEmitStoreBarrier() const { |
| 3583 return value()->NeedsStoreBuffer() | 3598 return value()->NeedsStoreBuffer() |
| 3584 && (emit_store_barrier_ == kEmitStoreBarrier); | 3599 && (emit_store_barrier_ == kEmitStoreBarrier); |
| 3585 } | 3600 } |
| 3586 | 3601 |
| 3587 virtual void PrintOperandsTo(BufferFormatter* f) const; | |
| 3588 | |
| 3589 virtual bool CanDeoptimize() const { return false; } | 3602 virtual bool CanDeoptimize() const { return false; } |
| 3590 | 3603 |
| 3591 // May require a deoptimization target for input conversions. | 3604 // May require a deoptimization target for input conversions. |
| 3592 virtual intptr_t DeoptimizationTarget() const { | 3605 virtual intptr_t DeoptimizationTarget() const { |
| 3593 return GetDeoptId(); | 3606 return GetDeoptId(); |
| 3594 } | 3607 } |
| 3595 | 3608 |
| 3596 // Currently CSE/LICM don't operate on any instructions that can be affected | 3609 // Currently CSE/LICM don't operate on any instructions that can be affected |
| 3597 // by stores/loads. LoadOptimizer handles loads separately. Hence stores | 3610 // by stores/loads. LoadOptimizer handles loads separately. Hence stores |
| 3598 // are marked as having no side-effects. | 3611 // are marked as having no side-effects. |
| 3599 virtual EffectSet Effects() const { return EffectSet::None(); } | 3612 virtual EffectSet Effects() const { return EffectSet::None(); } |
| 3600 | 3613 |
| 3601 bool IsUnboxedStore() const; | 3614 bool IsUnboxedStore() const; |
| 3602 | 3615 |
| 3603 bool IsPotentialUnboxedStore() const; | 3616 bool IsPotentialUnboxedStore() const; |
| 3604 | 3617 |
| 3605 virtual Representation RequiredInputRepresentation(intptr_t index) const; | 3618 virtual Representation RequiredInputRepresentation(intptr_t index) const; |
| 3606 | 3619 |
| 3620 PRINT_OPERANDS_TO_SUPPORT |
| 3621 |
| 3607 private: | 3622 private: |
| 3608 friend class FlowGraphOptimizer; // For ASSERT(initialization_). | 3623 friend class FlowGraphOptimizer; // For ASSERT(initialization_). |
| 3609 | 3624 |
| 3610 bool CanValueBeSmi() const { | 3625 bool CanValueBeSmi() const { |
| 3611 const intptr_t cid = value()->Type()->ToNullableCid(); | 3626 const intptr_t cid = value()->Type()->ToNullableCid(); |
| 3612 // Write barrier is skipped for nullable and non-nullable smis. | 3627 // Write barrier is skipped for nullable and non-nullable smis. |
| 3613 ASSERT(cid != kSmiCid); | 3628 ASSERT(cid != kSmiCid); |
| 3614 return (cid == kDynamicCid); | 3629 return (cid == kDynamicCid); |
| 3615 } | 3630 } |
| 3616 | 3631 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 3641 Value* value() const { return inputs_[0]; } | 3656 Value* value() const { return inputs_[0]; } |
| 3642 | 3657 |
| 3643 const Field& field() const { return field_; } | 3658 const Field& field() const { return field_; } |
| 3644 | 3659 |
| 3645 virtual bool CanDeoptimize() const { return true; } | 3660 virtual bool CanDeoptimize() const { return true; } |
| 3646 virtual bool CanBecomeDeoptimizationTarget() const { | 3661 virtual bool CanBecomeDeoptimizationTarget() const { |
| 3647 // Ensure that we record kDeopt PC descriptor in unoptimized code. | 3662 // Ensure that we record kDeopt PC descriptor in unoptimized code. |
| 3648 return true; | 3663 return true; |
| 3649 } | 3664 } |
| 3650 | 3665 |
| 3651 virtual void PrintOperandsTo(BufferFormatter* f) const; | 3666 PRINT_OPERANDS_TO_SUPPORT |
| 3652 | 3667 |
| 3653 private: | 3668 private: |
| 3654 const Field& field_; | 3669 const Field& field_; |
| 3655 | 3670 |
| 3656 DISALLOW_COPY_AND_ASSIGN(GuardFieldInstr); | 3671 DISALLOW_COPY_AND_ASSIGN(GuardFieldInstr); |
| 3657 }; | 3672 }; |
| 3658 | 3673 |
| 3659 | 3674 |
| 3660 class GuardFieldClassInstr : public GuardFieldInstr { | 3675 class GuardFieldClassInstr : public GuardFieldInstr { |
| 3661 public: | 3676 public: |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3701 SetInputAt(0, field_value); | 3716 SetInputAt(0, field_value); |
| 3702 } | 3717 } |
| 3703 | 3718 |
| 3704 DECLARE_INSTRUCTION(LoadStaticField) | 3719 DECLARE_INSTRUCTION(LoadStaticField) |
| 3705 virtual CompileType ComputeType() const; | 3720 virtual CompileType ComputeType() const; |
| 3706 | 3721 |
| 3707 const Field& StaticField() const; | 3722 const Field& StaticField() const; |
| 3708 | 3723 |
| 3709 Value* field_value() const { return inputs_[0]; } | 3724 Value* field_value() const { return inputs_[0]; } |
| 3710 | 3725 |
| 3711 virtual void PrintOperandsTo(BufferFormatter* f) const; | |
| 3712 | |
| 3713 virtual bool CanDeoptimize() const { return false; } | 3726 virtual bool CanDeoptimize() const { return false; } |
| 3714 | 3727 |
| 3715 virtual bool AllowsCSE() const { return StaticField().is_final(); } | 3728 virtual bool AllowsCSE() const { return StaticField().is_final(); } |
| 3716 virtual EffectSet Effects() const { return EffectSet::None(); } | 3729 virtual EffectSet Effects() const { return EffectSet::None(); } |
| 3717 virtual EffectSet Dependencies() const; | 3730 virtual EffectSet Dependencies() const; |
| 3718 virtual bool AttributesEqual(Instruction* other) const; | 3731 virtual bool AttributesEqual(Instruction* other) const; |
| 3719 | 3732 |
| 3720 virtual TokenPosition token_pos() const { return token_pos_; } | 3733 virtual TokenPosition token_pos() const { return token_pos_; } |
| 3721 | 3734 |
| 3735 PRINT_OPERANDS_TO_SUPPORT |
| 3736 |
| 3722 private: | 3737 private: |
| 3723 const TokenPosition token_pos_; | 3738 const TokenPosition token_pos_; |
| 3724 | 3739 |
| 3725 DISALLOW_COPY_AND_ASSIGN(LoadStaticFieldInstr); | 3740 DISALLOW_COPY_AND_ASSIGN(LoadStaticFieldInstr); |
| 3726 }; | 3741 }; |
| 3727 | 3742 |
| 3728 | 3743 |
| 3729 class StoreStaticFieldInstr : public TemplateDefinition<1, NoThrow> { | 3744 class StoreStaticFieldInstr : public TemplateDefinition<1, NoThrow> { |
| 3730 public: | 3745 public: |
| 3731 StoreStaticFieldInstr(const Field& field, | 3746 StoreStaticFieldInstr(const Field& field, |
| 3732 Value* value, | 3747 Value* value, |
| 3733 TokenPosition token_pos) | 3748 TokenPosition token_pos) |
| 3734 : field_(field), | 3749 : field_(field), |
| 3735 token_pos_(token_pos) { | 3750 token_pos_(token_pos) { |
| 3736 ASSERT(field.IsZoneHandle()); | 3751 ASSERT(field.IsZoneHandle()); |
| 3737 SetInputAt(kValuePos, value); | 3752 SetInputAt(kValuePos, value); |
| 3738 } | 3753 } |
| 3739 | 3754 |
| 3740 enum { | 3755 enum { |
| 3741 kValuePos = 0 | 3756 kValuePos = 0 |
| 3742 }; | 3757 }; |
| 3743 | 3758 |
| 3744 DECLARE_INSTRUCTION(StoreStaticField) | 3759 DECLARE_INSTRUCTION(StoreStaticField) |
| 3745 | 3760 |
| 3746 const Field& field() const { return field_; } | 3761 const Field& field() const { return field_; } |
| 3747 Value* value() const { return inputs_[kValuePos]; } | 3762 Value* value() const { return inputs_[kValuePos]; } |
| 3748 | 3763 |
| 3749 virtual void PrintOperandsTo(BufferFormatter* f) const; | |
| 3750 | |
| 3751 virtual bool CanDeoptimize() const { return false; } | 3764 virtual bool CanDeoptimize() const { return false; } |
| 3752 | 3765 |
| 3753 // Currently CSE/LICM don't operate on any instructions that can be affected | 3766 // Currently CSE/LICM don't operate on any instructions that can be affected |
| 3754 // by stores/loads. LoadOptimizer handles loads separately. Hence stores | 3767 // by stores/loads. LoadOptimizer handles loads separately. Hence stores |
| 3755 // are marked as having no side-effects. | 3768 // are marked as having no side-effects. |
| 3756 virtual EffectSet Effects() const { return EffectSet::None(); } | 3769 virtual EffectSet Effects() const { return EffectSet::None(); } |
| 3757 | 3770 |
| 3758 virtual TokenPosition token_pos() const { return token_pos_; } | 3771 virtual TokenPosition token_pos() const { return token_pos_; } |
| 3759 | 3772 |
| 3773 PRINT_OPERANDS_TO_SUPPORT |
| 3774 |
| 3760 private: | 3775 private: |
| 3761 bool CanValueBeSmi() const { | 3776 bool CanValueBeSmi() const { |
| 3762 const intptr_t cid = value()->Type()->ToNullableCid(); | 3777 const intptr_t cid = value()->Type()->ToNullableCid(); |
| 3763 // Write barrier is skipped for nullable and non-nullable smis. | 3778 // Write barrier is skipped for nullable and non-nullable smis. |
| 3764 ASSERT(cid != kSmiCid); | 3779 ASSERT(cid != kSmiCid); |
| 3765 return (cid == kDynamicCid); | 3780 return (cid == kDynamicCid); |
| 3766 } | 3781 } |
| 3767 | 3782 |
| 3768 const Field& field_; | 3783 const Field& field_; |
| 3769 const TokenPosition token_pos_; | 3784 const TokenPosition token_pos_; |
| (...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4090 DECLARE_INSTRUCTION(InstanceOf) | 4105 DECLARE_INSTRUCTION(InstanceOf) |
| 4091 virtual CompileType ComputeType() const; | 4106 virtual CompileType ComputeType() const; |
| 4092 | 4107 |
| 4093 Value* value() const { return inputs_[0]; } | 4108 Value* value() const { return inputs_[0]; } |
| 4094 Value* instantiator_type_arguments() const { return inputs_[1]; } | 4109 Value* instantiator_type_arguments() const { return inputs_[1]; } |
| 4095 | 4110 |
| 4096 bool negate_result() const { return negate_result_; } | 4111 bool negate_result() const { return negate_result_; } |
| 4097 const AbstractType& type() const { return type_; } | 4112 const AbstractType& type() const { return type_; } |
| 4098 virtual TokenPosition token_pos() const { return token_pos_; } | 4113 virtual TokenPosition token_pos() const { return token_pos_; } |
| 4099 | 4114 |
| 4100 virtual void PrintOperandsTo(BufferFormatter* f) const; | |
| 4101 | |
| 4102 virtual bool CanDeoptimize() const { return true; } | 4115 virtual bool CanDeoptimize() const { return true; } |
| 4103 | 4116 |
| 4104 virtual EffectSet Effects() const { return EffectSet::None(); } | 4117 virtual EffectSet Effects() const { return EffectSet::None(); } |
| 4105 | 4118 |
| 4119 PRINT_OPERANDS_TO_SUPPORT |
| 4120 |
| 4106 private: | 4121 private: |
| 4107 const TokenPosition token_pos_; | 4122 const TokenPosition token_pos_; |
| 4108 Value* value_; | 4123 Value* value_; |
| 4109 Value* type_arguments_; | 4124 Value* type_arguments_; |
| 4110 const AbstractType& type_; | 4125 const AbstractType& type_; |
| 4111 const bool negate_result_; | 4126 const bool negate_result_; |
| 4112 | 4127 |
| 4113 DISALLOW_COPY_AND_ASSIGN(InstanceOfInstr); | 4128 DISALLOW_COPY_AND_ASSIGN(InstanceOfInstr); |
| 4114 }; | 4129 }; |
| 4115 | 4130 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 4137 } | 4152 } |
| 4138 | 4153 |
| 4139 const Class& cls() const { return cls_; } | 4154 const Class& cls() const { return cls_; } |
| 4140 virtual TokenPosition token_pos() const { return token_pos_; } | 4155 virtual TokenPosition token_pos() const { return token_pos_; } |
| 4141 | 4156 |
| 4142 const Function& closure_function() const { return closure_function_; } | 4157 const Function& closure_function() const { return closure_function_; } |
| 4143 void set_closure_function(const Function& function) { | 4158 void set_closure_function(const Function& function) { |
| 4144 closure_function_ ^= function.raw(); | 4159 closure_function_ ^= function.raw(); |
| 4145 } | 4160 } |
| 4146 | 4161 |
| 4147 virtual void PrintOperandsTo(BufferFormatter* f) const; | |
| 4148 | |
| 4149 virtual bool CanDeoptimize() const { return false; } | 4162 virtual bool CanDeoptimize() const { return false; } |
| 4150 | 4163 |
| 4151 virtual EffectSet Effects() const { return EffectSet::None(); } | 4164 virtual EffectSet Effects() const { return EffectSet::None(); } |
| 4152 | 4165 |
| 4153 virtual AliasIdentity Identity() const { return identity_; } | 4166 virtual AliasIdentity Identity() const { return identity_; } |
| 4154 virtual void SetIdentity(AliasIdentity identity) { identity_ = identity; } | 4167 virtual void SetIdentity(AliasIdentity identity) { identity_ = identity; } |
| 4155 | 4168 |
| 4169 PRINT_OPERANDS_TO_SUPPORT |
| 4170 |
| 4156 private: | 4171 private: |
| 4157 const TokenPosition token_pos_; | 4172 const TokenPosition token_pos_; |
| 4158 const Class& cls_; | 4173 const Class& cls_; |
| 4159 ZoneGrowableArray<PushArgumentInstr*>* const arguments_; | 4174 ZoneGrowableArray<PushArgumentInstr*>* const arguments_; |
| 4160 AliasIdentity identity_; | 4175 AliasIdentity identity_; |
| 4161 Function& closure_function_; | 4176 Function& closure_function_; |
| 4162 | 4177 |
| 4163 DISALLOW_COPY_AND_ASSIGN(AllocateObjectInstr); | 4178 DISALLOW_COPY_AND_ASSIGN(AllocateObjectInstr); |
| 4164 }; | 4179 }; |
| 4165 | 4180 |
| 4166 | 4181 |
| 4167 class AllocateUninitializedContextInstr | 4182 class AllocateUninitializedContextInstr |
| 4168 : public TemplateDefinition<0, NoThrow> { | 4183 : public TemplateDefinition<0, NoThrow> { |
| 4169 public: | 4184 public: |
| 4170 AllocateUninitializedContextInstr(TokenPosition token_pos, | 4185 AllocateUninitializedContextInstr(TokenPosition token_pos, |
| 4171 intptr_t num_context_variables) | 4186 intptr_t num_context_variables) |
| 4172 : token_pos_(token_pos), | 4187 : token_pos_(token_pos), |
| 4173 num_context_variables_(num_context_variables), | 4188 num_context_variables_(num_context_variables), |
| 4174 identity_(AliasIdentity::Unknown()) {} | 4189 identity_(AliasIdentity::Unknown()) {} |
| 4175 | 4190 |
| 4176 DECLARE_INSTRUCTION(AllocateUninitializedContext) | 4191 DECLARE_INSTRUCTION(AllocateUninitializedContext) |
| 4177 virtual CompileType ComputeType() const; | 4192 virtual CompileType ComputeType() const; |
| 4178 | 4193 |
| 4179 virtual TokenPosition token_pos() const { return token_pos_; } | 4194 virtual TokenPosition token_pos() const { return token_pos_; } |
| 4180 intptr_t num_context_variables() const { return num_context_variables_; } | 4195 intptr_t num_context_variables() const { return num_context_variables_; } |
| 4181 | 4196 |
| 4182 virtual void PrintOperandsTo(BufferFormatter* f) const; | |
| 4183 | |
| 4184 virtual bool CanDeoptimize() const { return false; } | 4197 virtual bool CanDeoptimize() const { return false; } |
| 4185 | 4198 |
| 4186 virtual EffectSet Effects() const { return EffectSet::None(); } | 4199 virtual EffectSet Effects() const { return EffectSet::None(); } |
| 4187 | 4200 |
| 4188 virtual AliasIdentity Identity() const { return identity_; } | 4201 virtual AliasIdentity Identity() const { return identity_; } |
| 4189 virtual void SetIdentity(AliasIdentity identity) { identity_ = identity; } | 4202 virtual void SetIdentity(AliasIdentity identity) { identity_ = identity; } |
| 4190 | 4203 |
| 4204 PRINT_OPERANDS_TO_SUPPORT |
| 4205 |
| 4191 private: | 4206 private: |
| 4192 const TokenPosition token_pos_; | 4207 const TokenPosition token_pos_; |
| 4193 const intptr_t num_context_variables_; | 4208 const intptr_t num_context_variables_; |
| 4194 AliasIdentity identity_; | 4209 AliasIdentity identity_; |
| 4195 | 4210 |
| 4196 DISALLOW_COPY_AND_ASSIGN(AllocateUninitializedContextInstr); | 4211 DISALLOW_COPY_AND_ASSIGN(AllocateUninitializedContextInstr); |
| 4197 }; | 4212 }; |
| 4198 | 4213 |
| 4199 | 4214 |
| 4200 // This instruction captures the state of the object which had its allocation | 4215 // This instruction captures the state of the object which had its allocation |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4249 return slots_[i]->IsField() | 4264 return slots_[i]->IsField() |
| 4250 ? Field::Cast(*slots_[i]).Offset() | 4265 ? Field::Cast(*slots_[i]).Offset() |
| 4251 : Smi::Cast(*slots_[i]).Value(); | 4266 : Smi::Cast(*slots_[i]).Value(); |
| 4252 } | 4267 } |
| 4253 | 4268 |
| 4254 const Location& LocationAt(intptr_t i) { | 4269 const Location& LocationAt(intptr_t i) { |
| 4255 return locations_[i]; | 4270 return locations_[i]; |
| 4256 } | 4271 } |
| 4257 | 4272 |
| 4258 DECLARE_INSTRUCTION(MaterializeObject) | 4273 DECLARE_INSTRUCTION(MaterializeObject) |
| 4259 virtual void PrintOperandsTo(BufferFormatter* f) const; | |
| 4260 | 4274 |
| 4261 virtual intptr_t InputCount() const { | 4275 virtual intptr_t InputCount() const { |
| 4262 return values_->length(); | 4276 return values_->length(); |
| 4263 } | 4277 } |
| 4264 | 4278 |
| 4265 virtual Value* InputAt(intptr_t i) const { | 4279 virtual Value* InputAt(intptr_t i) const { |
| 4266 return (*values_)[i]; | 4280 return (*values_)[i]; |
| 4267 } | 4281 } |
| 4268 | 4282 |
| 4269 // SelectRepresentations pass is run once more while MaterializeObject | 4283 // SelectRepresentations pass is run once more while MaterializeObject |
| (...skipping 15 matching lines...) Expand all Loading... |
| 4285 virtual bool MayThrow() const { return false; } | 4299 virtual bool MayThrow() const { return false; } |
| 4286 | 4300 |
| 4287 void RemapRegisters(intptr_t* cpu_reg_slots, | 4301 void RemapRegisters(intptr_t* cpu_reg_slots, |
| 4288 intptr_t* fpu_reg_slots); | 4302 intptr_t* fpu_reg_slots); |
| 4289 | 4303 |
| 4290 bool was_visited_for_liveness() const { return visited_for_liveness_; } | 4304 bool was_visited_for_liveness() const { return visited_for_liveness_; } |
| 4291 void mark_visited_for_liveness() { | 4305 void mark_visited_for_liveness() { |
| 4292 visited_for_liveness_ = true; | 4306 visited_for_liveness_ = true; |
| 4293 } | 4307 } |
| 4294 | 4308 |
| 4309 PRINT_OPERANDS_TO_SUPPORT |
| 4310 |
| 4295 private: | 4311 private: |
| 4296 virtual void RawSetInputAt(intptr_t i, Value* value) { | 4312 virtual void RawSetInputAt(intptr_t i, Value* value) { |
| 4297 (*values_)[i] = value; | 4313 (*values_)[i] = value; |
| 4298 } | 4314 } |
| 4299 | 4315 |
| 4300 Definition* allocation_; | 4316 Definition* allocation_; |
| 4301 const Class& cls_; | 4317 const Class& cls_; |
| 4302 intptr_t num_variables_; | 4318 intptr_t num_variables_; |
| 4303 const ZoneGrowableArray<const Object*>& slots_; | 4319 const ZoneGrowableArray<const Object*>& slots_; |
| 4304 ZoneGrowableArray<Value*>* values_; | 4320 ZoneGrowableArray<Value*>* values_; |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4475 recognized_kind_ = kind; | 4491 recognized_kind_ = kind; |
| 4476 } | 4492 } |
| 4477 | 4493 |
| 4478 MethodRecognizer::Kind recognized_kind() const { | 4494 MethodRecognizer::Kind recognized_kind() const { |
| 4479 return recognized_kind_; | 4495 return recognized_kind_; |
| 4480 } | 4496 } |
| 4481 | 4497 |
| 4482 DECLARE_INSTRUCTION(LoadField) | 4498 DECLARE_INSTRUCTION(LoadField) |
| 4483 virtual CompileType ComputeType() const; | 4499 virtual CompileType ComputeType() const; |
| 4484 | 4500 |
| 4485 virtual void PrintOperandsTo(BufferFormatter* f) const; | |
| 4486 | |
| 4487 virtual bool CanDeoptimize() const { return false; } | 4501 virtual bool CanDeoptimize() const { return false; } |
| 4488 | 4502 |
| 4489 virtual void InferRange(RangeAnalysis* analysis, Range* range); | 4503 virtual void InferRange(RangeAnalysis* analysis, Range* range); |
| 4490 | 4504 |
| 4491 bool IsImmutableLengthLoad() const; | 4505 bool IsImmutableLengthLoad() const; |
| 4492 | 4506 |
| 4493 virtual Definition* Canonicalize(FlowGraph* flow_graph); | 4507 virtual Definition* Canonicalize(FlowGraph* flow_graph); |
| 4494 | 4508 |
| 4495 static MethodRecognizer::Kind RecognizedKindFromArrayCid(intptr_t cid); | 4509 static MethodRecognizer::Kind RecognizedKindFromArrayCid(intptr_t cid); |
| 4496 | 4510 |
| 4497 static bool IsFixedLengthArrayCid(intptr_t cid); | 4511 static bool IsFixedLengthArrayCid(intptr_t cid); |
| 4498 | 4512 |
| 4499 virtual bool AllowsCSE() const { return immutable_; } | 4513 virtual bool AllowsCSE() const { return immutable_; } |
| 4500 virtual EffectSet Effects() const { return EffectSet::None(); } | 4514 virtual EffectSet Effects() const { return EffectSet::None(); } |
| 4501 virtual EffectSet Dependencies() const; | 4515 virtual EffectSet Dependencies() const; |
| 4502 virtual bool AttributesEqual(Instruction* other) const; | 4516 virtual bool AttributesEqual(Instruction* other) const; |
| 4503 | 4517 |
| 4518 PRINT_OPERANDS_TO_SUPPORT |
| 4519 |
| 4504 private: | 4520 private: |
| 4505 const intptr_t offset_in_bytes_; | 4521 const intptr_t offset_in_bytes_; |
| 4506 const AbstractType& type_; | 4522 const AbstractType& type_; |
| 4507 intptr_t result_cid_; | 4523 intptr_t result_cid_; |
| 4508 bool immutable_; | 4524 bool immutable_; |
| 4509 | 4525 |
| 4510 MethodRecognizer::Kind recognized_kind_; | 4526 MethodRecognizer::Kind recognized_kind_; |
| 4511 const Field* field_; | 4527 const Field* field_; |
| 4512 const TokenPosition token_pos_; | 4528 const TokenPosition token_pos_; |
| 4513 | 4529 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 4530 } | 4546 } |
| 4531 | 4547 |
| 4532 DECLARE_INSTRUCTION(InstantiateType) | 4548 DECLARE_INSTRUCTION(InstantiateType) |
| 4533 | 4549 |
| 4534 Value* instantiator() const { return inputs_[0]; } | 4550 Value* instantiator() const { return inputs_[0]; } |
| 4535 const AbstractType& type() const { return type_; | 4551 const AbstractType& type() const { return type_; |
| 4536 } | 4552 } |
| 4537 const Class& instantiator_class() const { return instantiator_class_; } | 4553 const Class& instantiator_class() const { return instantiator_class_; } |
| 4538 virtual TokenPosition token_pos() const { return token_pos_; } | 4554 virtual TokenPosition token_pos() const { return token_pos_; } |
| 4539 | 4555 |
| 4540 virtual void PrintOperandsTo(BufferFormatter* f) const; | |
| 4541 | |
| 4542 virtual bool CanDeoptimize() const { return true; } | 4556 virtual bool CanDeoptimize() const { return true; } |
| 4543 | 4557 |
| 4544 virtual EffectSet Effects() const { return EffectSet::None(); } | 4558 virtual EffectSet Effects() const { return EffectSet::None(); } |
| 4545 | 4559 |
| 4560 PRINT_OPERANDS_TO_SUPPORT |
| 4561 |
| 4546 private: | 4562 private: |
| 4547 const TokenPosition token_pos_; | 4563 const TokenPosition token_pos_; |
| 4548 const AbstractType& type_; | 4564 const AbstractType& type_; |
| 4549 const Class& instantiator_class_; | 4565 const Class& instantiator_class_; |
| 4550 | 4566 |
| 4551 DISALLOW_COPY_AND_ASSIGN(InstantiateTypeInstr); | 4567 DISALLOW_COPY_AND_ASSIGN(InstantiateTypeInstr); |
| 4552 }; | 4568 }; |
| 4553 | 4569 |
| 4554 | 4570 |
| 4555 class InstantiateTypeArgumentsInstr : public TemplateDefinition<1, Throws> { | 4571 class InstantiateTypeArgumentsInstr : public TemplateDefinition<1, Throws> { |
| (...skipping 12 matching lines...) Expand all Loading... |
| 4568 | 4584 |
| 4569 DECLARE_INSTRUCTION(InstantiateTypeArguments) | 4585 DECLARE_INSTRUCTION(InstantiateTypeArguments) |
| 4570 | 4586 |
| 4571 Value* instantiator() const { return inputs_[0]; } | 4587 Value* instantiator() const { return inputs_[0]; } |
| 4572 const TypeArguments& type_arguments() const { | 4588 const TypeArguments& type_arguments() const { |
| 4573 return type_arguments_; | 4589 return type_arguments_; |
| 4574 } | 4590 } |
| 4575 const Class& instantiator_class() const { return instantiator_class_; } | 4591 const Class& instantiator_class() const { return instantiator_class_; } |
| 4576 virtual TokenPosition token_pos() const { return token_pos_; } | 4592 virtual TokenPosition token_pos() const { return token_pos_; } |
| 4577 | 4593 |
| 4578 virtual void PrintOperandsTo(BufferFormatter* f) const; | |
| 4579 | |
| 4580 virtual bool CanDeoptimize() const { return true; } | 4594 virtual bool CanDeoptimize() const { return true; } |
| 4581 | 4595 |
| 4582 virtual EffectSet Effects() const { return EffectSet::None(); } | 4596 virtual EffectSet Effects() const { return EffectSet::None(); } |
| 4583 | 4597 |
| 4584 virtual Definition* Canonicalize(FlowGraph* flow_graph); | 4598 virtual Definition* Canonicalize(FlowGraph* flow_graph); |
| 4585 | 4599 |
| 4600 PRINT_OPERANDS_TO_SUPPORT |
| 4601 |
| 4586 private: | 4602 private: |
| 4587 const TokenPosition token_pos_; | 4603 const TokenPosition token_pos_; |
| 4588 const TypeArguments& type_arguments_; | 4604 const TypeArguments& type_arguments_; |
| 4589 const Class& instantiator_class_; | 4605 const Class& instantiator_class_; |
| 4590 | 4606 |
| 4591 DISALLOW_COPY_AND_ASSIGN(InstantiateTypeArgumentsInstr); | 4607 DISALLOW_COPY_AND_ASSIGN(InstantiateTypeArgumentsInstr); |
| 4592 }; | 4608 }; |
| 4593 | 4609 |
| 4594 | 4610 |
| 4595 class AllocateContextInstr : public TemplateDefinition<0, NoThrow> { | 4611 class AllocateContextInstr : public TemplateDefinition<0, NoThrow> { |
| 4596 public: | 4612 public: |
| 4597 AllocateContextInstr(TokenPosition token_pos, | 4613 AllocateContextInstr(TokenPosition token_pos, |
| 4598 intptr_t num_context_variables) | 4614 intptr_t num_context_variables) |
| 4599 : token_pos_(token_pos), | 4615 : token_pos_(token_pos), |
| 4600 num_context_variables_(num_context_variables) { } | 4616 num_context_variables_(num_context_variables) { } |
| 4601 | 4617 |
| 4602 DECLARE_INSTRUCTION(AllocateContext) | 4618 DECLARE_INSTRUCTION(AllocateContext) |
| 4603 virtual CompileType ComputeType() const; | 4619 virtual CompileType ComputeType() const; |
| 4604 | 4620 |
| 4605 virtual TokenPosition token_pos() const { return token_pos_; } | 4621 virtual TokenPosition token_pos() const { return token_pos_; } |
| 4606 intptr_t num_context_variables() const { return num_context_variables_; } | 4622 intptr_t num_context_variables() const { return num_context_variables_; } |
| 4607 | 4623 |
| 4608 virtual void PrintOperandsTo(BufferFormatter* f) const; | |
| 4609 | |
| 4610 virtual bool CanDeoptimize() const { return false; } | 4624 virtual bool CanDeoptimize() const { return false; } |
| 4611 | 4625 |
| 4612 virtual EffectSet Effects() const { return EffectSet::None(); } | 4626 virtual EffectSet Effects() const { return EffectSet::None(); } |
| 4613 | 4627 |
| 4628 PRINT_OPERANDS_TO_SUPPORT |
| 4629 |
| 4614 private: | 4630 private: |
| 4615 const TokenPosition token_pos_; | 4631 const TokenPosition token_pos_; |
| 4616 const intptr_t num_context_variables_; | 4632 const intptr_t num_context_variables_; |
| 4617 | 4633 |
| 4618 DISALLOW_COPY_AND_ASSIGN(AllocateContextInstr); | 4634 DISALLOW_COPY_AND_ASSIGN(AllocateContextInstr); |
| 4619 }; | 4635 }; |
| 4620 | 4636 |
| 4621 | 4637 |
| 4622 class InitStaticFieldInstr : public TemplateInstruction<1, Throws> { | 4638 class InitStaticFieldInstr : public TemplateInstruction<1, Throws> { |
| 4623 public: | 4639 public: |
| (...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4959 virtual CompileType ComputeType() const; | 4975 virtual CompileType ComputeType() const; |
| 4960 | 4976 |
| 4961 virtual bool AttributesEqual(Instruction* other) const { | 4977 virtual bool AttributesEqual(Instruction* other) const { |
| 4962 UnboxIntegerInstr* other_unbox = other->AsUnboxInteger(); | 4978 UnboxIntegerInstr* other_unbox = other->AsUnboxInteger(); |
| 4963 return UnboxInstr::AttributesEqual(other) && | 4979 return UnboxInstr::AttributesEqual(other) && |
| 4964 (other_unbox->is_truncating_ == is_truncating_); | 4980 (other_unbox->is_truncating_ == is_truncating_); |
| 4965 } | 4981 } |
| 4966 | 4982 |
| 4967 virtual Definition* Canonicalize(FlowGraph* flow_graph); | 4983 virtual Definition* Canonicalize(FlowGraph* flow_graph); |
| 4968 | 4984 |
| 4969 virtual void PrintOperandsTo(BufferFormatter* f) const; | 4985 DEFINE_INSTRUCTION_TYPE_CHECK(UnboxInteger) |
| 4970 | 4986 |
| 4971 DEFINE_INSTRUCTION_TYPE_CHECK(UnboxInteger) | 4987 PRINT_OPERANDS_TO_SUPPORT |
| 4972 | 4988 |
| 4973 private: | 4989 private: |
| 4974 bool is_truncating_; | 4990 bool is_truncating_; |
| 4975 | 4991 |
| 4976 DISALLOW_COPY_AND_ASSIGN(UnboxIntegerInstr); | 4992 DISALLOW_COPY_AND_ASSIGN(UnboxIntegerInstr); |
| 4977 }; | 4993 }; |
| 4978 | 4994 |
| 4979 | 4995 |
| 4980 class UnboxInteger32Instr : public UnboxIntegerInstr { | 4996 class UnboxInteger32Instr : public UnboxIntegerInstr { |
| 4981 public: | 4997 public: |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5067 }; | 5083 }; |
| 5068 MathUnaryInstr(MathUnaryKind kind, Value* value, intptr_t deopt_id) | 5084 MathUnaryInstr(MathUnaryKind kind, Value* value, intptr_t deopt_id) |
| 5069 : TemplateDefinition(deopt_id), kind_(kind) { | 5085 : TemplateDefinition(deopt_id), kind_(kind) { |
| 5070 SetInputAt(0, value); | 5086 SetInputAt(0, value); |
| 5071 } | 5087 } |
| 5072 | 5088 |
| 5073 Value* value() const { return inputs_[0]; } | 5089 Value* value() const { return inputs_[0]; } |
| 5074 MathUnaryKind kind() const { return kind_; } | 5090 MathUnaryKind kind() const { return kind_; } |
| 5075 const RuntimeEntry& TargetFunction() const; | 5091 const RuntimeEntry& TargetFunction() const; |
| 5076 | 5092 |
| 5077 virtual void PrintOperandsTo(BufferFormatter* f) const; | |
| 5078 | |
| 5079 virtual bool CanDeoptimize() const { return false; } | 5093 virtual bool CanDeoptimize() const { return false; } |
| 5080 | 5094 |
| 5081 virtual Representation representation() const { | 5095 virtual Representation representation() const { |
| 5082 return kUnboxedDouble; | 5096 return kUnboxedDouble; |
| 5083 } | 5097 } |
| 5084 | 5098 |
| 5085 virtual Representation RequiredInputRepresentation(intptr_t idx) const { | 5099 virtual Representation RequiredInputRepresentation(intptr_t idx) const { |
| 5086 ASSERT(idx == 0); | 5100 ASSERT(idx == 0); |
| 5087 return kUnboxedDouble; | 5101 return kUnboxedDouble; |
| 5088 } | 5102 } |
| 5089 | 5103 |
| 5090 virtual intptr_t DeoptimizationTarget() const { | 5104 virtual intptr_t DeoptimizationTarget() const { |
| 5091 // Direct access since this instruction cannot deoptimize, and the deopt-id | 5105 // Direct access since this instruction cannot deoptimize, and the deopt-id |
| 5092 // was inherited from another instruction that could deoptimize. | 5106 // was inherited from another instruction that could deoptimize. |
| 5093 return GetDeoptId(); | 5107 return GetDeoptId(); |
| 5094 } | 5108 } |
| 5095 | 5109 |
| 5096 DECLARE_INSTRUCTION(MathUnary) | 5110 DECLARE_INSTRUCTION(MathUnary) |
| 5097 virtual CompileType ComputeType() const; | 5111 virtual CompileType ComputeType() const; |
| 5098 | 5112 |
| 5099 virtual bool AttributesEqual(Instruction* other) const { | 5113 virtual bool AttributesEqual(Instruction* other) const { |
| 5100 return kind() == other->AsMathUnary()->kind(); | 5114 return kind() == other->AsMathUnary()->kind(); |
| 5101 } | 5115 } |
| 5102 | 5116 |
| 5103 Definition* Canonicalize(FlowGraph* flow_graph); | 5117 Definition* Canonicalize(FlowGraph* flow_graph); |
| 5104 | 5118 |
| 5105 static const char* KindToCString(MathUnaryKind kind); | 5119 static const char* KindToCString(MathUnaryKind kind); |
| 5106 | 5120 |
| 5121 PRINT_OPERANDS_TO_SUPPORT |
| 5122 |
| 5107 private: | 5123 private: |
| 5108 const MathUnaryKind kind_; | 5124 const MathUnaryKind kind_; |
| 5109 | 5125 |
| 5110 DISALLOW_COPY_AND_ASSIGN(MathUnaryInstr); | 5126 DISALLOW_COPY_AND_ASSIGN(MathUnaryInstr); |
| 5111 }; | 5127 }; |
| 5112 | 5128 |
| 5113 | 5129 |
| 5114 // Calls into the runtime and performs a case-insensitive comparison of the | 5130 // Calls into the runtime and performs a case-insensitive comparison of the |
| 5115 // UTF16 strings (i.e. TwoByteString or ExternalTwoByteString) located at | 5131 // UTF16 strings (i.e. TwoByteString or ExternalTwoByteString) located at |
| 5116 // str[lhs_index:lhs_index + length] and str[rhs_index:rhs_index + length]. | 5132 // str[lhs_index:lhs_index + length] and str[rhs_index:rhs_index + length]. |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5238 SetInputAt(1, right); | 5254 SetInputAt(1, right); |
| 5239 } | 5255 } |
| 5240 | 5256 |
| 5241 Value* left() const { return inputs_[0]; } | 5257 Value* left() const { return inputs_[0]; } |
| 5242 Value* right() const { return inputs_[1]; } | 5258 Value* right() const { return inputs_[1]; } |
| 5243 | 5259 |
| 5244 Token::Kind op_kind() const { return op_kind_; } | 5260 Token::Kind op_kind() const { return op_kind_; } |
| 5245 | 5261 |
| 5246 virtual TokenPosition token_pos() const { return token_pos_; } | 5262 virtual TokenPosition token_pos() const { return token_pos_; } |
| 5247 | 5263 |
| 5248 virtual void PrintOperandsTo(BufferFormatter* f) const; | |
| 5249 | |
| 5250 virtual bool CanDeoptimize() const { return false; } | 5264 virtual bool CanDeoptimize() const { return false; } |
| 5251 | 5265 |
| 5252 virtual Representation representation() const { | 5266 virtual Representation representation() const { |
| 5253 return kUnboxedDouble; | 5267 return kUnboxedDouble; |
| 5254 } | 5268 } |
| 5255 | 5269 |
| 5256 virtual Representation RequiredInputRepresentation(intptr_t idx) const { | 5270 virtual Representation RequiredInputRepresentation(intptr_t idx) const { |
| 5257 ASSERT((idx == 0) || (idx == 1)); | 5271 ASSERT((idx == 0) || (idx == 1)); |
| 5258 return kUnboxedDouble; | 5272 return kUnboxedDouble; |
| 5259 } | 5273 } |
| 5260 | 5274 |
| 5261 virtual intptr_t DeoptimizationTarget() const { | 5275 virtual intptr_t DeoptimizationTarget() const { |
| 5262 // Direct access since this instruction cannot deoptimize, and the deopt-id | 5276 // Direct access since this instruction cannot deoptimize, and the deopt-id |
| 5263 // was inherited from another instruction that could deoptimize. | 5277 // was inherited from another instruction that could deoptimize. |
| 5264 return GetDeoptId(); | 5278 return GetDeoptId(); |
| 5265 } | 5279 } |
| 5266 | 5280 |
| 5281 PRINT_OPERANDS_TO_SUPPORT |
| 5282 |
| 5267 DECLARE_INSTRUCTION(BinaryDoubleOp) | 5283 DECLARE_INSTRUCTION(BinaryDoubleOp) |
| 5268 virtual CompileType ComputeType() const; | 5284 virtual CompileType ComputeType() const; |
| 5269 | 5285 |
| 5270 virtual Definition* Canonicalize(FlowGraph* flow_graph); | 5286 virtual Definition* Canonicalize(FlowGraph* flow_graph); |
| 5271 | 5287 |
| 5272 virtual bool AttributesEqual(Instruction* other) const { | 5288 virtual bool AttributesEqual(Instruction* other) const { |
| 5273 return op_kind() == other->AsBinaryDoubleOp()->op_kind(); | 5289 return op_kind() == other->AsBinaryDoubleOp()->op_kind(); |
| 5274 } | 5290 } |
| 5275 | 5291 |
| 5276 private: | 5292 private: |
| (...skipping 13 matching lines...) Expand all Loading... |
| 5290 : TemplateDefinition(deopt_id), op_kind_(op_kind) { | 5306 : TemplateDefinition(deopt_id), op_kind_(op_kind) { |
| 5291 SetInputAt(0, left); | 5307 SetInputAt(0, left); |
| 5292 SetInputAt(1, right); | 5308 SetInputAt(1, right); |
| 5293 } | 5309 } |
| 5294 | 5310 |
| 5295 Value* left() const { return inputs_[0]; } | 5311 Value* left() const { return inputs_[0]; } |
| 5296 Value* right() const { return inputs_[1]; } | 5312 Value* right() const { return inputs_[1]; } |
| 5297 | 5313 |
| 5298 Token::Kind op_kind() const { return op_kind_; } | 5314 Token::Kind op_kind() const { return op_kind_; } |
| 5299 | 5315 |
| 5300 virtual void PrintOperandsTo(BufferFormatter* f) const; | |
| 5301 | |
| 5302 virtual bool CanDeoptimize() const { return false; } | 5316 virtual bool CanDeoptimize() const { return false; } |
| 5303 | 5317 |
| 5304 virtual Representation representation() const { | 5318 virtual Representation representation() const { |
| 5305 return kUnboxedFloat32x4; | 5319 return kUnboxedFloat32x4; |
| 5306 } | 5320 } |
| 5307 | 5321 |
| 5308 virtual Representation RequiredInputRepresentation(intptr_t idx) const { | 5322 virtual Representation RequiredInputRepresentation(intptr_t idx) const { |
| 5309 ASSERT((idx == 0) || (idx == 1)); | 5323 ASSERT((idx == 0) || (idx == 1)); |
| 5310 return kUnboxedFloat32x4; | 5324 return kUnboxedFloat32x4; |
| 5311 } | 5325 } |
| 5312 | 5326 |
| 5313 virtual intptr_t DeoptimizationTarget() const { | 5327 virtual intptr_t DeoptimizationTarget() const { |
| 5314 // Direct access since this instruction cannot deoptimize, and the deopt-id | 5328 // Direct access since this instruction cannot deoptimize, and the deopt-id |
| 5315 // was inherited from another instruction that could deoptimize. | 5329 // was inherited from another instruction that could deoptimize. |
| 5316 return GetDeoptId(); | 5330 return GetDeoptId(); |
| 5317 } | 5331 } |
| 5318 | 5332 |
| 5319 DECLARE_INSTRUCTION(BinaryFloat32x4Op) | 5333 DECLARE_INSTRUCTION(BinaryFloat32x4Op) |
| 5320 virtual CompileType ComputeType() const; | 5334 virtual CompileType ComputeType() const; |
| 5321 | 5335 |
| 5322 virtual bool AttributesEqual(Instruction* other) const { | 5336 virtual bool AttributesEqual(Instruction* other) const { |
| 5323 return op_kind() == other->AsBinaryFloat32x4Op()->op_kind(); | 5337 return op_kind() == other->AsBinaryFloat32x4Op()->op_kind(); |
| 5324 } | 5338 } |
| 5325 | 5339 |
| 5340 PRINT_OPERANDS_TO_SUPPORT |
| 5341 |
| 5326 private: | 5342 private: |
| 5327 const Token::Kind op_kind_; | 5343 const Token::Kind op_kind_; |
| 5328 | 5344 |
| 5329 DISALLOW_COPY_AND_ASSIGN(BinaryFloat32x4OpInstr); | 5345 DISALLOW_COPY_AND_ASSIGN(BinaryFloat32x4OpInstr); |
| 5330 }; | 5346 }; |
| 5331 | 5347 |
| 5332 | 5348 |
| 5333 class Simd32x4ShuffleInstr : public TemplateDefinition<1, NoThrow, Pure> { | 5349 class Simd32x4ShuffleInstr : public TemplateDefinition<1, NoThrow, Pure> { |
| 5334 public: | 5350 public: |
| 5335 Simd32x4ShuffleInstr(MethodRecognizer::Kind op_kind, Value* value, | 5351 Simd32x4ShuffleInstr(MethodRecognizer::Kind op_kind, Value* value, |
| 5336 intptr_t mask, | 5352 intptr_t mask, |
| 5337 intptr_t deopt_id) | 5353 intptr_t deopt_id) |
| 5338 : TemplateDefinition(deopt_id), op_kind_(op_kind), mask_(mask) { | 5354 : TemplateDefinition(deopt_id), op_kind_(op_kind), mask_(mask) { |
| 5339 SetInputAt(0, value); | 5355 SetInputAt(0, value); |
| 5340 } | 5356 } |
| 5341 | 5357 |
| 5342 Value* value() const { return inputs_[0]; } | 5358 Value* value() const { return inputs_[0]; } |
| 5343 | 5359 |
| 5344 MethodRecognizer::Kind op_kind() const { return op_kind_; } | 5360 MethodRecognizer::Kind op_kind() const { return op_kind_; } |
| 5345 | 5361 |
| 5346 intptr_t mask() const { return mask_; } | 5362 intptr_t mask() const { return mask_; } |
| 5347 | 5363 |
| 5348 virtual void PrintOperandsTo(BufferFormatter* f) const; | |
| 5349 | |
| 5350 virtual bool CanDeoptimize() const { return false; } | 5364 virtual bool CanDeoptimize() const { return false; } |
| 5351 | 5365 |
| 5352 virtual Representation representation() const { | 5366 virtual Representation representation() const { |
| 5353 if ((op_kind_ == MethodRecognizer::kFloat32x4ShuffleX) || | 5367 if ((op_kind_ == MethodRecognizer::kFloat32x4ShuffleX) || |
| 5354 (op_kind_ == MethodRecognizer::kFloat32x4ShuffleY) || | 5368 (op_kind_ == MethodRecognizer::kFloat32x4ShuffleY) || |
| 5355 (op_kind_ == MethodRecognizer::kFloat32x4ShuffleZ) || | 5369 (op_kind_ == MethodRecognizer::kFloat32x4ShuffleZ) || |
| 5356 (op_kind_ == MethodRecognizer::kFloat32x4ShuffleW)) { | 5370 (op_kind_ == MethodRecognizer::kFloat32x4ShuffleW)) { |
| 5357 return kUnboxedDouble; | 5371 return kUnboxedDouble; |
| 5358 } | 5372 } |
| 5359 if ((op_kind_ == MethodRecognizer::kInt32x4Shuffle)) { | 5373 if ((op_kind_ == MethodRecognizer::kInt32x4Shuffle)) { |
| (...skipping 15 matching lines...) Expand all Loading... |
| 5375 ASSERT((op_kind_ == MethodRecognizer::kInt32x4Shuffle)); | 5389 ASSERT((op_kind_ == MethodRecognizer::kInt32x4Shuffle)); |
| 5376 return kUnboxedInt32x4; | 5390 return kUnboxedInt32x4; |
| 5377 } | 5391 } |
| 5378 | 5392 |
| 5379 virtual intptr_t DeoptimizationTarget() const { | 5393 virtual intptr_t DeoptimizationTarget() const { |
| 5380 // Direct access since this instruction cannot deoptimize, and the deopt-id | 5394 // Direct access since this instruction cannot deoptimize, and the deopt-id |
| 5381 // was inherited from another instruction that could deoptimize. | 5395 // was inherited from another instruction that could deoptimize. |
| 5382 return GetDeoptId(); | 5396 return GetDeoptId(); |
| 5383 } | 5397 } |
| 5384 | 5398 |
| 5399 PRINT_OPERANDS_TO_SUPPORT |
| 5400 |
| 5385 DECLARE_INSTRUCTION(Simd32x4Shuffle) | 5401 DECLARE_INSTRUCTION(Simd32x4Shuffle) |
| 5386 virtual CompileType ComputeType() const; | 5402 virtual CompileType ComputeType() const; |
| 5387 | 5403 |
| 5388 virtual bool AttributesEqual(Instruction* other) const { | 5404 virtual bool AttributesEqual(Instruction* other) const { |
| 5389 return (op_kind() == other->AsSimd32x4Shuffle()->op_kind()) && | 5405 return (op_kind() == other->AsSimd32x4Shuffle()->op_kind()) && |
| 5390 (mask() == other->AsSimd32x4Shuffle()->mask()); | 5406 (mask() == other->AsSimd32x4Shuffle()->mask()); |
| 5391 } | 5407 } |
| 5392 | 5408 |
| 5393 private: | 5409 private: |
| 5394 const MethodRecognizer::Kind op_kind_; | 5410 const MethodRecognizer::Kind op_kind_; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 5407 SetInputAt(1, zw); | 5423 SetInputAt(1, zw); |
| 5408 } | 5424 } |
| 5409 | 5425 |
| 5410 Value* xy() const { return inputs_[0]; } | 5426 Value* xy() const { return inputs_[0]; } |
| 5411 Value* zw() const { return inputs_[1]; } | 5427 Value* zw() const { return inputs_[1]; } |
| 5412 | 5428 |
| 5413 MethodRecognizer::Kind op_kind() const { return op_kind_; } | 5429 MethodRecognizer::Kind op_kind() const { return op_kind_; } |
| 5414 | 5430 |
| 5415 intptr_t mask() const { return mask_; } | 5431 intptr_t mask() const { return mask_; } |
| 5416 | 5432 |
| 5417 virtual void PrintOperandsTo(BufferFormatter* f) const; | |
| 5418 | |
| 5419 virtual bool CanDeoptimize() const { return false; } | 5433 virtual bool CanDeoptimize() const { return false; } |
| 5420 | 5434 |
| 5421 virtual Representation representation() const { | 5435 virtual Representation representation() const { |
| 5422 if (op_kind() == MethodRecognizer::kInt32x4ShuffleMix) { | 5436 if (op_kind() == MethodRecognizer::kInt32x4ShuffleMix) { |
| 5423 return kUnboxedInt32x4; | 5437 return kUnboxedInt32x4; |
| 5424 } | 5438 } |
| 5425 ASSERT(op_kind() == MethodRecognizer::kFloat32x4ShuffleMix); | 5439 ASSERT(op_kind() == MethodRecognizer::kFloat32x4ShuffleMix); |
| 5426 return kUnboxedFloat32x4; | 5440 return kUnboxedFloat32x4; |
| 5427 } | 5441 } |
| 5428 | 5442 |
| 5429 virtual Representation RequiredInputRepresentation(intptr_t idx) const { | 5443 virtual Representation RequiredInputRepresentation(intptr_t idx) const { |
| 5430 ASSERT((idx == 0) || (idx == 1)); | 5444 ASSERT((idx == 0) || (idx == 1)); |
| 5431 if (op_kind() == MethodRecognizer::kInt32x4ShuffleMix) { | 5445 if (op_kind() == MethodRecognizer::kInt32x4ShuffleMix) { |
| 5432 return kUnboxedInt32x4; | 5446 return kUnboxedInt32x4; |
| 5433 } | 5447 } |
| 5434 ASSERT(op_kind() == MethodRecognizer::kFloat32x4ShuffleMix); | 5448 ASSERT(op_kind() == MethodRecognizer::kFloat32x4ShuffleMix); |
| 5435 return kUnboxedFloat32x4; | 5449 return kUnboxedFloat32x4; |
| 5436 } | 5450 } |
| 5437 | 5451 |
| 5438 virtual intptr_t DeoptimizationTarget() const { | 5452 virtual intptr_t DeoptimizationTarget() const { |
| 5439 // Direct access since this instruction cannot deoptimize, and the deopt-id | 5453 // Direct access since this instruction cannot deoptimize, and the deopt-id |
| 5440 // was inherited from another instruction that could deoptimize. | 5454 // was inherited from another instruction that could deoptimize. |
| 5441 return GetDeoptId(); | 5455 return GetDeoptId(); |
| 5442 } | 5456 } |
| 5443 | 5457 |
| 5458 PRINT_OPERANDS_TO_SUPPORT |
| 5459 |
| 5444 DECLARE_INSTRUCTION(Simd32x4ShuffleMix) | 5460 DECLARE_INSTRUCTION(Simd32x4ShuffleMix) |
| 5445 virtual CompileType ComputeType() const; | 5461 virtual CompileType ComputeType() const; |
| 5446 | 5462 |
| 5447 virtual bool AttributesEqual(Instruction* other) const { | 5463 virtual bool AttributesEqual(Instruction* other) const { |
| 5448 return (op_kind() == other->AsSimd32x4ShuffleMix()->op_kind()) && | 5464 return (op_kind() == other->AsSimd32x4ShuffleMix()->op_kind()) && |
| 5449 (mask() == other->AsSimd32x4ShuffleMix()->mask()); | 5465 (mask() == other->AsSimd32x4ShuffleMix()->mask()); |
| 5450 } | 5466 } |
| 5451 | 5467 |
| 5452 private: | 5468 private: |
| 5453 const MethodRecognizer::Kind op_kind_; | 5469 const MethodRecognizer::Kind op_kind_; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 5469 SetInputAt(1, value1); | 5485 SetInputAt(1, value1); |
| 5470 SetInputAt(2, value2); | 5486 SetInputAt(2, value2); |
| 5471 SetInputAt(3, value3); | 5487 SetInputAt(3, value3); |
| 5472 } | 5488 } |
| 5473 | 5489 |
| 5474 Value* value0() const { return inputs_[0]; } | 5490 Value* value0() const { return inputs_[0]; } |
| 5475 Value* value1() const { return inputs_[1]; } | 5491 Value* value1() const { return inputs_[1]; } |
| 5476 Value* value2() const { return inputs_[2]; } | 5492 Value* value2() const { return inputs_[2]; } |
| 5477 Value* value3() const { return inputs_[3]; } | 5493 Value* value3() const { return inputs_[3]; } |
| 5478 | 5494 |
| 5479 virtual void PrintOperandsTo(BufferFormatter* f) const; | |
| 5480 | |
| 5481 virtual bool CanDeoptimize() const { return false; } | 5495 virtual bool CanDeoptimize() const { return false; } |
| 5482 | 5496 |
| 5483 virtual Representation representation() const { | 5497 virtual Representation representation() const { |
| 5484 return kUnboxedFloat32x4; | 5498 return kUnboxedFloat32x4; |
| 5485 } | 5499 } |
| 5486 | 5500 |
| 5487 virtual Representation RequiredInputRepresentation(intptr_t idx) const { | 5501 virtual Representation RequiredInputRepresentation(intptr_t idx) const { |
| 5488 ASSERT(idx >= 0 && idx < 4); | 5502 ASSERT(idx >= 0 && idx < 4); |
| 5489 return kUnboxedDouble; | 5503 return kUnboxedDouble; |
| 5490 } | 5504 } |
| 5491 | 5505 |
| 5492 virtual intptr_t DeoptimizationTarget() const { | 5506 virtual intptr_t DeoptimizationTarget() const { |
| 5493 // Direct access since this instruction cannot deoptimize, and the deopt-id | 5507 // Direct access since this instruction cannot deoptimize, and the deopt-id |
| 5494 // was inherited from another instruction that could deoptimize. | 5508 // was inherited from another instruction that could deoptimize. |
| 5495 return GetDeoptId(); | 5509 return GetDeoptId(); |
| 5496 } | 5510 } |
| 5497 | 5511 |
| 5498 DECLARE_INSTRUCTION(Float32x4Constructor) | 5512 DECLARE_INSTRUCTION(Float32x4Constructor) |
| 5499 virtual CompileType ComputeType() const; | 5513 virtual CompileType ComputeType() const; |
| 5500 | 5514 |
| 5501 virtual bool AttributesEqual(Instruction* other) const { return true; } | 5515 virtual bool AttributesEqual(Instruction* other) const { return true; } |
| 5502 | 5516 |
| 5517 PRINT_OPERANDS_TO_SUPPORT |
| 5518 |
| 5503 private: | 5519 private: |
| 5504 DISALLOW_COPY_AND_ASSIGN(Float32x4ConstructorInstr); | 5520 DISALLOW_COPY_AND_ASSIGN(Float32x4ConstructorInstr); |
| 5505 }; | 5521 }; |
| 5506 | 5522 |
| 5507 | 5523 |
| 5508 class Float32x4SplatInstr : public TemplateDefinition<1, NoThrow, Pure> { | 5524 class Float32x4SplatInstr : public TemplateDefinition<1, NoThrow, Pure> { |
| 5509 public: | 5525 public: |
| 5510 Float32x4SplatInstr(Value* value, intptr_t deopt_id) | 5526 Float32x4SplatInstr(Value* value, intptr_t deopt_id) |
| 5511 : TemplateDefinition(deopt_id) { | 5527 : TemplateDefinition(deopt_id) { |
| 5512 SetInputAt(0, value); | 5528 SetInputAt(0, value); |
| 5513 } | 5529 } |
| 5514 | 5530 |
| 5515 Value* value() const { return inputs_[0]; } | 5531 Value* value() const { return inputs_[0]; } |
| 5516 | 5532 |
| 5517 virtual void PrintOperandsTo(BufferFormatter* f) const; | |
| 5518 | |
| 5519 virtual bool CanDeoptimize() const { return false; } | 5533 virtual bool CanDeoptimize() const { return false; } |
| 5520 | 5534 |
| 5521 virtual Representation representation() const { | 5535 virtual Representation representation() const { |
| 5522 return kUnboxedFloat32x4; | 5536 return kUnboxedFloat32x4; |
| 5523 } | 5537 } |
| 5524 | 5538 |
| 5525 virtual Representation RequiredInputRepresentation(intptr_t idx) const { | 5539 virtual Representation RequiredInputRepresentation(intptr_t idx) const { |
| 5526 ASSERT(idx == 0); | 5540 ASSERT(idx == 0); |
| 5527 return kUnboxedDouble; | 5541 return kUnboxedDouble; |
| 5528 } | 5542 } |
| 5529 | 5543 |
| 5530 virtual intptr_t DeoptimizationTarget() const { | 5544 virtual intptr_t DeoptimizationTarget() const { |
| 5531 // Direct access since this instruction cannot deoptimize, and the deopt-id | 5545 // Direct access since this instruction cannot deoptimize, and the deopt-id |
| 5532 // was inherited from another instruction that could deoptimize. | 5546 // was inherited from another instruction that could deoptimize. |
| 5533 return GetDeoptId(); | 5547 return GetDeoptId(); |
| 5534 } | 5548 } |
| 5535 | 5549 |
| 5536 DECLARE_INSTRUCTION(Float32x4Splat) | 5550 DECLARE_INSTRUCTION(Float32x4Splat) |
| 5537 virtual CompileType ComputeType() const; | 5551 virtual CompileType ComputeType() const; |
| 5538 | 5552 |
| 5539 virtual bool AttributesEqual(Instruction* other) const { return true; } | 5553 virtual bool AttributesEqual(Instruction* other) const { return true; } |
| 5540 | 5554 |
| 5555 PRINT_OPERANDS_TO_SUPPORT |
| 5556 |
| 5541 private: | 5557 private: |
| 5542 DISALLOW_COPY_AND_ASSIGN(Float32x4SplatInstr); | 5558 DISALLOW_COPY_AND_ASSIGN(Float32x4SplatInstr); |
| 5543 }; | 5559 }; |
| 5544 | 5560 |
| 5545 | 5561 |
| 5546 // TODO(vegorov) replace with UnboxedConstantInstr. | 5562 // TODO(vegorov) replace with UnboxedConstantInstr. |
| 5547 class Float32x4ZeroInstr : public TemplateDefinition<0, NoThrow, Pure> { | 5563 class Float32x4ZeroInstr : public TemplateDefinition<0, NoThrow, Pure> { |
| 5548 public: | 5564 public: |
| 5549 Float32x4ZeroInstr() { } | 5565 Float32x4ZeroInstr() { } |
| 5550 | 5566 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 5573 : TemplateDefinition(deopt_id), op_kind_(op_kind) { | 5589 : TemplateDefinition(deopt_id), op_kind_(op_kind) { |
| 5574 SetInputAt(0, left); | 5590 SetInputAt(0, left); |
| 5575 SetInputAt(1, right); | 5591 SetInputAt(1, right); |
| 5576 } | 5592 } |
| 5577 | 5593 |
| 5578 Value* left() const { return inputs_[0]; } | 5594 Value* left() const { return inputs_[0]; } |
| 5579 Value* right() const { return inputs_[1]; } | 5595 Value* right() const { return inputs_[1]; } |
| 5580 | 5596 |
| 5581 MethodRecognizer::Kind op_kind() const { return op_kind_; } | 5597 MethodRecognizer::Kind op_kind() const { return op_kind_; } |
| 5582 | 5598 |
| 5583 virtual void PrintOperandsTo(BufferFormatter* f) const; | |
| 5584 | |
| 5585 virtual bool CanDeoptimize() const { return false; } | 5599 virtual bool CanDeoptimize() const { return false; } |
| 5586 | 5600 |
| 5587 virtual Representation representation() const { | 5601 virtual Representation representation() const { |
| 5588 return kUnboxedInt32x4; | 5602 return kUnboxedInt32x4; |
| 5589 } | 5603 } |
| 5590 | 5604 |
| 5591 virtual Representation RequiredInputRepresentation(intptr_t idx) const { | 5605 virtual Representation RequiredInputRepresentation(intptr_t idx) const { |
| 5592 ASSERT((idx == 0) || (idx == 1)); | 5606 ASSERT((idx == 0) || (idx == 1)); |
| 5593 return kUnboxedFloat32x4; | 5607 return kUnboxedFloat32x4; |
| 5594 } | 5608 } |
| 5595 | 5609 |
| 5596 virtual intptr_t DeoptimizationTarget() const { | 5610 virtual intptr_t DeoptimizationTarget() const { |
| 5597 // Direct access since this instruction cannot deoptimize, and the deopt-id | 5611 // Direct access since this instruction cannot deoptimize, and the deopt-id |
| 5598 // was inherited from another instruction that could deoptimize. | 5612 // was inherited from another instruction that could deoptimize. |
| 5599 return GetDeoptId(); | 5613 return GetDeoptId(); |
| 5600 } | 5614 } |
| 5601 | 5615 |
| 5602 DECLARE_INSTRUCTION(Float32x4Comparison) | 5616 DECLARE_INSTRUCTION(Float32x4Comparison) |
| 5603 virtual CompileType ComputeType() const; | 5617 virtual CompileType ComputeType() const; |
| 5604 | 5618 |
| 5605 virtual bool AttributesEqual(Instruction* other) const { | 5619 virtual bool AttributesEqual(Instruction* other) const { |
| 5606 return op_kind() == other->AsFloat32x4Comparison()->op_kind(); | 5620 return op_kind() == other->AsFloat32x4Comparison()->op_kind(); |
| 5607 } | 5621 } |
| 5608 | 5622 |
| 5623 PRINT_OPERANDS_TO_SUPPORT |
| 5624 |
| 5609 private: | 5625 private: |
| 5610 const MethodRecognizer::Kind op_kind_; | 5626 const MethodRecognizer::Kind op_kind_; |
| 5611 | 5627 |
| 5612 DISALLOW_COPY_AND_ASSIGN(Float32x4ComparisonInstr); | 5628 DISALLOW_COPY_AND_ASSIGN(Float32x4ComparisonInstr); |
| 5613 }; | 5629 }; |
| 5614 | 5630 |
| 5615 | 5631 |
| 5616 class Float32x4MinMaxInstr : public TemplateDefinition<2, NoThrow, Pure> { | 5632 class Float32x4MinMaxInstr : public TemplateDefinition<2, NoThrow, Pure> { |
| 5617 public: | 5633 public: |
| 5618 Float32x4MinMaxInstr(MethodRecognizer::Kind op_kind, | 5634 Float32x4MinMaxInstr(MethodRecognizer::Kind op_kind, |
| 5619 Value* left, | 5635 Value* left, |
| 5620 Value* right, | 5636 Value* right, |
| 5621 intptr_t deopt_id) | 5637 intptr_t deopt_id) |
| 5622 : TemplateDefinition(deopt_id), op_kind_(op_kind) { | 5638 : TemplateDefinition(deopt_id), op_kind_(op_kind) { |
| 5623 SetInputAt(0, left); | 5639 SetInputAt(0, left); |
| 5624 SetInputAt(1, right); | 5640 SetInputAt(1, right); |
| 5625 } | 5641 } |
| 5626 | 5642 |
| 5627 Value* left() const { return inputs_[0]; } | 5643 Value* left() const { return inputs_[0]; } |
| 5628 Value* right() const { return inputs_[1]; } | 5644 Value* right() const { return inputs_[1]; } |
| 5629 | 5645 |
| 5630 MethodRecognizer::Kind op_kind() const { return op_kind_; } | 5646 MethodRecognizer::Kind op_kind() const { return op_kind_; } |
| 5631 | 5647 |
| 5632 virtual void PrintOperandsTo(BufferFormatter* f) const; | |
| 5633 | |
| 5634 virtual bool CanDeoptimize() const { return false; } | 5648 virtual bool CanDeoptimize() const { return false; } |
| 5635 | 5649 |
| 5636 virtual Representation representation() const { | 5650 virtual Representation representation() const { |
| 5637 return kUnboxedFloat32x4; | 5651 return kUnboxedFloat32x4; |
| 5638 } | 5652 } |
| 5639 | 5653 |
| 5640 virtual Representation RequiredInputRepresentation(intptr_t idx) const { | 5654 virtual Representation RequiredInputRepresentation(intptr_t idx) const { |
| 5641 ASSERT((idx == 0) || (idx == 1)); | 5655 ASSERT((idx == 0) || (idx == 1)); |
| 5642 return kUnboxedFloat32x4; | 5656 return kUnboxedFloat32x4; |
| 5643 } | 5657 } |
| 5644 | 5658 |
| 5645 virtual intptr_t DeoptimizationTarget() const { | 5659 virtual intptr_t DeoptimizationTarget() const { |
| 5646 // Direct access since this instruction cannot deoptimize, and the deopt-id | 5660 // Direct access since this instruction cannot deoptimize, and the deopt-id |
| 5647 // was inherited from another instruction that could deoptimize. | 5661 // was inherited from another instruction that could deoptimize. |
| 5648 return GetDeoptId(); | 5662 return GetDeoptId(); |
| 5649 } | 5663 } |
| 5650 | 5664 |
| 5651 DECLARE_INSTRUCTION(Float32x4MinMax) | 5665 DECLARE_INSTRUCTION(Float32x4MinMax) |
| 5652 virtual CompileType ComputeType() const; | 5666 virtual CompileType ComputeType() const; |
| 5653 | 5667 |
| 5654 virtual bool AttributesEqual(Instruction* other) const { | 5668 virtual bool AttributesEqual(Instruction* other) const { |
| 5655 return op_kind() == other->AsFloat32x4MinMax()->op_kind(); | 5669 return op_kind() == other->AsFloat32x4MinMax()->op_kind(); |
| 5656 } | 5670 } |
| 5657 | 5671 |
| 5672 PRINT_OPERANDS_TO_SUPPORT |
| 5673 |
| 5658 private: | 5674 private: |
| 5659 const MethodRecognizer::Kind op_kind_; | 5675 const MethodRecognizer::Kind op_kind_; |
| 5660 | 5676 |
| 5661 DISALLOW_COPY_AND_ASSIGN(Float32x4MinMaxInstr); | 5677 DISALLOW_COPY_AND_ASSIGN(Float32x4MinMaxInstr); |
| 5662 }; | 5678 }; |
| 5663 | 5679 |
| 5664 | 5680 |
| 5665 class Float32x4ScaleInstr : public TemplateDefinition<2, NoThrow, Pure> { | 5681 class Float32x4ScaleInstr : public TemplateDefinition<2, NoThrow, Pure> { |
| 5666 public: | 5682 public: |
| 5667 Float32x4ScaleInstr(MethodRecognizer::Kind op_kind, | 5683 Float32x4ScaleInstr(MethodRecognizer::Kind op_kind, |
| 5668 Value* left, | 5684 Value* left, |
| 5669 Value* right, | 5685 Value* right, |
| 5670 intptr_t deopt_id) | 5686 intptr_t deopt_id) |
| 5671 : TemplateDefinition(deopt_id), op_kind_(op_kind) { | 5687 : TemplateDefinition(deopt_id), op_kind_(op_kind) { |
| 5672 SetInputAt(0, left); | 5688 SetInputAt(0, left); |
| 5673 SetInputAt(1, right); | 5689 SetInputAt(1, right); |
| 5674 } | 5690 } |
| 5675 | 5691 |
| 5676 Value* left() const { return inputs_[0]; } | 5692 Value* left() const { return inputs_[0]; } |
| 5677 Value* right() const { return inputs_[1]; } | 5693 Value* right() const { return inputs_[1]; } |
| 5678 | 5694 |
| 5679 MethodRecognizer::Kind op_kind() const { return op_kind_; } | 5695 MethodRecognizer::Kind op_kind() const { return op_kind_; } |
| 5680 | 5696 |
| 5681 virtual void PrintOperandsTo(BufferFormatter* f) const; | |
| 5682 | |
| 5683 virtual bool CanDeoptimize() const { return false; } | 5697 virtual bool CanDeoptimize() const { return false; } |
| 5684 | 5698 |
| 5685 virtual Representation representation() const { | 5699 virtual Representation representation() const { |
| 5686 return kUnboxedFloat32x4; | 5700 return kUnboxedFloat32x4; |
| 5687 } | 5701 } |
| 5688 | 5702 |
| 5689 virtual Representation RequiredInputRepresentation(intptr_t idx) const { | 5703 virtual Representation RequiredInputRepresentation(intptr_t idx) const { |
| 5690 ASSERT((idx == 0) || (idx == 1)); | 5704 ASSERT((idx == 0) || (idx == 1)); |
| 5691 if (idx == 0) { | 5705 if (idx == 0) { |
| 5692 return kUnboxedDouble; | 5706 return kUnboxedDouble; |
| 5693 } | 5707 } |
| 5694 return kUnboxedFloat32x4; | 5708 return kUnboxedFloat32x4; |
| 5695 } | 5709 } |
| 5696 | 5710 |
| 5697 virtual intptr_t DeoptimizationTarget() const { | 5711 virtual intptr_t DeoptimizationTarget() const { |
| 5698 // Direct access since this instruction cannot deoptimize, and the deopt-id | 5712 // Direct access since this instruction cannot deoptimize, and the deopt-id |
| 5699 // was inherited from another instruction that could deoptimize. | 5713 // was inherited from another instruction that could deoptimize. |
| 5700 return GetDeoptId(); | 5714 return GetDeoptId(); |
| 5701 } | 5715 } |
| 5702 | 5716 |
| 5703 DECLARE_INSTRUCTION(Float32x4Scale) | 5717 DECLARE_INSTRUCTION(Float32x4Scale) |
| 5704 virtual CompileType ComputeType() const; | 5718 virtual CompileType ComputeType() const; |
| 5705 | 5719 |
| 5706 virtual bool AttributesEqual(Instruction* other) const { | 5720 virtual bool AttributesEqual(Instruction* other) const { |
| 5707 return op_kind() == other->AsFloat32x4Scale()->op_kind(); | 5721 return op_kind() == other->AsFloat32x4Scale()->op_kind(); |
| 5708 } | 5722 } |
| 5709 | 5723 |
| 5724 PRINT_OPERANDS_TO_SUPPORT |
| 5725 |
| 5710 private: | 5726 private: |
| 5711 const MethodRecognizer::Kind op_kind_; | 5727 const MethodRecognizer::Kind op_kind_; |
| 5712 | 5728 |
| 5713 DISALLOW_COPY_AND_ASSIGN(Float32x4ScaleInstr); | 5729 DISALLOW_COPY_AND_ASSIGN(Float32x4ScaleInstr); |
| 5714 }; | 5730 }; |
| 5715 | 5731 |
| 5716 | 5732 |
| 5717 class Float32x4SqrtInstr : public TemplateDefinition<1, NoThrow, Pure> { | 5733 class Float32x4SqrtInstr : public TemplateDefinition<1, NoThrow, Pure> { |
| 5718 public: | 5734 public: |
| 5719 Float32x4SqrtInstr(MethodRecognizer::Kind op_kind, | 5735 Float32x4SqrtInstr(MethodRecognizer::Kind op_kind, |
| 5720 Value* left, | 5736 Value* left, |
| 5721 intptr_t deopt_id) | 5737 intptr_t deopt_id) |
| 5722 : TemplateDefinition(deopt_id), op_kind_(op_kind) { | 5738 : TemplateDefinition(deopt_id), op_kind_(op_kind) { |
| 5723 SetInputAt(0, left); | 5739 SetInputAt(0, left); |
| 5724 } | 5740 } |
| 5725 | 5741 |
| 5726 Value* left() const { return inputs_[0]; } | 5742 Value* left() const { return inputs_[0]; } |
| 5727 | 5743 |
| 5728 MethodRecognizer::Kind op_kind() const { return op_kind_; } | 5744 MethodRecognizer::Kind op_kind() const { return op_kind_; } |
| 5729 | 5745 |
| 5730 virtual void PrintOperandsTo(BufferFormatter* f) const; | |
| 5731 | |
| 5732 virtual bool CanDeoptimize() const { return false; } | 5746 virtual bool CanDeoptimize() const { return false; } |
| 5733 | 5747 |
| 5734 virtual Representation representation() const { | 5748 virtual Representation representation() const { |
| 5735 return kUnboxedFloat32x4; | 5749 return kUnboxedFloat32x4; |
| 5736 } | 5750 } |
| 5737 | 5751 |
| 5738 virtual Representation RequiredInputRepresentation(intptr_t idx) const { | 5752 virtual Representation RequiredInputRepresentation(intptr_t idx) const { |
| 5739 ASSERT(idx == 0); | 5753 ASSERT(idx == 0); |
| 5740 return kUnboxedFloat32x4; | 5754 return kUnboxedFloat32x4; |
| 5741 } | 5755 } |
| 5742 | 5756 |
| 5743 virtual intptr_t DeoptimizationTarget() const { | 5757 virtual intptr_t DeoptimizationTarget() const { |
| 5744 // Direct access since this instruction cannot deoptimize, and the deopt-id | 5758 // Direct access since this instruction cannot deoptimize, and the deopt-id |
| 5745 // was inherited from another instruction that could deoptimize. | 5759 // was inherited from another instruction that could deoptimize. |
| 5746 return GetDeoptId(); | 5760 return GetDeoptId(); |
| 5747 } | 5761 } |
| 5748 | 5762 |
| 5749 DECLARE_INSTRUCTION(Float32x4Sqrt) | 5763 DECLARE_INSTRUCTION(Float32x4Sqrt) |
| 5750 virtual CompileType ComputeType() const; | 5764 virtual CompileType ComputeType() const; |
| 5751 | 5765 |
| 5752 virtual bool AttributesEqual(Instruction* other) const { | 5766 virtual bool AttributesEqual(Instruction* other) const { |
| 5753 return op_kind() == other->AsFloat32x4Sqrt()->op_kind(); | 5767 return op_kind() == other->AsFloat32x4Sqrt()->op_kind(); |
| 5754 } | 5768 } |
| 5755 | 5769 |
| 5770 PRINT_OPERANDS_TO_SUPPORT |
| 5771 |
| 5756 private: | 5772 private: |
| 5757 const MethodRecognizer::Kind op_kind_; | 5773 const MethodRecognizer::Kind op_kind_; |
| 5758 | 5774 |
| 5759 DISALLOW_COPY_AND_ASSIGN(Float32x4SqrtInstr); | 5775 DISALLOW_COPY_AND_ASSIGN(Float32x4SqrtInstr); |
| 5760 }; | 5776 }; |
| 5761 | 5777 |
| 5762 | 5778 |
| 5763 // TODO(vegorov) rename to Unary to match naming convention for arithmetic. | 5779 // TODO(vegorov) rename to Unary to match naming convention for arithmetic. |
| 5764 class Float32x4ZeroArgInstr : public TemplateDefinition<1, NoThrow, Pure> { | 5780 class Float32x4ZeroArgInstr : public TemplateDefinition<1, NoThrow, Pure> { |
| 5765 public: | 5781 public: |
| 5766 Float32x4ZeroArgInstr(MethodRecognizer::Kind op_kind, | 5782 Float32x4ZeroArgInstr(MethodRecognizer::Kind op_kind, |
| 5767 Value* left, | 5783 Value* left, |
| 5768 intptr_t deopt_id) | 5784 intptr_t deopt_id) |
| 5769 : TemplateDefinition(deopt_id), | 5785 : TemplateDefinition(deopt_id), |
| 5770 op_kind_(op_kind) { | 5786 op_kind_(op_kind) { |
| 5771 SetInputAt(0, left); | 5787 SetInputAt(0, left); |
| 5772 } | 5788 } |
| 5773 | 5789 |
| 5774 Value* left() const { return inputs_[0]; } | 5790 Value* left() const { return inputs_[0]; } |
| 5775 | 5791 |
| 5776 MethodRecognizer::Kind op_kind() const { return op_kind_; } | 5792 MethodRecognizer::Kind op_kind() const { return op_kind_; } |
| 5777 | 5793 |
| 5778 virtual void PrintOperandsTo(BufferFormatter* f) const; | |
| 5779 | |
| 5780 virtual bool CanDeoptimize() const { return false; } | 5794 virtual bool CanDeoptimize() const { return false; } |
| 5781 | 5795 |
| 5782 virtual Representation representation() const { | 5796 virtual Representation representation() const { |
| 5783 return kUnboxedFloat32x4; | 5797 return kUnboxedFloat32x4; |
| 5784 } | 5798 } |
| 5785 | 5799 |
| 5786 virtual Representation RequiredInputRepresentation(intptr_t idx) const { | 5800 virtual Representation RequiredInputRepresentation(intptr_t idx) const { |
| 5787 ASSERT(idx == 0); | 5801 ASSERT(idx == 0); |
| 5788 return kUnboxedFloat32x4; | 5802 return kUnboxedFloat32x4; |
| 5789 } | 5803 } |
| 5790 | 5804 |
| 5791 virtual intptr_t DeoptimizationTarget() const { | 5805 virtual intptr_t DeoptimizationTarget() const { |
| 5792 // Direct access since this instruction cannot deoptimize, and the deopt-id | 5806 // Direct access since this instruction cannot deoptimize, and the deopt-id |
| 5793 // was inherited from another instruction that could deoptimize. | 5807 // was inherited from another instruction that could deoptimize. |
| 5794 return GetDeoptId(); | 5808 return GetDeoptId(); |
| 5795 } | 5809 } |
| 5796 | 5810 |
| 5797 DECLARE_INSTRUCTION(Float32x4ZeroArg) | 5811 DECLARE_INSTRUCTION(Float32x4ZeroArg) |
| 5798 virtual CompileType ComputeType() const; | 5812 virtual CompileType ComputeType() const; |
| 5799 | 5813 |
| 5800 virtual bool AttributesEqual(Instruction* other) const { | 5814 virtual bool AttributesEqual(Instruction* other) const { |
| 5801 return op_kind() == other->AsFloat32x4ZeroArg()->op_kind(); | 5815 return op_kind() == other->AsFloat32x4ZeroArg()->op_kind(); |
| 5802 } | 5816 } |
| 5803 | 5817 |
| 5818 PRINT_OPERANDS_TO_SUPPORT |
| 5819 |
| 5804 private: | 5820 private: |
| 5805 const MethodRecognizer::Kind op_kind_; | 5821 const MethodRecognizer::Kind op_kind_; |
| 5806 | 5822 |
| 5807 DISALLOW_COPY_AND_ASSIGN(Float32x4ZeroArgInstr); | 5823 DISALLOW_COPY_AND_ASSIGN(Float32x4ZeroArgInstr); |
| 5808 }; | 5824 }; |
| 5809 | 5825 |
| 5810 | 5826 |
| 5811 class Float32x4ClampInstr : public TemplateDefinition<3, NoThrow, Pure> { | 5827 class Float32x4ClampInstr : public TemplateDefinition<3, NoThrow, Pure> { |
| 5812 public: | 5828 public: |
| 5813 Float32x4ClampInstr(Value* left, | 5829 Float32x4ClampInstr(Value* left, |
| 5814 Value* lower, | 5830 Value* lower, |
| 5815 Value* upper, | 5831 Value* upper, |
| 5816 intptr_t deopt_id) | 5832 intptr_t deopt_id) |
| 5817 : TemplateDefinition(deopt_id) { | 5833 : TemplateDefinition(deopt_id) { |
| 5818 SetInputAt(0, left); | 5834 SetInputAt(0, left); |
| 5819 SetInputAt(1, lower); | 5835 SetInputAt(1, lower); |
| 5820 SetInputAt(2, upper); | 5836 SetInputAt(2, upper); |
| 5821 } | 5837 } |
| 5822 | 5838 |
| 5823 Value* left() const { return inputs_[0]; } | 5839 Value* left() const { return inputs_[0]; } |
| 5824 Value* lower() const { return inputs_[1]; } | 5840 Value* lower() const { return inputs_[1]; } |
| 5825 Value* upper() const { return inputs_[2]; } | 5841 Value* upper() const { return inputs_[2]; } |
| 5826 | 5842 |
| 5827 virtual void PrintOperandsTo(BufferFormatter* f) const; | |
| 5828 | |
| 5829 virtual bool CanDeoptimize() const { return false; } | 5843 virtual bool CanDeoptimize() const { return false; } |
| 5830 | 5844 |
| 5831 virtual Representation representation() const { | 5845 virtual Representation representation() const { |
| 5832 return kUnboxedFloat32x4; | 5846 return kUnboxedFloat32x4; |
| 5833 } | 5847 } |
| 5834 | 5848 |
| 5835 virtual Representation RequiredInputRepresentation(intptr_t idx) const { | 5849 virtual Representation RequiredInputRepresentation(intptr_t idx) const { |
| 5836 ASSERT((idx == 0) || (idx == 1) || (idx == 2)); | 5850 ASSERT((idx == 0) || (idx == 1) || (idx == 2)); |
| 5837 return kUnboxedFloat32x4; | 5851 return kUnboxedFloat32x4; |
| 5838 } | 5852 } |
| 5839 | 5853 |
| 5840 virtual intptr_t DeoptimizationTarget() const { | 5854 virtual intptr_t DeoptimizationTarget() const { |
| 5841 // Direct access since this instruction cannot deoptimize, and the deopt-id | 5855 // Direct access since this instruction cannot deoptimize, and the deopt-id |
| 5842 // was inherited from another instruction that could deoptimize. | 5856 // was inherited from another instruction that could deoptimize. |
| 5843 return GetDeoptId(); | 5857 return GetDeoptId(); |
| 5844 } | 5858 } |
| 5845 | 5859 |
| 5846 DECLARE_INSTRUCTION(Float32x4Clamp) | 5860 DECLARE_INSTRUCTION(Float32x4Clamp) |
| 5847 virtual CompileType ComputeType() const; | 5861 virtual CompileType ComputeType() const; |
| 5848 | 5862 |
| 5849 virtual bool AttributesEqual(Instruction* other) const { return true; } | 5863 virtual bool AttributesEqual(Instruction* other) const { return true; } |
| 5850 | 5864 |
| 5865 PRINT_OPERANDS_TO_SUPPORT |
| 5866 |
| 5851 private: | 5867 private: |
| 5852 DISALLOW_COPY_AND_ASSIGN(Float32x4ClampInstr); | 5868 DISALLOW_COPY_AND_ASSIGN(Float32x4ClampInstr); |
| 5853 }; | 5869 }; |
| 5854 | 5870 |
| 5855 | 5871 |
| 5856 class Float32x4WithInstr : public TemplateDefinition<2, NoThrow, Pure> { | 5872 class Float32x4WithInstr : public TemplateDefinition<2, NoThrow, Pure> { |
| 5857 public: | 5873 public: |
| 5858 Float32x4WithInstr(MethodRecognizer::Kind op_kind, | 5874 Float32x4WithInstr(MethodRecognizer::Kind op_kind, |
| 5859 Value* left, | 5875 Value* left, |
| 5860 Value* replacement, | 5876 Value* replacement, |
| 5861 intptr_t deopt_id) | 5877 intptr_t deopt_id) |
| 5862 : TemplateDefinition(deopt_id), | 5878 : TemplateDefinition(deopt_id), |
| 5863 op_kind_(op_kind) { | 5879 op_kind_(op_kind) { |
| 5864 SetInputAt(0, replacement); | 5880 SetInputAt(0, replacement); |
| 5865 SetInputAt(1, left); | 5881 SetInputAt(1, left); |
| 5866 } | 5882 } |
| 5867 | 5883 |
| 5868 Value* left() const { return inputs_[1]; } | 5884 Value* left() const { return inputs_[1]; } |
| 5869 Value* replacement() const { return inputs_[0]; } | 5885 Value* replacement() const { return inputs_[0]; } |
| 5870 | 5886 |
| 5871 MethodRecognizer::Kind op_kind() const { return op_kind_; } | 5887 MethodRecognizer::Kind op_kind() const { return op_kind_; } |
| 5872 | 5888 |
| 5873 virtual void PrintOperandsTo(BufferFormatter* f) const; | |
| 5874 | |
| 5875 virtual bool CanDeoptimize() const { return false; } | 5889 virtual bool CanDeoptimize() const { return false; } |
| 5876 | 5890 |
| 5877 virtual Representation representation() const { | 5891 virtual Representation representation() const { |
| 5878 return kUnboxedFloat32x4; | 5892 return kUnboxedFloat32x4; |
| 5879 } | 5893 } |
| 5880 | 5894 |
| 5881 virtual Representation RequiredInputRepresentation(intptr_t idx) const { | 5895 virtual Representation RequiredInputRepresentation(intptr_t idx) const { |
| 5882 ASSERT((idx == 0) || (idx == 1)); | 5896 ASSERT((idx == 0) || (idx == 1)); |
| 5883 if (idx == 0) { | 5897 if (idx == 0) { |
| 5884 return kUnboxedDouble; | 5898 return kUnboxedDouble; |
| 5885 } | 5899 } |
| 5886 return kUnboxedFloat32x4; | 5900 return kUnboxedFloat32x4; |
| 5887 } | 5901 } |
| 5888 | 5902 |
| 5889 virtual intptr_t DeoptimizationTarget() const { | 5903 virtual intptr_t DeoptimizationTarget() const { |
| 5890 // Direct access since this instruction cannot deoptimize, and the deopt-id | 5904 // Direct access since this instruction cannot deoptimize, and the deopt-id |
| 5891 // was inherited from another instruction that could deoptimize. | 5905 // was inherited from another instruction that could deoptimize. |
| 5892 return GetDeoptId(); | 5906 return GetDeoptId(); |
| 5893 } | 5907 } |
| 5894 | 5908 |
| 5895 DECLARE_INSTRUCTION(Float32x4With) | 5909 DECLARE_INSTRUCTION(Float32x4With) |
| 5896 virtual CompileType ComputeType() const; | 5910 virtual CompileType ComputeType() const; |
| 5897 | 5911 |
| 5898 virtual bool AttributesEqual(Instruction* other) const { | 5912 virtual bool AttributesEqual(Instruction* other) const { |
| 5899 return op_kind() == other->AsFloat32x4With()->op_kind(); | 5913 return op_kind() == other->AsFloat32x4With()->op_kind(); |
| 5900 } | 5914 } |
| 5901 | 5915 |
| 5916 PRINT_OPERANDS_TO_SUPPORT |
| 5917 |
| 5902 private: | 5918 private: |
| 5903 const MethodRecognizer::Kind op_kind_; | 5919 const MethodRecognizer::Kind op_kind_; |
| 5904 | 5920 |
| 5905 DISALLOW_COPY_AND_ASSIGN(Float32x4WithInstr); | 5921 DISALLOW_COPY_AND_ASSIGN(Float32x4WithInstr); |
| 5906 }; | 5922 }; |
| 5907 | 5923 |
| 5908 | 5924 |
| 5909 class Simd64x2ShuffleInstr : public TemplateDefinition<1, NoThrow, Pure> { | 5925 class Simd64x2ShuffleInstr : public TemplateDefinition<1, NoThrow, Pure> { |
| 5910 public: | 5926 public: |
| 5911 Simd64x2ShuffleInstr(MethodRecognizer::Kind op_kind, | 5927 Simd64x2ShuffleInstr(MethodRecognizer::Kind op_kind, |
| 5912 Value* value, | 5928 Value* value, |
| 5913 intptr_t mask, | 5929 intptr_t mask, |
| 5914 intptr_t deopt_id) | 5930 intptr_t deopt_id) |
| 5915 : TemplateDefinition(deopt_id), op_kind_(op_kind), mask_(mask) { | 5931 : TemplateDefinition(deopt_id), op_kind_(op_kind), mask_(mask) { |
| 5916 SetInputAt(0, value); | 5932 SetInputAt(0, value); |
| 5917 } | 5933 } |
| 5918 | 5934 |
| 5919 Value* value() const { return inputs_[0]; } | 5935 Value* value() const { return inputs_[0]; } |
| 5920 | 5936 |
| 5921 MethodRecognizer::Kind op_kind() const { return op_kind_; } | 5937 MethodRecognizer::Kind op_kind() const { return op_kind_; } |
| 5922 | 5938 |
| 5923 intptr_t mask() const { return mask_; } | 5939 intptr_t mask() const { return mask_; } |
| 5924 | 5940 |
| 5925 virtual void PrintOperandsTo(BufferFormatter* f) const; | |
| 5926 | |
| 5927 virtual bool CanDeoptimize() const { return false; } | 5941 virtual bool CanDeoptimize() const { return false; } |
| 5928 | 5942 |
| 5929 virtual Representation representation() const { | 5943 virtual Representation representation() const { |
| 5930 if ((op_kind_ == MethodRecognizer::kFloat64x2GetX) || | 5944 if ((op_kind_ == MethodRecognizer::kFloat64x2GetX) || |
| 5931 (op_kind_ == MethodRecognizer::kFloat64x2GetY)) { | 5945 (op_kind_ == MethodRecognizer::kFloat64x2GetY)) { |
| 5932 return kUnboxedDouble; | 5946 return kUnboxedDouble; |
| 5933 } | 5947 } |
| 5934 UNIMPLEMENTED(); | 5948 UNIMPLEMENTED(); |
| 5935 return kUnboxedDouble; | 5949 return kUnboxedDouble; |
| 5936 } | 5950 } |
| (...skipping 15 matching lines...) Expand all Loading... |
| 5952 } | 5966 } |
| 5953 | 5967 |
| 5954 DECLARE_INSTRUCTION(Simd64x2Shuffle) | 5968 DECLARE_INSTRUCTION(Simd64x2Shuffle) |
| 5955 virtual CompileType ComputeType() const; | 5969 virtual CompileType ComputeType() const; |
| 5956 | 5970 |
| 5957 virtual bool AttributesEqual(Instruction* other) const { | 5971 virtual bool AttributesEqual(Instruction* other) const { |
| 5958 return (op_kind() == other->AsSimd64x2Shuffle()->op_kind()) && | 5972 return (op_kind() == other->AsSimd64x2Shuffle()->op_kind()) && |
| 5959 (mask() == other->AsSimd64x2Shuffle()->mask()); | 5973 (mask() == other->AsSimd64x2Shuffle()->mask()); |
| 5960 } | 5974 } |
| 5961 | 5975 |
| 5976 PRINT_OPERANDS_TO_SUPPORT |
| 5977 |
| 5962 private: | 5978 private: |
| 5963 const MethodRecognizer::Kind op_kind_; | 5979 const MethodRecognizer::Kind op_kind_; |
| 5964 const intptr_t mask_; | 5980 const intptr_t mask_; |
| 5965 | 5981 |
| 5966 DISALLOW_COPY_AND_ASSIGN(Simd64x2ShuffleInstr); | 5982 DISALLOW_COPY_AND_ASSIGN(Simd64x2ShuffleInstr); |
| 5967 }; | 5983 }; |
| 5968 | 5984 |
| 5969 | 5985 |
| 5970 class Float32x4ToInt32x4Instr : public TemplateDefinition<1, NoThrow, Pure> { | 5986 class Float32x4ToInt32x4Instr : public TemplateDefinition<1, NoThrow, Pure> { |
| 5971 public: | 5987 public: |
| 5972 Float32x4ToInt32x4Instr(Value* left, intptr_t deopt_id) | 5988 Float32x4ToInt32x4Instr(Value* left, intptr_t deopt_id) |
| 5973 : TemplateDefinition(deopt_id) { | 5989 : TemplateDefinition(deopt_id) { |
| 5974 SetInputAt(0, left); | 5990 SetInputAt(0, left); |
| 5975 } | 5991 } |
| 5976 | 5992 |
| 5977 Value* left() const { return inputs_[0]; } | 5993 Value* left() const { return inputs_[0]; } |
| 5978 | 5994 |
| 5979 virtual void PrintOperandsTo(BufferFormatter* f) const; | |
| 5980 | |
| 5981 virtual bool CanDeoptimize() const { return false; } | 5995 virtual bool CanDeoptimize() const { return false; } |
| 5982 | 5996 |
| 5983 virtual Representation representation() const { | 5997 virtual Representation representation() const { |
| 5984 return kUnboxedInt32x4; | 5998 return kUnboxedInt32x4; |
| 5985 } | 5999 } |
| 5986 | 6000 |
| 5987 virtual Representation RequiredInputRepresentation(intptr_t idx) const { | 6001 virtual Representation RequiredInputRepresentation(intptr_t idx) const { |
| 5988 ASSERT(idx == 0); | 6002 ASSERT(idx == 0); |
| 5989 return kUnboxedFloat32x4; | 6003 return kUnboxedFloat32x4; |
| 5990 } | 6004 } |
| 5991 | 6005 |
| 5992 virtual intptr_t DeoptimizationTarget() const { | 6006 virtual intptr_t DeoptimizationTarget() const { |
| 5993 // Direct access since this instruction cannot deoptimize, and the deopt-id | 6007 // Direct access since this instruction cannot deoptimize, and the deopt-id |
| 5994 // was inherited from another instruction that could deoptimize. | 6008 // was inherited from another instruction that could deoptimize. |
| 5995 return GetDeoptId(); | 6009 return GetDeoptId(); |
| 5996 } | 6010 } |
| 5997 | 6011 |
| 5998 DECLARE_INSTRUCTION(Float32x4ToInt32x4) | 6012 DECLARE_INSTRUCTION(Float32x4ToInt32x4) |
| 5999 virtual CompileType ComputeType() const; | 6013 virtual CompileType ComputeType() const; |
| 6000 | 6014 |
| 6001 virtual bool AttributesEqual(Instruction* other) const { return true; } | 6015 virtual bool AttributesEqual(Instruction* other) const { return true; } |
| 6002 | 6016 |
| 6017 PRINT_OPERANDS_TO_SUPPORT |
| 6018 |
| 6003 private: | 6019 private: |
| 6004 DISALLOW_COPY_AND_ASSIGN(Float32x4ToInt32x4Instr); | 6020 DISALLOW_COPY_AND_ASSIGN(Float32x4ToInt32x4Instr); |
| 6005 }; | 6021 }; |
| 6006 | 6022 |
| 6007 | 6023 |
| 6008 class Float32x4ToFloat64x2Instr : public TemplateDefinition<1, NoThrow, Pure> { | 6024 class Float32x4ToFloat64x2Instr : public TemplateDefinition<1, NoThrow, Pure> { |
| 6009 public: | 6025 public: |
| 6010 Float32x4ToFloat64x2Instr(Value* left, intptr_t deopt_id) | 6026 Float32x4ToFloat64x2Instr(Value* left, intptr_t deopt_id) |
| 6011 : TemplateDefinition(deopt_id) { | 6027 : TemplateDefinition(deopt_id) { |
| 6012 SetInputAt(0, left); | 6028 SetInputAt(0, left); |
| 6013 } | 6029 } |
| 6014 | 6030 |
| 6015 Value* left() const { return inputs_[0]; } | 6031 Value* left() const { return inputs_[0]; } |
| 6016 | 6032 |
| 6017 virtual void PrintOperandsTo(BufferFormatter* f) const; | |
| 6018 | |
| 6019 virtual bool CanDeoptimize() const { return false; } | 6033 virtual bool CanDeoptimize() const { return false; } |
| 6020 | 6034 |
| 6021 virtual Representation representation() const { | 6035 virtual Representation representation() const { |
| 6022 return kUnboxedFloat64x2; | 6036 return kUnboxedFloat64x2; |
| 6023 } | 6037 } |
| 6024 | 6038 |
| 6025 virtual Representation RequiredInputRepresentation(intptr_t idx) const { | 6039 virtual Representation RequiredInputRepresentation(intptr_t idx) const { |
| 6026 ASSERT(idx == 0); | 6040 ASSERT(idx == 0); |
| 6027 return kUnboxedFloat32x4; | 6041 return kUnboxedFloat32x4; |
| 6028 } | 6042 } |
| 6029 | 6043 |
| 6030 virtual intptr_t DeoptimizationTarget() const { | 6044 virtual intptr_t DeoptimizationTarget() const { |
| 6031 // Direct access since this instruction cannot deoptimize, and the deopt-id | 6045 // Direct access since this instruction cannot deoptimize, and the deopt-id |
| 6032 // was inherited from another instruction that could deoptimize. | 6046 // was inherited from another instruction that could deoptimize. |
| 6033 return GetDeoptId(); | 6047 return GetDeoptId(); |
| 6034 } | 6048 } |
| 6035 | 6049 |
| 6036 DECLARE_INSTRUCTION(Float32x4ToFloat64x2) | 6050 DECLARE_INSTRUCTION(Float32x4ToFloat64x2) |
| 6037 virtual CompileType ComputeType() const; | 6051 virtual CompileType ComputeType() const; |
| 6038 | 6052 |
| 6039 virtual bool AttributesEqual(Instruction* other) const { return true; } | 6053 virtual bool AttributesEqual(Instruction* other) const { return true; } |
| 6040 | 6054 |
| 6055 PRINT_OPERANDS_TO_SUPPORT |
| 6056 |
| 6041 private: | 6057 private: |
| 6042 DISALLOW_COPY_AND_ASSIGN(Float32x4ToFloat64x2Instr); | 6058 DISALLOW_COPY_AND_ASSIGN(Float32x4ToFloat64x2Instr); |
| 6043 }; | 6059 }; |
| 6044 | 6060 |
| 6045 | 6061 |
| 6046 class Float64x2ToFloat32x4Instr : public TemplateDefinition<1, NoThrow, Pure> { | 6062 class Float64x2ToFloat32x4Instr : public TemplateDefinition<1, NoThrow, Pure> { |
| 6047 public: | 6063 public: |
| 6048 Float64x2ToFloat32x4Instr(Value* left, intptr_t deopt_id) | 6064 Float64x2ToFloat32x4Instr(Value* left, intptr_t deopt_id) |
| 6049 : TemplateDefinition(deopt_id) { | 6065 : TemplateDefinition(deopt_id) { |
| 6050 SetInputAt(0, left); | 6066 SetInputAt(0, left); |
| 6051 } | 6067 } |
| 6052 | 6068 |
| 6053 Value* left() const { return inputs_[0]; } | 6069 Value* left() const { return inputs_[0]; } |
| 6054 | 6070 |
| 6055 virtual void PrintOperandsTo(BufferFormatter* f) const; | |
| 6056 | |
| 6057 virtual bool CanDeoptimize() const { return false; } | 6071 virtual bool CanDeoptimize() const { return false; } |
| 6058 | 6072 |
| 6059 virtual Representation representation() const { | 6073 virtual Representation representation() const { |
| 6060 return kUnboxedFloat32x4; | 6074 return kUnboxedFloat32x4; |
| 6061 } | 6075 } |
| 6062 | 6076 |
| 6063 virtual Representation RequiredInputRepresentation(intptr_t idx) const { | 6077 virtual Representation RequiredInputRepresentation(intptr_t idx) const { |
| 6064 ASSERT(idx == 0); | 6078 ASSERT(idx == 0); |
| 6065 return kUnboxedFloat64x2; | 6079 return kUnboxedFloat64x2; |
| 6066 } | 6080 } |
| 6067 | 6081 |
| 6068 virtual intptr_t DeoptimizationTarget() const { | 6082 virtual intptr_t DeoptimizationTarget() const { |
| 6069 // Direct access since this instruction cannot deoptimize, and the deopt-id | 6083 // Direct access since this instruction cannot deoptimize, and the deopt-id |
| 6070 // was inherited from another instruction that could deoptimize. | 6084 // was inherited from another instruction that could deoptimize. |
| 6071 return GetDeoptId(); | 6085 return GetDeoptId(); |
| 6072 } | 6086 } |
| 6073 | 6087 |
| 6074 DECLARE_INSTRUCTION(Float64x2ToFloat32x4) | 6088 DECLARE_INSTRUCTION(Float64x2ToFloat32x4) |
| 6075 virtual CompileType ComputeType() const; | 6089 virtual CompileType ComputeType() const; |
| 6076 | 6090 |
| 6077 virtual bool AttributesEqual(Instruction* other) const { return true; } | 6091 virtual bool AttributesEqual(Instruction* other) const { return true; } |
| 6078 | 6092 |
| 6093 PRINT_OPERANDS_TO_SUPPORT |
| 6094 |
| 6079 private: | 6095 private: |
| 6080 DISALLOW_COPY_AND_ASSIGN(Float64x2ToFloat32x4Instr); | 6096 DISALLOW_COPY_AND_ASSIGN(Float64x2ToFloat32x4Instr); |
| 6081 }; | 6097 }; |
| 6082 | 6098 |
| 6083 | 6099 |
| 6084 class Float64x2ConstructorInstr : public TemplateDefinition<2, NoThrow, Pure> { | 6100 class Float64x2ConstructorInstr : public TemplateDefinition<2, NoThrow, Pure> { |
| 6085 public: | 6101 public: |
| 6086 Float64x2ConstructorInstr(Value* value0, Value* value1, intptr_t deopt_id) | 6102 Float64x2ConstructorInstr(Value* value0, Value* value1, intptr_t deopt_id) |
| 6087 : TemplateDefinition(deopt_id) { | 6103 : TemplateDefinition(deopt_id) { |
| 6088 SetInputAt(0, value0); | 6104 SetInputAt(0, value0); |
| 6089 SetInputAt(1, value1); | 6105 SetInputAt(1, value1); |
| 6090 } | 6106 } |
| 6091 | 6107 |
| 6092 Value* value0() const { return inputs_[0]; } | 6108 Value* value0() const { return inputs_[0]; } |
| 6093 Value* value1() const { return inputs_[1]; } | 6109 Value* value1() const { return inputs_[1]; } |
| 6094 | 6110 |
| 6095 virtual void PrintOperandsTo(BufferFormatter* f) const; | |
| 6096 | |
| 6097 virtual bool CanDeoptimize() const { return false; } | 6111 virtual bool CanDeoptimize() const { return false; } |
| 6098 | 6112 |
| 6099 virtual Representation representation() const { | 6113 virtual Representation representation() const { |
| 6100 return kUnboxedFloat64x2; | 6114 return kUnboxedFloat64x2; |
| 6101 } | 6115 } |
| 6102 | 6116 |
| 6103 virtual Representation RequiredInputRepresentation(intptr_t idx) const { | 6117 virtual Representation RequiredInputRepresentation(intptr_t idx) const { |
| 6104 ASSERT(idx >= 0 && idx < 2); | 6118 ASSERT(idx >= 0 && idx < 2); |
| 6105 return kUnboxedDouble; | 6119 return kUnboxedDouble; |
| 6106 } | 6120 } |
| 6107 | 6121 |
| 6108 virtual intptr_t DeoptimizationTarget() const { | 6122 virtual intptr_t DeoptimizationTarget() const { |
| 6109 // Direct access since this instruction cannot deoptimize, and the deopt-id | 6123 // Direct access since this instruction cannot deoptimize, and the deopt-id |
| 6110 // was inherited from another instruction that could deoptimize. | 6124 // was inherited from another instruction that could deoptimize. |
| 6111 return GetDeoptId(); | 6125 return GetDeoptId(); |
| 6112 } | 6126 } |
| 6113 | 6127 |
| 6128 PRINT_OPERANDS_TO_SUPPORT |
| 6129 |
| 6114 DECLARE_INSTRUCTION(Float64x2Constructor) | 6130 DECLARE_INSTRUCTION(Float64x2Constructor) |
| 6115 virtual CompileType ComputeType() const; | 6131 virtual CompileType ComputeType() const; |
| 6116 | 6132 |
| 6117 virtual bool AttributesEqual(Instruction* other) const { return true; } | 6133 virtual bool AttributesEqual(Instruction* other) const { return true; } |
| 6118 | 6134 |
| 6119 private: | 6135 private: |
| 6120 DISALLOW_COPY_AND_ASSIGN(Float64x2ConstructorInstr); | 6136 DISALLOW_COPY_AND_ASSIGN(Float64x2ConstructorInstr); |
| 6121 }; | 6137 }; |
| 6122 | 6138 |
| 6123 | 6139 |
| 6124 class Float64x2SplatInstr : public TemplateDefinition<1, NoThrow, Pure> { | 6140 class Float64x2SplatInstr : public TemplateDefinition<1, NoThrow, Pure> { |
| 6125 public: | 6141 public: |
| 6126 Float64x2SplatInstr(Value* value, intptr_t deopt_id) | 6142 Float64x2SplatInstr(Value* value, intptr_t deopt_id) |
| 6127 : TemplateDefinition(deopt_id) { | 6143 : TemplateDefinition(deopt_id) { |
| 6128 SetInputAt(0, value); | 6144 SetInputAt(0, value); |
| 6129 } | 6145 } |
| 6130 | 6146 |
| 6131 Value* value() const { return inputs_[0]; } | 6147 Value* value() const { return inputs_[0]; } |
| 6132 | 6148 |
| 6133 virtual void PrintOperandsTo(BufferFormatter* f) const; | |
| 6134 | |
| 6135 virtual bool CanDeoptimize() const { return false; } | 6149 virtual bool CanDeoptimize() const { return false; } |
| 6136 | 6150 |
| 6137 virtual Representation representation() const { | 6151 virtual Representation representation() const { |
| 6138 return kUnboxedFloat64x2; | 6152 return kUnboxedFloat64x2; |
| 6139 } | 6153 } |
| 6140 | 6154 |
| 6141 virtual Representation RequiredInputRepresentation(intptr_t idx) const { | 6155 virtual Representation RequiredInputRepresentation(intptr_t idx) const { |
| 6142 ASSERT(idx == 0); | 6156 ASSERT(idx == 0); |
| 6143 return kUnboxedDouble; | 6157 return kUnboxedDouble; |
| 6144 } | 6158 } |
| 6145 | 6159 |
| 6146 virtual intptr_t DeoptimizationTarget() const { | 6160 virtual intptr_t DeoptimizationTarget() const { |
| 6147 // Direct access since this instruction cannot deoptimize, and the deopt-id | 6161 // Direct access since this instruction cannot deoptimize, and the deopt-id |
| 6148 // was inherited from another instruction that could deoptimize. | 6162 // was inherited from another instruction that could deoptimize. |
| 6149 return GetDeoptId(); | 6163 return GetDeoptId(); |
| 6150 } | 6164 } |
| 6151 | 6165 |
| 6152 DECLARE_INSTRUCTION(Float64x2Splat) | 6166 DECLARE_INSTRUCTION(Float64x2Splat) |
| 6153 virtual CompileType ComputeType() const; | 6167 virtual CompileType ComputeType() const; |
| 6154 | 6168 |
| 6155 virtual bool AttributesEqual(Instruction* other) const { return true; } | 6169 virtual bool AttributesEqual(Instruction* other) const { return true; } |
| 6156 | 6170 |
| 6171 PRINT_OPERANDS_TO_SUPPORT |
| 6172 |
| 6157 private: | 6173 private: |
| 6158 DISALLOW_COPY_AND_ASSIGN(Float64x2SplatInstr); | 6174 DISALLOW_COPY_AND_ASSIGN(Float64x2SplatInstr); |
| 6159 }; | 6175 }; |
| 6160 | 6176 |
| 6161 | 6177 |
| 6162 class Float64x2ZeroInstr : public TemplateDefinition<0, NoThrow, Pure> { | 6178 class Float64x2ZeroInstr : public TemplateDefinition<0, NoThrow, Pure> { |
| 6163 public: | 6179 public: |
| 6164 Float64x2ZeroInstr() { } | 6180 Float64x2ZeroInstr() { } |
| 6165 | 6181 |
| 6166 virtual bool CanDeoptimize() const { return false; } | 6182 virtual bool CanDeoptimize() const { return false; } |
| (...skipping 19 matching lines...) Expand all Loading... |
| 6186 Value* left, | 6202 Value* left, |
| 6187 intptr_t deopt_id) | 6203 intptr_t deopt_id) |
| 6188 : TemplateDefinition(deopt_id), op_kind_(op_kind) { | 6204 : TemplateDefinition(deopt_id), op_kind_(op_kind) { |
| 6189 SetInputAt(0, left); | 6205 SetInputAt(0, left); |
| 6190 } | 6206 } |
| 6191 | 6207 |
| 6192 Value* left() const { return inputs_[0]; } | 6208 Value* left() const { return inputs_[0]; } |
| 6193 | 6209 |
| 6194 MethodRecognizer::Kind op_kind() const { return op_kind_; } | 6210 MethodRecognizer::Kind op_kind() const { return op_kind_; } |
| 6195 | 6211 |
| 6196 virtual void PrintOperandsTo(BufferFormatter* f) const; | |
| 6197 | |
| 6198 virtual bool CanDeoptimize() const { return false; } | 6212 virtual bool CanDeoptimize() const { return false; } |
| 6199 | 6213 |
| 6200 virtual Representation representation() const { | 6214 virtual Representation representation() const { |
| 6201 if (op_kind() == MethodRecognizer::kFloat64x2GetSignMask) { | 6215 if (op_kind() == MethodRecognizer::kFloat64x2GetSignMask) { |
| 6202 // Smi. | 6216 // Smi. |
| 6203 return kTagged; | 6217 return kTagged; |
| 6204 } | 6218 } |
| 6205 return kUnboxedFloat64x2; | 6219 return kUnboxedFloat64x2; |
| 6206 } | 6220 } |
| 6207 | 6221 |
| 6208 virtual Representation RequiredInputRepresentation(intptr_t idx) const { | 6222 virtual Representation RequiredInputRepresentation(intptr_t idx) const { |
| 6209 ASSERT(idx == 0); | 6223 ASSERT(idx == 0); |
| 6210 return kUnboxedFloat64x2; | 6224 return kUnboxedFloat64x2; |
| 6211 } | 6225 } |
| 6212 | 6226 |
| 6213 virtual intptr_t DeoptimizationTarget() const { | 6227 virtual intptr_t DeoptimizationTarget() const { |
| 6214 // Direct access since this instruction cannot deoptimize, and the deopt-id | 6228 // Direct access since this instruction cannot deoptimize, and the deopt-id |
| 6215 // was inherited from another instruction that could deoptimize. | 6229 // was inherited from another instruction that could deoptimize. |
| 6216 return GetDeoptId(); | 6230 return GetDeoptId(); |
| 6217 } | 6231 } |
| 6218 | 6232 |
| 6233 PRINT_OPERANDS_TO_SUPPORT |
| 6234 |
| 6219 DECLARE_INSTRUCTION(Float64x2ZeroArg) | 6235 DECLARE_INSTRUCTION(Float64x2ZeroArg) |
| 6220 virtual CompileType ComputeType() const; | 6236 virtual CompileType ComputeType() const; |
| 6221 | 6237 |
| 6222 virtual bool AttributesEqual(Instruction* other) const { | 6238 virtual bool AttributesEqual(Instruction* other) const { |
| 6223 return op_kind() == other->AsFloat64x2ZeroArg()->op_kind(); | 6239 return op_kind() == other->AsFloat64x2ZeroArg()->op_kind(); |
| 6224 } | 6240 } |
| 6225 | 6241 |
| 6226 private: | 6242 private: |
| 6227 const MethodRecognizer::Kind op_kind_; | 6243 const MethodRecognizer::Kind op_kind_; |
| 6228 | 6244 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 6239 : TemplateDefinition(deopt_id), op_kind_(op_kind) { | 6255 : TemplateDefinition(deopt_id), op_kind_(op_kind) { |
| 6240 SetInputAt(0, left); | 6256 SetInputAt(0, left); |
| 6241 SetInputAt(1, right); | 6257 SetInputAt(1, right); |
| 6242 } | 6258 } |
| 6243 | 6259 |
| 6244 Value* left() const { return inputs_[0]; } | 6260 Value* left() const { return inputs_[0]; } |
| 6245 Value* right() const { return inputs_[1]; } | 6261 Value* right() const { return inputs_[1]; } |
| 6246 | 6262 |
| 6247 MethodRecognizer::Kind op_kind() const { return op_kind_; } | 6263 MethodRecognizer::Kind op_kind() const { return op_kind_; } |
| 6248 | 6264 |
| 6249 virtual void PrintOperandsTo(BufferFormatter* f) const; | |
| 6250 | |
| 6251 virtual bool CanDeoptimize() const { return false; } | 6265 virtual bool CanDeoptimize() const { return false; } |
| 6252 | 6266 |
| 6253 virtual Representation representation() const { | 6267 virtual Representation representation() const { |
| 6254 return kUnboxedFloat64x2; | 6268 return kUnboxedFloat64x2; |
| 6255 } | 6269 } |
| 6256 | 6270 |
| 6257 virtual Representation RequiredInputRepresentation(intptr_t idx) const { | 6271 virtual Representation RequiredInputRepresentation(intptr_t idx) const { |
| 6258 if (idx == 0) { | 6272 if (idx == 0) { |
| 6259 return kUnboxedFloat64x2; | 6273 return kUnboxedFloat64x2; |
| 6260 } | 6274 } |
| 6261 ASSERT(idx == 1); | 6275 ASSERT(idx == 1); |
| 6262 if ((op_kind() == MethodRecognizer::kFloat64x2WithX) || | 6276 if ((op_kind() == MethodRecognizer::kFloat64x2WithX) || |
| 6263 (op_kind() == MethodRecognizer::kFloat64x2WithY) || | 6277 (op_kind() == MethodRecognizer::kFloat64x2WithY) || |
| 6264 (op_kind() == MethodRecognizer::kFloat64x2Scale)) { | 6278 (op_kind() == MethodRecognizer::kFloat64x2Scale)) { |
| 6265 return kUnboxedDouble; | 6279 return kUnboxedDouble; |
| 6266 } | 6280 } |
| 6267 return kUnboxedFloat64x2; | 6281 return kUnboxedFloat64x2; |
| 6268 } | 6282 } |
| 6269 | 6283 |
| 6270 virtual intptr_t DeoptimizationTarget() const { | 6284 virtual intptr_t DeoptimizationTarget() const { |
| 6271 // Direct access since this instruction cannot deoptimize, and the deopt-id | 6285 // Direct access since this instruction cannot deoptimize, and the deopt-id |
| 6272 // was inherited from another instruction that could deoptimize. | 6286 // was inherited from another instruction that could deoptimize. |
| 6273 return GetDeoptId(); | 6287 return GetDeoptId(); |
| 6274 } | 6288 } |
| 6275 | 6289 |
| 6290 PRINT_OPERANDS_TO_SUPPORT |
| 6291 |
| 6276 DECLARE_INSTRUCTION(Float64x2OneArg) | 6292 DECLARE_INSTRUCTION(Float64x2OneArg) |
| 6277 virtual CompileType ComputeType() const; | 6293 virtual CompileType ComputeType() const; |
| 6278 | 6294 |
| 6279 virtual bool AttributesEqual(Instruction* other) const { | 6295 virtual bool AttributesEqual(Instruction* other) const { |
| 6280 return op_kind() == other->AsFloat64x2OneArg()->op_kind(); | 6296 return op_kind() == other->AsFloat64x2OneArg()->op_kind(); |
| 6281 } | 6297 } |
| 6282 | 6298 |
| 6283 private: | 6299 private: |
| 6284 const MethodRecognizer::Kind op_kind_; | 6300 const MethodRecognizer::Kind op_kind_; |
| 6285 | 6301 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 6299 SetInputAt(1, value1); | 6315 SetInputAt(1, value1); |
| 6300 SetInputAt(2, value2); | 6316 SetInputAt(2, value2); |
| 6301 SetInputAt(3, value3); | 6317 SetInputAt(3, value3); |
| 6302 } | 6318 } |
| 6303 | 6319 |
| 6304 Value* value0() const { return inputs_[0]; } | 6320 Value* value0() const { return inputs_[0]; } |
| 6305 Value* value1() const { return inputs_[1]; } | 6321 Value* value1() const { return inputs_[1]; } |
| 6306 Value* value2() const { return inputs_[2]; } | 6322 Value* value2() const { return inputs_[2]; } |
| 6307 Value* value3() const { return inputs_[3]; } | 6323 Value* value3() const { return inputs_[3]; } |
| 6308 | 6324 |
| 6309 virtual void PrintOperandsTo(BufferFormatter* f) const; | |
| 6310 | |
| 6311 virtual bool CanDeoptimize() const { return false; } | 6325 virtual bool CanDeoptimize() const { return false; } |
| 6312 | 6326 |
| 6313 virtual Representation representation() const { | 6327 virtual Representation representation() const { |
| 6314 return kUnboxedInt32x4; | 6328 return kUnboxedInt32x4; |
| 6315 } | 6329 } |
| 6316 | 6330 |
| 6317 virtual Representation RequiredInputRepresentation(intptr_t idx) const { | 6331 virtual Representation RequiredInputRepresentation(intptr_t idx) const { |
| 6318 ASSERT((idx >= 0) && (idx < 4)); | 6332 ASSERT((idx >= 0) && (idx < 4)); |
| 6319 return kUnboxedInt32; | 6333 return kUnboxedInt32; |
| 6320 } | 6334 } |
| 6321 | 6335 |
| 6322 virtual intptr_t DeoptimizationTarget() const { | 6336 virtual intptr_t DeoptimizationTarget() const { |
| 6323 // Direct access since this instruction cannot deoptimize, and the deopt-id | 6337 // Direct access since this instruction cannot deoptimize, and the deopt-id |
| 6324 // was inherited from another instruction that could deoptimize. | 6338 // was inherited from another instruction that could deoptimize. |
| 6325 return GetDeoptId(); | 6339 return GetDeoptId(); |
| 6326 } | 6340 } |
| 6327 | 6341 |
| 6328 DECLARE_INSTRUCTION(Int32x4Constructor) | 6342 DECLARE_INSTRUCTION(Int32x4Constructor) |
| 6329 virtual CompileType ComputeType() const; | 6343 virtual CompileType ComputeType() const; |
| 6330 | 6344 |
| 6331 virtual bool AttributesEqual(Instruction* other) const { return true; } | 6345 virtual bool AttributesEqual(Instruction* other) const { return true; } |
| 6332 | 6346 |
| 6347 PRINT_OPERANDS_TO_SUPPORT |
| 6348 |
| 6333 private: | 6349 private: |
| 6334 DISALLOW_COPY_AND_ASSIGN(Int32x4ConstructorInstr); | 6350 DISALLOW_COPY_AND_ASSIGN(Int32x4ConstructorInstr); |
| 6335 }; | 6351 }; |
| 6336 | 6352 |
| 6337 | 6353 |
| 6338 class Int32x4BoolConstructorInstr | 6354 class Int32x4BoolConstructorInstr |
| 6339 : public TemplateDefinition<4, NoThrow, Pure> { | 6355 : public TemplateDefinition<4, NoThrow, Pure> { |
| 6340 public: | 6356 public: |
| 6341 Int32x4BoolConstructorInstr(Value* value0, | 6357 Int32x4BoolConstructorInstr(Value* value0, |
| 6342 Value* value1, | 6358 Value* value1, |
| 6343 Value* value2, | 6359 Value* value2, |
| 6344 Value* value3, | 6360 Value* value3, |
| 6345 intptr_t deopt_id) | 6361 intptr_t deopt_id) |
| 6346 : TemplateDefinition(deopt_id) { | 6362 : TemplateDefinition(deopt_id) { |
| 6347 SetInputAt(0, value0); | 6363 SetInputAt(0, value0); |
| 6348 SetInputAt(1, value1); | 6364 SetInputAt(1, value1); |
| 6349 SetInputAt(2, value2); | 6365 SetInputAt(2, value2); |
| 6350 SetInputAt(3, value3); | 6366 SetInputAt(3, value3); |
| 6351 } | 6367 } |
| 6352 | 6368 |
| 6353 Value* value0() const { return inputs_[0]; } | 6369 Value* value0() const { return inputs_[0]; } |
| 6354 Value* value1() const { return inputs_[1]; } | 6370 Value* value1() const { return inputs_[1]; } |
| 6355 Value* value2() const { return inputs_[2]; } | 6371 Value* value2() const { return inputs_[2]; } |
| 6356 Value* value3() const { return inputs_[3]; } | 6372 Value* value3() const { return inputs_[3]; } |
| 6357 | 6373 |
| 6358 virtual void PrintOperandsTo(BufferFormatter* f) const; | |
| 6359 | |
| 6360 virtual bool CanDeoptimize() const { return false; } | 6374 virtual bool CanDeoptimize() const { return false; } |
| 6361 | 6375 |
| 6362 virtual Representation representation() const { | 6376 virtual Representation representation() const { |
| 6363 return kUnboxedInt32x4; | 6377 return kUnboxedInt32x4; |
| 6364 } | 6378 } |
| 6365 | 6379 |
| 6366 virtual Representation RequiredInputRepresentation(intptr_t idx) const { | 6380 virtual Representation RequiredInputRepresentation(intptr_t idx) const { |
| 6367 ASSERT((idx >= 0) && (idx < 4)); | 6381 ASSERT((idx >= 0) && (idx < 4)); |
| 6368 return kTagged; | 6382 return kTagged; |
| 6369 } | 6383 } |
| 6370 | 6384 |
| 6371 virtual intptr_t DeoptimizationTarget() const { | 6385 virtual intptr_t DeoptimizationTarget() const { |
| 6372 // Direct access since this instruction cannot deoptimize, and the deopt-id | 6386 // Direct access since this instruction cannot deoptimize, and the deopt-id |
| 6373 // was inherited from another instruction that could deoptimize. | 6387 // was inherited from another instruction that could deoptimize. |
| 6374 return GetDeoptId(); | 6388 return GetDeoptId(); |
| 6375 } | 6389 } |
| 6376 | 6390 |
| 6377 DECLARE_INSTRUCTION(Int32x4BoolConstructor) | 6391 DECLARE_INSTRUCTION(Int32x4BoolConstructor) |
| 6378 virtual CompileType ComputeType() const; | 6392 virtual CompileType ComputeType() const; |
| 6379 | 6393 |
| 6380 virtual bool AttributesEqual(Instruction* other) const { return true; } | 6394 virtual bool AttributesEqual(Instruction* other) const { return true; } |
| 6381 | 6395 |
| 6396 PRINT_OPERANDS_TO_SUPPORT |
| 6397 |
| 6382 private: | 6398 private: |
| 6383 DISALLOW_COPY_AND_ASSIGN(Int32x4BoolConstructorInstr); | 6399 DISALLOW_COPY_AND_ASSIGN(Int32x4BoolConstructorInstr); |
| 6384 }; | 6400 }; |
| 6385 | 6401 |
| 6386 | 6402 |
| 6387 class Int32x4GetFlagInstr : public TemplateDefinition<1, NoThrow, Pure> { | 6403 class Int32x4GetFlagInstr : public TemplateDefinition<1, NoThrow, Pure> { |
| 6388 public: | 6404 public: |
| 6389 Int32x4GetFlagInstr(MethodRecognizer::Kind op_kind, | 6405 Int32x4GetFlagInstr(MethodRecognizer::Kind op_kind, |
| 6390 Value* value, | 6406 Value* value, |
| 6391 intptr_t deopt_id) | 6407 intptr_t deopt_id) |
| 6392 : TemplateDefinition(deopt_id), op_kind_(op_kind) { | 6408 : TemplateDefinition(deopt_id), op_kind_(op_kind) { |
| 6393 SetInputAt(0, value); | 6409 SetInputAt(0, value); |
| 6394 } | 6410 } |
| 6395 | 6411 |
| 6396 Value* value() const { return inputs_[0]; } | 6412 Value* value() const { return inputs_[0]; } |
| 6397 | 6413 |
| 6398 MethodRecognizer::Kind op_kind() const { return op_kind_; } | 6414 MethodRecognizer::Kind op_kind() const { return op_kind_; } |
| 6399 | 6415 |
| 6400 virtual void PrintOperandsTo(BufferFormatter* f) const; | |
| 6401 | |
| 6402 virtual bool CanDeoptimize() const { return false; } | 6416 virtual bool CanDeoptimize() const { return false; } |
| 6403 | 6417 |
| 6404 virtual Representation representation() const { | 6418 virtual Representation representation() const { |
| 6405 return kTagged; | 6419 return kTagged; |
| 6406 } | 6420 } |
| 6407 | 6421 |
| 6408 virtual Representation RequiredInputRepresentation(intptr_t idx) const { | 6422 virtual Representation RequiredInputRepresentation(intptr_t idx) const { |
| 6409 ASSERT(idx == 0); | 6423 ASSERT(idx == 0); |
| 6410 return kUnboxedInt32x4; | 6424 return kUnboxedInt32x4; |
| 6411 } | 6425 } |
| 6412 | 6426 |
| 6413 virtual intptr_t DeoptimizationTarget() const { | 6427 virtual intptr_t DeoptimizationTarget() const { |
| 6414 // Direct access since this instruction cannot deoptimize, and the deopt-id | 6428 // Direct access since this instruction cannot deoptimize, and the deopt-id |
| 6415 // was inherited from another instruction that could deoptimize. | 6429 // was inherited from another instruction that could deoptimize. |
| 6416 return GetDeoptId(); | 6430 return GetDeoptId(); |
| 6417 } | 6431 } |
| 6418 | 6432 |
| 6419 DECLARE_INSTRUCTION(Int32x4GetFlag) | 6433 DECLARE_INSTRUCTION(Int32x4GetFlag) |
| 6420 virtual CompileType ComputeType() const; | 6434 virtual CompileType ComputeType() const; |
| 6421 | 6435 |
| 6422 virtual bool AttributesEqual(Instruction* other) const { | 6436 virtual bool AttributesEqual(Instruction* other) const { |
| 6423 return op_kind() == other->AsInt32x4GetFlag()->op_kind(); | 6437 return op_kind() == other->AsInt32x4GetFlag()->op_kind(); |
| 6424 } | 6438 } |
| 6425 | 6439 |
| 6440 PRINT_OPERANDS_TO_SUPPORT |
| 6441 |
| 6426 private: | 6442 private: |
| 6427 const MethodRecognizer::Kind op_kind_; | 6443 const MethodRecognizer::Kind op_kind_; |
| 6428 | 6444 |
| 6429 DISALLOW_COPY_AND_ASSIGN(Int32x4GetFlagInstr); | 6445 DISALLOW_COPY_AND_ASSIGN(Int32x4GetFlagInstr); |
| 6430 }; | 6446 }; |
| 6431 | 6447 |
| 6432 | 6448 |
| 6433 class Simd32x4GetSignMaskInstr : public TemplateDefinition<1, NoThrow, Pure> { | 6449 class Simd32x4GetSignMaskInstr : public TemplateDefinition<1, NoThrow, Pure> { |
| 6434 public: | 6450 public: |
| 6435 Simd32x4GetSignMaskInstr(MethodRecognizer::Kind op_kind, | 6451 Simd32x4GetSignMaskInstr(MethodRecognizer::Kind op_kind, |
| 6436 Value* value, | 6452 Value* value, |
| 6437 intptr_t deopt_id) | 6453 intptr_t deopt_id) |
| 6438 : TemplateDefinition(deopt_id), op_kind_(op_kind) { | 6454 : TemplateDefinition(deopt_id), op_kind_(op_kind) { |
| 6439 SetInputAt(0, value); | 6455 SetInputAt(0, value); |
| 6440 } | 6456 } |
| 6441 | 6457 |
| 6442 Value* value() const { return inputs_[0]; } | 6458 Value* value() const { return inputs_[0]; } |
| 6443 | 6459 |
| 6444 MethodRecognizer::Kind op_kind() const { return op_kind_; } | 6460 MethodRecognizer::Kind op_kind() const { return op_kind_; } |
| 6445 | 6461 |
| 6446 virtual void PrintOperandsTo(BufferFormatter* f) const; | |
| 6447 | |
| 6448 virtual bool CanDeoptimize() const { return false; } | 6462 virtual bool CanDeoptimize() const { return false; } |
| 6449 | 6463 |
| 6450 virtual Representation representation() const { | 6464 virtual Representation representation() const { |
| 6451 return kTagged; | 6465 return kTagged; |
| 6452 } | 6466 } |
| 6453 | 6467 |
| 6454 virtual Representation RequiredInputRepresentation(intptr_t idx) const { | 6468 virtual Representation RequiredInputRepresentation(intptr_t idx) const { |
| 6455 ASSERT(idx == 0); | 6469 ASSERT(idx == 0); |
| 6456 if (op_kind_ == MethodRecognizer::kFloat32x4GetSignMask) { | 6470 if (op_kind_ == MethodRecognizer::kFloat32x4GetSignMask) { |
| 6457 return kUnboxedFloat32x4; | 6471 return kUnboxedFloat32x4; |
| 6458 } | 6472 } |
| 6459 ASSERT(op_kind_ == MethodRecognizer::kInt32x4GetSignMask); | 6473 ASSERT(op_kind_ == MethodRecognizer::kInt32x4GetSignMask); |
| 6460 return kUnboxedInt32x4; | 6474 return kUnboxedInt32x4; |
| 6461 } | 6475 } |
| 6462 | 6476 |
| 6463 virtual intptr_t DeoptimizationTarget() const { | 6477 virtual intptr_t DeoptimizationTarget() const { |
| 6464 // Direct access since this instruction cannot deoptimize, and the deopt-id | 6478 // Direct access since this instruction cannot deoptimize, and the deopt-id |
| 6465 // was inherited from another instruction that could deoptimize. | 6479 // was inherited from another instruction that could deoptimize. |
| 6466 return GetDeoptId(); | 6480 return GetDeoptId(); |
| 6467 } | 6481 } |
| 6468 | 6482 |
| 6469 DECLARE_INSTRUCTION(Simd32x4GetSignMask) | 6483 DECLARE_INSTRUCTION(Simd32x4GetSignMask) |
| 6470 virtual CompileType ComputeType() const; | 6484 virtual CompileType ComputeType() const; |
| 6471 | 6485 |
| 6472 virtual bool AttributesEqual(Instruction* other) const { | 6486 virtual bool AttributesEqual(Instruction* other) const { |
| 6473 return other->AsSimd32x4GetSignMask()->op_kind() == op_kind(); | 6487 return other->AsSimd32x4GetSignMask()->op_kind() == op_kind(); |
| 6474 } | 6488 } |
| 6475 | 6489 |
| 6490 PRINT_OPERANDS_TO_SUPPORT |
| 6491 |
| 6476 private: | 6492 private: |
| 6477 const MethodRecognizer::Kind op_kind_; | 6493 const MethodRecognizer::Kind op_kind_; |
| 6478 | 6494 |
| 6479 DISALLOW_COPY_AND_ASSIGN(Simd32x4GetSignMaskInstr); | 6495 DISALLOW_COPY_AND_ASSIGN(Simd32x4GetSignMaskInstr); |
| 6480 }; | 6496 }; |
| 6481 | 6497 |
| 6482 | 6498 |
| 6483 class Int32x4SelectInstr : public TemplateDefinition<3, NoThrow, Pure> { | 6499 class Int32x4SelectInstr : public TemplateDefinition<3, NoThrow, Pure> { |
| 6484 public: | 6500 public: |
| 6485 Int32x4SelectInstr(Value* mask, | 6501 Int32x4SelectInstr(Value* mask, |
| 6486 Value* trueValue, | 6502 Value* trueValue, |
| 6487 Value* falseValue, | 6503 Value* falseValue, |
| 6488 intptr_t deopt_id) | 6504 intptr_t deopt_id) |
| 6489 : TemplateDefinition(deopt_id) { | 6505 : TemplateDefinition(deopt_id) { |
| 6490 SetInputAt(0, mask); | 6506 SetInputAt(0, mask); |
| 6491 SetInputAt(1, trueValue); | 6507 SetInputAt(1, trueValue); |
| 6492 SetInputAt(2, falseValue); | 6508 SetInputAt(2, falseValue); |
| 6493 } | 6509 } |
| 6494 | 6510 |
| 6495 Value* mask() const { return inputs_[0]; } | 6511 Value* mask() const { return inputs_[0]; } |
| 6496 Value* trueValue() const { return inputs_[1]; } | 6512 Value* trueValue() const { return inputs_[1]; } |
| 6497 Value* falseValue() const { return inputs_[2]; } | 6513 Value* falseValue() const { return inputs_[2]; } |
| 6498 | 6514 |
| 6499 virtual void PrintOperandsTo(BufferFormatter* f) const; | |
| 6500 | |
| 6501 virtual bool CanDeoptimize() const { return false; } | 6515 virtual bool CanDeoptimize() const { return false; } |
| 6502 | 6516 |
| 6503 virtual Representation representation() const { | 6517 virtual Representation representation() const { |
| 6504 return kUnboxedFloat32x4; | 6518 return kUnboxedFloat32x4; |
| 6505 } | 6519 } |
| 6506 | 6520 |
| 6507 virtual Representation RequiredInputRepresentation(intptr_t idx) const { | 6521 virtual Representation RequiredInputRepresentation(intptr_t idx) const { |
| 6508 ASSERT((idx == 0) || (idx == 1) || (idx == 2)); | 6522 ASSERT((idx == 0) || (idx == 1) || (idx == 2)); |
| 6509 if (idx == 0) { | 6523 if (idx == 0) { |
| 6510 return kUnboxedInt32x4; | 6524 return kUnboxedInt32x4; |
| 6511 } | 6525 } |
| 6512 return kUnboxedFloat32x4; | 6526 return kUnboxedFloat32x4; |
| 6513 } | 6527 } |
| 6514 | 6528 |
| 6515 virtual intptr_t DeoptimizationTarget() const { | 6529 virtual intptr_t DeoptimizationTarget() const { |
| 6516 // Direct access since this instruction cannot deoptimize, and the deopt-id | 6530 // Direct access since this instruction cannot deoptimize, and the deopt-id |
| 6517 // was inherited from another instruction that could deoptimize. | 6531 // was inherited from another instruction that could deoptimize. |
| 6518 return GetDeoptId(); | 6532 return GetDeoptId(); |
| 6519 } | 6533 } |
| 6520 | 6534 |
| 6521 DECLARE_INSTRUCTION(Int32x4Select) | 6535 DECLARE_INSTRUCTION(Int32x4Select) |
| 6522 virtual CompileType ComputeType() const; | 6536 virtual CompileType ComputeType() const; |
| 6523 | 6537 |
| 6524 virtual bool AttributesEqual(Instruction* other) const { return true; } | 6538 virtual bool AttributesEqual(Instruction* other) const { return true; } |
| 6525 | 6539 |
| 6540 PRINT_OPERANDS_TO_SUPPORT |
| 6541 |
| 6526 private: | 6542 private: |
| 6527 DISALLOW_COPY_AND_ASSIGN(Int32x4SelectInstr); | 6543 DISALLOW_COPY_AND_ASSIGN(Int32x4SelectInstr); |
| 6528 }; | 6544 }; |
| 6529 | 6545 |
| 6530 | 6546 |
| 6531 class Int32x4SetFlagInstr : public TemplateDefinition<2, NoThrow, Pure> { | 6547 class Int32x4SetFlagInstr : public TemplateDefinition<2, NoThrow, Pure> { |
| 6532 public: | 6548 public: |
| 6533 Int32x4SetFlagInstr(MethodRecognizer::Kind op_kind, | 6549 Int32x4SetFlagInstr(MethodRecognizer::Kind op_kind, |
| 6534 Value* value, | 6550 Value* value, |
| 6535 Value* flagValue, | 6551 Value* flagValue, |
| 6536 intptr_t deopt_id) | 6552 intptr_t deopt_id) |
| 6537 : TemplateDefinition(deopt_id), op_kind_(op_kind) { | 6553 : TemplateDefinition(deopt_id), op_kind_(op_kind) { |
| 6538 SetInputAt(0, value); | 6554 SetInputAt(0, value); |
| 6539 SetInputAt(1, flagValue); | 6555 SetInputAt(1, flagValue); |
| 6540 } | 6556 } |
| 6541 | 6557 |
| 6542 Value* value() const { return inputs_[0]; } | 6558 Value* value() const { return inputs_[0]; } |
| 6543 Value* flagValue() const { return inputs_[1]; } | 6559 Value* flagValue() const { return inputs_[1]; } |
| 6544 | 6560 |
| 6545 MethodRecognizer::Kind op_kind() const { return op_kind_; } | 6561 MethodRecognizer::Kind op_kind() const { return op_kind_; } |
| 6546 | 6562 |
| 6547 virtual void PrintOperandsTo(BufferFormatter* f) const; | |
| 6548 | |
| 6549 virtual bool CanDeoptimize() const { return false; } | 6563 virtual bool CanDeoptimize() const { return false; } |
| 6550 | 6564 |
| 6551 virtual Representation representation() const { | 6565 virtual Representation representation() const { |
| 6552 return kUnboxedInt32x4; | 6566 return kUnboxedInt32x4; |
| 6553 } | 6567 } |
| 6554 | 6568 |
| 6555 virtual Representation RequiredInputRepresentation(intptr_t idx) const { | 6569 virtual Representation RequiredInputRepresentation(intptr_t idx) const { |
| 6556 ASSERT((idx == 0) || (idx == 1)); | 6570 ASSERT((idx == 0) || (idx == 1)); |
| 6557 if (idx == 1) { | 6571 if (idx == 1) { |
| 6558 return kTagged; | 6572 return kTagged; |
| 6559 } | 6573 } |
| 6560 return kUnboxedInt32x4; | 6574 return kUnboxedInt32x4; |
| 6561 } | 6575 } |
| 6562 | 6576 |
| 6563 virtual intptr_t DeoptimizationTarget() const { | 6577 virtual intptr_t DeoptimizationTarget() const { |
| 6564 // Direct access since this instruction cannot deoptimize, and the deopt-id | 6578 // Direct access since this instruction cannot deoptimize, and the deopt-id |
| 6565 // was inherited from another instruction that could deoptimize. | 6579 // was inherited from another instruction that could deoptimize. |
| 6566 return GetDeoptId(); | 6580 return GetDeoptId(); |
| 6567 } | 6581 } |
| 6568 | 6582 |
| 6569 DECLARE_INSTRUCTION(Int32x4SetFlag) | 6583 DECLARE_INSTRUCTION(Int32x4SetFlag) |
| 6570 virtual CompileType ComputeType() const; | 6584 virtual CompileType ComputeType() const; |
| 6571 | 6585 |
| 6572 virtual bool AttributesEqual(Instruction* other) const { | 6586 virtual bool AttributesEqual(Instruction* other) const { |
| 6573 return op_kind() == other->AsInt32x4SetFlag()->op_kind(); | 6587 return op_kind() == other->AsInt32x4SetFlag()->op_kind(); |
| 6574 } | 6588 } |
| 6575 | 6589 |
| 6590 PRINT_OPERANDS_TO_SUPPORT |
| 6591 |
| 6576 private: | 6592 private: |
| 6577 const MethodRecognizer::Kind op_kind_; | 6593 const MethodRecognizer::Kind op_kind_; |
| 6578 | 6594 |
| 6579 DISALLOW_COPY_AND_ASSIGN(Int32x4SetFlagInstr); | 6595 DISALLOW_COPY_AND_ASSIGN(Int32x4SetFlagInstr); |
| 6580 }; | 6596 }; |
| 6581 | 6597 |
| 6582 | 6598 |
| 6583 class Int32x4ToFloat32x4Instr : public TemplateDefinition<1, NoThrow, Pure> { | 6599 class Int32x4ToFloat32x4Instr : public TemplateDefinition<1, NoThrow, Pure> { |
| 6584 public: | 6600 public: |
| 6585 Int32x4ToFloat32x4Instr(Value* left, intptr_t deopt_id) | 6601 Int32x4ToFloat32x4Instr(Value* left, intptr_t deopt_id) |
| 6586 : TemplateDefinition(deopt_id) { | 6602 : TemplateDefinition(deopt_id) { |
| 6587 SetInputAt(0, left); | 6603 SetInputAt(0, left); |
| 6588 } | 6604 } |
| 6589 | 6605 |
| 6590 Value* left() const { return inputs_[0]; } | 6606 Value* left() const { return inputs_[0]; } |
| 6591 | 6607 |
| 6592 virtual void PrintOperandsTo(BufferFormatter* f) const; | |
| 6593 | |
| 6594 virtual bool CanDeoptimize() const { return false; } | 6608 virtual bool CanDeoptimize() const { return false; } |
| 6595 | 6609 |
| 6596 virtual Representation representation() const { | 6610 virtual Representation representation() const { |
| 6597 return kUnboxedFloat32x4; | 6611 return kUnboxedFloat32x4; |
| 6598 } | 6612 } |
| 6599 | 6613 |
| 6600 virtual Representation RequiredInputRepresentation(intptr_t idx) const { | 6614 virtual Representation RequiredInputRepresentation(intptr_t idx) const { |
| 6601 ASSERT(idx == 0); | 6615 ASSERT(idx == 0); |
| 6602 return kUnboxedInt32x4; | 6616 return kUnboxedInt32x4; |
| 6603 } | 6617 } |
| 6604 | 6618 |
| 6605 virtual intptr_t DeoptimizationTarget() const { | 6619 virtual intptr_t DeoptimizationTarget() const { |
| 6606 // Direct access since this instruction cannot deoptimize, and the deopt-id | 6620 // Direct access since this instruction cannot deoptimize, and the deopt-id |
| 6607 // was inherited from another instruction that could deoptimize. | 6621 // was inherited from another instruction that could deoptimize. |
| 6608 return GetDeoptId(); | 6622 return GetDeoptId(); |
| 6609 } | 6623 } |
| 6610 | 6624 |
| 6611 DECLARE_INSTRUCTION(Int32x4ToFloat32x4) | 6625 DECLARE_INSTRUCTION(Int32x4ToFloat32x4) |
| 6612 virtual CompileType ComputeType() const; | 6626 virtual CompileType ComputeType() const; |
| 6613 | 6627 |
| 6614 virtual bool AttributesEqual(Instruction* other) const { return true; } | 6628 virtual bool AttributesEqual(Instruction* other) const { return true; } |
| 6615 | 6629 |
| 6630 PRINT_OPERANDS_TO_SUPPORT |
| 6631 |
| 6616 private: | 6632 private: |
| 6617 DISALLOW_COPY_AND_ASSIGN(Int32x4ToFloat32x4Instr); | 6633 DISALLOW_COPY_AND_ASSIGN(Int32x4ToFloat32x4Instr); |
| 6618 }; | 6634 }; |
| 6619 | 6635 |
| 6620 | 6636 |
| 6621 class BinaryInt32x4OpInstr : public TemplateDefinition<2, NoThrow, Pure> { | 6637 class BinaryInt32x4OpInstr : public TemplateDefinition<2, NoThrow, Pure> { |
| 6622 public: | 6638 public: |
| 6623 BinaryInt32x4OpInstr(Token::Kind op_kind, | 6639 BinaryInt32x4OpInstr(Token::Kind op_kind, |
| 6624 Value* left, | 6640 Value* left, |
| 6625 Value* right, | 6641 Value* right, |
| 6626 intptr_t deopt_id) | 6642 intptr_t deopt_id) |
| 6627 : TemplateDefinition(deopt_id), op_kind_(op_kind) { | 6643 : TemplateDefinition(deopt_id), op_kind_(op_kind) { |
| 6628 SetInputAt(0, left); | 6644 SetInputAt(0, left); |
| 6629 SetInputAt(1, right); | 6645 SetInputAt(1, right); |
| 6630 } | 6646 } |
| 6631 | 6647 |
| 6632 Value* left() const { return inputs_[0]; } | 6648 Value* left() const { return inputs_[0]; } |
| 6633 Value* right() const { return inputs_[1]; } | 6649 Value* right() const { return inputs_[1]; } |
| 6634 | 6650 |
| 6635 Token::Kind op_kind() const { return op_kind_; } | 6651 Token::Kind op_kind() const { return op_kind_; } |
| 6636 | 6652 |
| 6637 virtual void PrintOperandsTo(BufferFormatter* f) const; | |
| 6638 | |
| 6639 virtual bool CanDeoptimize() const { return false; } | 6653 virtual bool CanDeoptimize() const { return false; } |
| 6640 | 6654 |
| 6641 virtual Representation representation() const { | 6655 virtual Representation representation() const { |
| 6642 return kUnboxedInt32x4; | 6656 return kUnboxedInt32x4; |
| 6643 } | 6657 } |
| 6644 | 6658 |
| 6645 virtual Representation RequiredInputRepresentation(intptr_t idx) const { | 6659 virtual Representation RequiredInputRepresentation(intptr_t idx) const { |
| 6646 ASSERT((idx == 0) || (idx == 1)); | 6660 ASSERT((idx == 0) || (idx == 1)); |
| 6647 return kUnboxedInt32x4; | 6661 return kUnboxedInt32x4; |
| 6648 } | 6662 } |
| 6649 | 6663 |
| 6650 virtual intptr_t DeoptimizationTarget() const { | 6664 virtual intptr_t DeoptimizationTarget() const { |
| 6651 // Direct access since this instruction cannot deoptimize, and the deopt-id | 6665 // Direct access since this instruction cannot deoptimize, and the deopt-id |
| 6652 // was inherited from another instruction that could deoptimize. | 6666 // was inherited from another instruction that could deoptimize. |
| 6653 return GetDeoptId(); | 6667 return GetDeoptId(); |
| 6654 } | 6668 } |
| 6655 | 6669 |
| 6656 DECLARE_INSTRUCTION(BinaryInt32x4Op) | 6670 DECLARE_INSTRUCTION(BinaryInt32x4Op) |
| 6657 virtual CompileType ComputeType() const; | 6671 virtual CompileType ComputeType() const; |
| 6658 | 6672 |
| 6659 virtual bool AttributesEqual(Instruction* other) const { | 6673 virtual bool AttributesEqual(Instruction* other) const { |
| 6660 return op_kind() == other->AsBinaryInt32x4Op()->op_kind(); | 6674 return op_kind() == other->AsBinaryInt32x4Op()->op_kind(); |
| 6661 } | 6675 } |
| 6662 | 6676 |
| 6677 PRINT_OPERANDS_TO_SUPPORT |
| 6678 |
| 6663 private: | 6679 private: |
| 6664 const Token::Kind op_kind_; | 6680 const Token::Kind op_kind_; |
| 6665 | 6681 |
| 6666 DISALLOW_COPY_AND_ASSIGN(BinaryInt32x4OpInstr); | 6682 DISALLOW_COPY_AND_ASSIGN(BinaryInt32x4OpInstr); |
| 6667 }; | 6683 }; |
| 6668 | 6684 |
| 6669 | 6685 |
| 6670 class BinaryFloat64x2OpInstr : public TemplateDefinition<2, NoThrow, Pure> { | 6686 class BinaryFloat64x2OpInstr : public TemplateDefinition<2, NoThrow, Pure> { |
| 6671 public: | 6687 public: |
| 6672 BinaryFloat64x2OpInstr(Token::Kind op_kind, | 6688 BinaryFloat64x2OpInstr(Token::Kind op_kind, |
| (...skipping 14 matching lines...) Expand all Loading... |
| 6687 | 6703 |
| 6688 virtual Representation representation() const { | 6704 virtual Representation representation() const { |
| 6689 return kUnboxedFloat64x2; | 6705 return kUnboxedFloat64x2; |
| 6690 } | 6706 } |
| 6691 | 6707 |
| 6692 virtual Representation RequiredInputRepresentation(intptr_t idx) const { | 6708 virtual Representation RequiredInputRepresentation(intptr_t idx) const { |
| 6693 ASSERT((idx == 0) || (idx == 1)); | 6709 ASSERT((idx == 0) || (idx == 1)); |
| 6694 return kUnboxedFloat64x2; | 6710 return kUnboxedFloat64x2; |
| 6695 } | 6711 } |
| 6696 | 6712 |
| 6697 virtual void PrintOperandsTo(BufferFormatter* f) const; | |
| 6698 | |
| 6699 virtual intptr_t DeoptimizationTarget() const { | 6713 virtual intptr_t DeoptimizationTarget() const { |
| 6700 // Direct access since this instruction cannot deoptimize, and the deopt-id | 6714 // Direct access since this instruction cannot deoptimize, and the deopt-id |
| 6701 // was inherited from another instruction that could deoptimize. | 6715 // was inherited from another instruction that could deoptimize. |
| 6702 return GetDeoptId(); | 6716 return GetDeoptId(); |
| 6703 } | 6717 } |
| 6704 | 6718 |
| 6705 DECLARE_INSTRUCTION(BinaryFloat64x2Op) | 6719 DECLARE_INSTRUCTION(BinaryFloat64x2Op) |
| 6706 virtual CompileType ComputeType() const; | 6720 virtual CompileType ComputeType() const; |
| 6707 | 6721 |
| 6708 virtual bool AttributesEqual(Instruction* other) const { | 6722 virtual bool AttributesEqual(Instruction* other) const { |
| 6709 return op_kind() == other->AsBinaryFloat64x2Op()->op_kind(); | 6723 return op_kind() == other->AsBinaryFloat64x2Op()->op_kind(); |
| 6710 } | 6724 } |
| 6711 | 6725 |
| 6726 PRINT_OPERANDS_TO_SUPPORT |
| 6727 |
| 6712 private: | 6728 private: |
| 6713 const Token::Kind op_kind_; | 6729 const Token::Kind op_kind_; |
| 6714 | 6730 |
| 6715 DISALLOW_COPY_AND_ASSIGN(BinaryFloat64x2OpInstr); | 6731 DISALLOW_COPY_AND_ASSIGN(BinaryFloat64x2OpInstr); |
| 6716 }; | 6732 }; |
| 6717 | 6733 |
| 6718 | 6734 |
| 6719 class UnaryIntegerOpInstr : public TemplateDefinition<1, NoThrow, Pure> { | 6735 class UnaryIntegerOpInstr : public TemplateDefinition<1, NoThrow, Pure> { |
| 6720 public: | 6736 public: |
| 6721 UnaryIntegerOpInstr(Token::Kind op_kind, | 6737 UnaryIntegerOpInstr(Token::Kind op_kind, |
| (...skipping 17 matching lines...) Expand all Loading... |
| 6739 virtual bool AttributesEqual(Instruction* other) const { | 6755 virtual bool AttributesEqual(Instruction* other) const { |
| 6740 return other->AsUnaryIntegerOp()->op_kind() == op_kind(); | 6756 return other->AsUnaryIntegerOp()->op_kind() == op_kind(); |
| 6741 } | 6757 } |
| 6742 | 6758 |
| 6743 virtual intptr_t DeoptimizationTarget() const { | 6759 virtual intptr_t DeoptimizationTarget() const { |
| 6744 // Direct access since this instruction cannot deoptimize, and the deopt-id | 6760 // Direct access since this instruction cannot deoptimize, and the deopt-id |
| 6745 // was inherited from another instruction that could deoptimize. | 6761 // was inherited from another instruction that could deoptimize. |
| 6746 return GetDeoptId(); | 6762 return GetDeoptId(); |
| 6747 } | 6763 } |
| 6748 | 6764 |
| 6749 virtual void PrintOperandsTo(BufferFormatter* f) const; | 6765 PRINT_OPERANDS_TO_SUPPORT |
| 6750 | 6766 |
| 6751 RawInteger* Evaluate(const Integer& value) const; | 6767 RawInteger* Evaluate(const Integer& value) const; |
| 6752 | 6768 |
| 6753 DEFINE_INSTRUCTION_TYPE_CHECK(UnaryIntegerOp) | 6769 DEFINE_INSTRUCTION_TYPE_CHECK(UnaryIntegerOp) |
| 6754 | 6770 |
| 6755 private: | 6771 private: |
| 6756 const Token::Kind op_kind_; | 6772 const Token::Kind op_kind_; |
| 6757 }; | 6773 }; |
| 6758 | 6774 |
| 6759 | 6775 |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6898 | 6914 |
| 6899 default: | 6915 default: |
| 6900 return false; | 6916 return false; |
| 6901 } | 6917 } |
| 6902 } | 6918 } |
| 6903 | 6919 |
| 6904 virtual bool AttributesEqual(Instruction* other) const; | 6920 virtual bool AttributesEqual(Instruction* other) const; |
| 6905 | 6921 |
| 6906 virtual intptr_t DeoptimizationTarget() const { return GetDeoptId(); } | 6922 virtual intptr_t DeoptimizationTarget() const { return GetDeoptId(); } |
| 6907 | 6923 |
| 6908 virtual void PrintOperandsTo(BufferFormatter* f) const; | 6924 |
| 6925 PRINT_OPERANDS_TO_SUPPORT |
| 6909 | 6926 |
| 6910 DEFINE_INSTRUCTION_TYPE_CHECK(BinaryIntegerOp) | 6927 DEFINE_INSTRUCTION_TYPE_CHECK(BinaryIntegerOp) |
| 6911 | 6928 |
| 6912 protected: | 6929 protected: |
| 6913 void InferRangeHelper(const Range* left_range, | 6930 void InferRangeHelper(const Range* left_range, |
| 6914 const Range* right_range, | 6931 const Range* right_range, |
| 6915 Range* range); | 6932 Range* range); |
| 6916 | 6933 |
| 6917 private: | 6934 private: |
| 6918 Definition* CreateConstantResult(FlowGraph* graph, const Integer& result); | 6935 Definition* CreateConstantResult(FlowGraph* graph, const Integer& result); |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7141 Value* value, | 7158 Value* value, |
| 7142 intptr_t deopt_id) | 7159 intptr_t deopt_id) |
| 7143 : TemplateDefinition(deopt_id), op_kind_(op_kind) { | 7160 : TemplateDefinition(deopt_id), op_kind_(op_kind) { |
| 7144 ASSERT(op_kind == Token::kNEGATE); | 7161 ASSERT(op_kind == Token::kNEGATE); |
| 7145 SetInputAt(0, value); | 7162 SetInputAt(0, value); |
| 7146 } | 7163 } |
| 7147 | 7164 |
| 7148 Value* value() const { return inputs_[0]; } | 7165 Value* value() const { return inputs_[0]; } |
| 7149 Token::Kind op_kind() const { return op_kind_; } | 7166 Token::Kind op_kind() const { return op_kind_; } |
| 7150 | 7167 |
| 7151 virtual void PrintOperandsTo(BufferFormatter* f) const; | |
| 7152 | |
| 7153 DECLARE_INSTRUCTION(UnaryDoubleOp) | 7168 DECLARE_INSTRUCTION(UnaryDoubleOp) |
| 7154 virtual CompileType ComputeType() const; | 7169 virtual CompileType ComputeType() const; |
| 7155 | 7170 |
| 7156 virtual bool CanDeoptimize() const { return false; } | 7171 virtual bool CanDeoptimize() const { return false; } |
| 7157 | 7172 |
| 7158 virtual intptr_t DeoptimizationTarget() const { | 7173 virtual intptr_t DeoptimizationTarget() const { |
| 7159 // Direct access since this instruction cannot deoptimize, and the deopt-id | 7174 // Direct access since this instruction cannot deoptimize, and the deopt-id |
| 7160 // was inherited from another instruction that could deoptimize. | 7175 // was inherited from another instruction that could deoptimize. |
| 7161 return GetDeoptId(); | 7176 return GetDeoptId(); |
| 7162 } | 7177 } |
| 7163 | 7178 |
| 7164 virtual Representation representation() const { | 7179 virtual Representation representation() const { |
| 7165 return kUnboxedDouble; | 7180 return kUnboxedDouble; |
| 7166 } | 7181 } |
| 7167 | 7182 |
| 7168 virtual Representation RequiredInputRepresentation(intptr_t idx) const { | 7183 virtual Representation RequiredInputRepresentation(intptr_t idx) const { |
| 7169 ASSERT(idx == 0); | 7184 ASSERT(idx == 0); |
| 7170 return kUnboxedDouble; | 7185 return kUnboxedDouble; |
| 7171 } | 7186 } |
| 7172 | 7187 |
| 7173 virtual bool AttributesEqual(Instruction* other) const { return true; } | 7188 virtual bool AttributesEqual(Instruction* other) const { return true; } |
| 7174 | 7189 |
| 7190 PRINT_OPERANDS_TO_SUPPORT |
| 7191 |
| 7175 private: | 7192 private: |
| 7176 const Token::Kind op_kind_; | 7193 const Token::Kind op_kind_; |
| 7177 | 7194 |
| 7178 DISALLOW_COPY_AND_ASSIGN(UnaryDoubleOpInstr); | 7195 DISALLOW_COPY_AND_ASSIGN(UnaryDoubleOpInstr); |
| 7179 }; | 7196 }; |
| 7180 | 7197 |
| 7181 | 7198 |
| 7182 class CheckStackOverflowInstr : public TemplateInstruction<0, NoThrow> { | 7199 class CheckStackOverflowInstr : public TemplateInstruction<0, NoThrow> { |
| 7183 public: | 7200 public: |
| 7184 CheckStackOverflowInstr(TokenPosition token_pos, intptr_t loop_depth) | 7201 CheckStackOverflowInstr(TokenPosition token_pos, intptr_t loop_depth) |
| 7185 : TemplateInstruction(Thread::Current()->GetNextDeoptId()), | 7202 : TemplateInstruction(Thread::Current()->GetNextDeoptId()), |
| 7186 token_pos_(token_pos), | 7203 token_pos_(token_pos), |
| 7187 loop_depth_(loop_depth) { | 7204 loop_depth_(loop_depth) { |
| 7188 } | 7205 } |
| 7189 | 7206 |
| 7190 virtual TokenPosition token_pos() const { return token_pos_; } | 7207 virtual TokenPosition token_pos() const { return token_pos_; } |
| 7191 bool in_loop() const { return loop_depth_ > 0; } | 7208 bool in_loop() const { return loop_depth_ > 0; } |
| 7192 intptr_t loop_depth() const { return loop_depth_; } | 7209 intptr_t loop_depth() const { return loop_depth_; } |
| 7193 | 7210 |
| 7194 DECLARE_INSTRUCTION(CheckStackOverflow) | 7211 DECLARE_INSTRUCTION(CheckStackOverflow) |
| 7195 | 7212 |
| 7196 virtual bool CanDeoptimize() const { return true; } | 7213 virtual bool CanDeoptimize() const { return true; } |
| 7197 | 7214 |
| 7198 virtual EffectSet Effects() const { return EffectSet::None(); } | 7215 virtual EffectSet Effects() const { return EffectSet::None(); } |
| 7199 | 7216 |
| 7200 virtual void PrintOperandsTo(BufferFormatter* f) const; | 7217 PRINT_OPERANDS_TO_SUPPORT |
| 7201 | 7218 |
| 7202 private: | 7219 private: |
| 7203 const TokenPosition token_pos_; | 7220 const TokenPosition token_pos_; |
| 7204 const intptr_t loop_depth_; | 7221 const intptr_t loop_depth_; |
| 7205 | 7222 |
| 7206 DISALLOW_COPY_AND_ASSIGN(CheckStackOverflowInstr); | 7223 DISALLOW_COPY_AND_ASSIGN(CheckStackOverflowInstr); |
| 7207 }; | 7224 }; |
| 7208 | 7225 |
| 7209 | 7226 |
| 7210 // TODO(vegorov): remove this instruction in favor of Int32ToDouble. | 7227 // TODO(vegorov): remove this instruction in favor of Int32ToDouble. |
| (...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7482 static intptr_t ArgumentCountFor(MethodRecognizer::Kind recognized_kind_); | 7499 static intptr_t ArgumentCountFor(MethodRecognizer::Kind recognized_kind_); |
| 7483 | 7500 |
| 7484 const RuntimeEntry& TargetFunction() const; | 7501 const RuntimeEntry& TargetFunction() const; |
| 7485 | 7502 |
| 7486 MethodRecognizer::Kind recognized_kind() const { return recognized_kind_; } | 7503 MethodRecognizer::Kind recognized_kind() const { return recognized_kind_; } |
| 7487 | 7504 |
| 7488 virtual TokenPosition token_pos() const { return token_pos_; } | 7505 virtual TokenPosition token_pos() const { return token_pos_; } |
| 7489 | 7506 |
| 7490 DECLARE_INSTRUCTION(InvokeMathCFunction) | 7507 DECLARE_INSTRUCTION(InvokeMathCFunction) |
| 7491 virtual CompileType ComputeType() const; | 7508 virtual CompileType ComputeType() const; |
| 7492 virtual void PrintOperandsTo(BufferFormatter* f) const; | |
| 7493 | 7509 |
| 7494 virtual bool CanDeoptimize() const { return false; } | 7510 virtual bool CanDeoptimize() const { return false; } |
| 7495 | 7511 |
| 7496 virtual Representation representation() const { | 7512 virtual Representation representation() const { |
| 7497 return kUnboxedDouble; | 7513 return kUnboxedDouble; |
| 7498 } | 7514 } |
| 7499 | 7515 |
| 7500 virtual Representation RequiredInputRepresentation(intptr_t idx) const { | 7516 virtual Representation RequiredInputRepresentation(intptr_t idx) const { |
| 7501 ASSERT((0 <= idx) && (idx < InputCount())); | 7517 ASSERT((0 <= idx) && (idx < InputCount())); |
| 7502 return kUnboxedDouble; | 7518 return kUnboxedDouble; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 7516 InvokeMathCFunctionInstr* other_invoke = other->AsInvokeMathCFunction(); | 7532 InvokeMathCFunctionInstr* other_invoke = other->AsInvokeMathCFunction(); |
| 7517 return other_invoke->recognized_kind() == recognized_kind(); | 7533 return other_invoke->recognized_kind() == recognized_kind(); |
| 7518 } | 7534 } |
| 7519 | 7535 |
| 7520 virtual bool MayThrow() const { return false; } | 7536 virtual bool MayThrow() const { return false; } |
| 7521 | 7537 |
| 7522 static const intptr_t kSavedSpTempIndex = 0; | 7538 static const intptr_t kSavedSpTempIndex = 0; |
| 7523 static const intptr_t kObjectTempIndex = 1; | 7539 static const intptr_t kObjectTempIndex = 1; |
| 7524 static const intptr_t kDoubleTempIndex = 2; | 7540 static const intptr_t kDoubleTempIndex = 2; |
| 7525 | 7541 |
| 7542 PRINT_OPERANDS_TO_SUPPORT |
| 7543 |
| 7526 private: | 7544 private: |
| 7527 virtual void RawSetInputAt(intptr_t i, Value* value) { | 7545 virtual void RawSetInputAt(intptr_t i, Value* value) { |
| 7528 (*inputs_)[i] = value; | 7546 (*inputs_)[i] = value; |
| 7529 } | 7547 } |
| 7530 | 7548 |
| 7531 ZoneGrowableArray<Value*>* inputs_; | 7549 ZoneGrowableArray<Value*>* inputs_; |
| 7532 const MethodRecognizer::Kind recognized_kind_; | 7550 const MethodRecognizer::Kind recognized_kind_; |
| 7533 const TokenPosition token_pos_; | 7551 const TokenPosition token_pos_; |
| 7534 | 7552 |
| 7535 DISALLOW_COPY_AND_ASSIGN(InvokeMathCFunctionInstr); | 7553 DISALLOW_COPY_AND_ASSIGN(InvokeMathCFunctionInstr); |
| (...skipping 11 matching lines...) Expand all Loading... |
| 7547 definition_rep_(definition_rep), | 7565 definition_rep_(definition_rep), |
| 7548 definition_cid_(definition_cid) { | 7566 definition_cid_(definition_cid) { |
| 7549 SetInputAt(0, value); | 7567 SetInputAt(0, value); |
| 7550 } | 7568 } |
| 7551 | 7569 |
| 7552 Value* value() const { return inputs_[0]; } | 7570 Value* value() const { return inputs_[0]; } |
| 7553 | 7571 |
| 7554 DECLARE_INSTRUCTION(ExtractNthOutput) | 7572 DECLARE_INSTRUCTION(ExtractNthOutput) |
| 7555 | 7573 |
| 7556 virtual CompileType ComputeType() const; | 7574 virtual CompileType ComputeType() const; |
| 7557 virtual void PrintOperandsTo(BufferFormatter* f) const; | |
| 7558 virtual bool CanDeoptimize() const { return false; } | 7575 virtual bool CanDeoptimize() const { return false; } |
| 7559 | 7576 |
| 7560 intptr_t index() const { return index_; } | 7577 intptr_t index() const { return index_; } |
| 7561 | 7578 |
| 7562 virtual Representation representation() const { | 7579 virtual Representation representation() const { |
| 7563 return definition_rep_; | 7580 return definition_rep_; |
| 7564 } | 7581 } |
| 7565 | 7582 |
| 7566 virtual Representation RequiredInputRepresentation(intptr_t idx) const { | 7583 virtual Representation RequiredInputRepresentation(intptr_t idx) const { |
| 7567 ASSERT(idx == 0); | 7584 ASSERT(idx == 0); |
| 7568 if (representation() == kTagged) { | 7585 if (representation() == kTagged) { |
| 7569 return kPairOfTagged; | 7586 return kPairOfTagged; |
| 7570 } else if (representation() == kUnboxedDouble) { | 7587 } else if (representation() == kUnboxedDouble) { |
| 7571 return kPairOfUnboxedDouble; | 7588 return kPairOfUnboxedDouble; |
| 7572 } | 7589 } |
| 7573 UNREACHABLE(); | 7590 UNREACHABLE(); |
| 7574 return definition_rep_; | 7591 return definition_rep_; |
| 7575 } | 7592 } |
| 7576 | 7593 |
| 7577 virtual bool AttributesEqual(Instruction* other) const { | 7594 virtual bool AttributesEqual(Instruction* other) const { |
| 7578 ExtractNthOutputInstr* other_extract = other->AsExtractNthOutput(); | 7595 ExtractNthOutputInstr* other_extract = other->AsExtractNthOutput(); |
| 7579 return (other_extract->representation() == representation()) && | 7596 return (other_extract->representation() == representation()) && |
| 7580 (other_extract->index() == index()); | 7597 (other_extract->index() == index()); |
| 7581 } | 7598 } |
| 7582 | 7599 |
| 7600 PRINT_OPERANDS_TO_SUPPORT |
| 7601 |
| 7583 private: | 7602 private: |
| 7584 const intptr_t index_; | 7603 const intptr_t index_; |
| 7585 const Representation definition_rep_; | 7604 const Representation definition_rep_; |
| 7586 const intptr_t definition_cid_; | 7605 const intptr_t definition_cid_; |
| 7587 DISALLOW_COPY_AND_ASSIGN(ExtractNthOutputInstr); | 7606 DISALLOW_COPY_AND_ASSIGN(ExtractNthOutputInstr); |
| 7588 }; | 7607 }; |
| 7589 | 7608 |
| 7590 | 7609 |
| 7591 class MergedMathInstr : public PureDefinition { | 7610 class MergedMathInstr : public PureDefinition { |
| 7592 public: | 7611 public: |
| (...skipping 22 matching lines...) Expand all Loading... |
| 7615 virtual intptr_t InputCount() const { return inputs_->length(); } | 7634 virtual intptr_t InputCount() const { return inputs_->length(); } |
| 7616 | 7635 |
| 7617 virtual Value* InputAt(intptr_t i) const { | 7636 virtual Value* InputAt(intptr_t i) const { |
| 7618 return (*inputs_)[i]; | 7637 return (*inputs_)[i]; |
| 7619 } | 7638 } |
| 7620 | 7639 |
| 7621 static intptr_t OutputIndexOf(intptr_t kind); | 7640 static intptr_t OutputIndexOf(intptr_t kind); |
| 7622 static intptr_t OutputIndexOf(Token::Kind token); | 7641 static intptr_t OutputIndexOf(Token::Kind token); |
| 7623 | 7642 |
| 7624 virtual CompileType ComputeType() const; | 7643 virtual CompileType ComputeType() const; |
| 7625 virtual void PrintOperandsTo(BufferFormatter* f) const; | |
| 7626 | 7644 |
| 7627 virtual bool CanDeoptimize() const { | 7645 virtual bool CanDeoptimize() const { |
| 7628 if (kind_ == kTruncDivMod) { | 7646 if (kind_ == kTruncDivMod) { |
| 7629 return true; | 7647 return true; |
| 7630 } else if (kind_ == kSinCos) { | 7648 } else if (kind_ == kSinCos) { |
| 7631 return false; | 7649 return false; |
| 7632 } else { | 7650 } else { |
| 7633 UNIMPLEMENTED(); | 7651 UNIMPLEMENTED(); |
| 7634 return false; | 7652 return false; |
| 7635 } | 7653 } |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7669 | 7687 |
| 7670 virtual bool MayThrow() const { return false; } | 7688 virtual bool MayThrow() const { return false; } |
| 7671 | 7689 |
| 7672 static const char* KindToCString(MergedMathInstr::Kind kind) { | 7690 static const char* KindToCString(MergedMathInstr::Kind kind) { |
| 7673 if (kind == kTruncDivMod) return "TruncDivMod"; | 7691 if (kind == kTruncDivMod) return "TruncDivMod"; |
| 7674 if (kind == kSinCos) return "SinCos"; | 7692 if (kind == kSinCos) return "SinCos"; |
| 7675 UNIMPLEMENTED(); | 7693 UNIMPLEMENTED(); |
| 7676 return ""; | 7694 return ""; |
| 7677 } | 7695 } |
| 7678 | 7696 |
| 7697 PRINT_OPERANDS_TO_SUPPORT |
| 7698 |
| 7679 private: | 7699 private: |
| 7680 virtual void RawSetInputAt(intptr_t i, Value* value) { | 7700 virtual void RawSetInputAt(intptr_t i, Value* value) { |
| 7681 (*inputs_)[i] = value; | 7701 (*inputs_)[i] = value; |
| 7682 } | 7702 } |
| 7683 ZoneGrowableArray<Value*>* inputs_; | 7703 ZoneGrowableArray<Value*>* inputs_; |
| 7684 MergedMathInstr::Kind kind_; | 7704 MergedMathInstr::Kind kind_; |
| 7685 DISALLOW_COPY_AND_ASSIGN(MergedMathInstr); | 7705 DISALLOW_COPY_AND_ASSIGN(MergedMathInstr); |
| 7686 }; | 7706 }; |
| 7687 | 7707 |
| 7688 | 7708 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 7700 virtual TokenPosition token_pos() const { return token_pos_; } | 7720 virtual TokenPosition token_pos() const { return token_pos_; } |
| 7701 | 7721 |
| 7702 Value* value() const { return inputs_[0]; } | 7722 Value* value() const { return inputs_[0]; } |
| 7703 | 7723 |
| 7704 const ICData& unary_checks() const { return unary_checks_; } | 7724 const ICData& unary_checks() const { return unary_checks_; } |
| 7705 | 7725 |
| 7706 const GrowableArray<intptr_t>& cids() const { return cids_; } | 7726 const GrowableArray<intptr_t>& cids() const { return cids_; } |
| 7707 | 7727 |
| 7708 virtual Instruction* Canonicalize(FlowGraph* flow_graph); | 7728 virtual Instruction* Canonicalize(FlowGraph* flow_graph); |
| 7709 | 7729 |
| 7710 virtual void PrintOperandsTo(BufferFormatter* f) const; | |
| 7711 | |
| 7712 bool IsNullCheck() const { | 7730 bool IsNullCheck() const { |
| 7713 return DeoptIfNull() || DeoptIfNotNull(); | 7731 return DeoptIfNull() || DeoptIfNotNull(); |
| 7714 } | 7732 } |
| 7715 | 7733 |
| 7716 bool DeoptIfNull() const; | 7734 bool DeoptIfNull() const; |
| 7717 bool DeoptIfNotNull() const; | 7735 bool DeoptIfNotNull() const; |
| 7718 | 7736 |
| 7719 bool IsDenseSwitch() const; | 7737 bool IsDenseSwitch() const; |
| 7720 intptr_t ComputeCidMask() const; | 7738 intptr_t ComputeCidMask() const; |
| 7721 static bool IsDenseMask(intptr_t mask); | 7739 static bool IsDenseMask(intptr_t mask); |
| 7722 | 7740 |
| 7723 virtual bool AllowsCSE() const { return true; } | 7741 virtual bool AllowsCSE() const { return true; } |
| 7724 virtual EffectSet Dependencies() const; | 7742 virtual EffectSet Dependencies() const; |
| 7725 virtual EffectSet Effects() const { return EffectSet::None(); } | 7743 virtual EffectSet Effects() const { return EffectSet::None(); } |
| 7726 virtual bool AttributesEqual(Instruction* other) const; | 7744 virtual bool AttributesEqual(Instruction* other) const; |
| 7727 | 7745 |
| 7728 void set_licm_hoisted(bool value) { licm_hoisted_ = value; } | 7746 void set_licm_hoisted(bool value) { licm_hoisted_ = value; } |
| 7729 | 7747 |
| 7730 static bool IsImmutableClassId(intptr_t cid); | 7748 static bool IsImmutableClassId(intptr_t cid); |
| 7731 | 7749 |
| 7750 PRINT_OPERANDS_TO_SUPPORT |
| 7751 |
| 7732 private: | 7752 private: |
| 7733 const ICData& unary_checks_; | 7753 const ICData& unary_checks_; |
| 7734 GrowableArray<intptr_t> cids_; // Sorted, lowest first. | 7754 GrowableArray<intptr_t> cids_; // Sorted, lowest first. |
| 7735 bool licm_hoisted_; | 7755 bool licm_hoisted_; |
| 7736 const TokenPosition token_pos_; | 7756 const TokenPosition token_pos_; |
| 7737 | 7757 |
| 7738 DISALLOW_COPY_AND_ASSIGN(CheckClassInstr); | 7758 DISALLOW_COPY_AND_ASSIGN(CheckClassInstr); |
| 7739 }; | 7759 }; |
| 7740 | 7760 |
| 7741 | 7761 |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7783 | 7803 |
| 7784 virtual bool CanDeoptimize() const { return true; } | 7804 virtual bool CanDeoptimize() const { return true; } |
| 7785 | 7805 |
| 7786 virtual Instruction* Canonicalize(FlowGraph* flow_graph); | 7806 virtual Instruction* Canonicalize(FlowGraph* flow_graph); |
| 7787 | 7807 |
| 7788 virtual bool AllowsCSE() const { return true; } | 7808 virtual bool AllowsCSE() const { return true; } |
| 7789 virtual EffectSet Dependencies() const; | 7809 virtual EffectSet Dependencies() const; |
| 7790 virtual EffectSet Effects() const { return EffectSet::None(); } | 7810 virtual EffectSet Effects() const { return EffectSet::None(); } |
| 7791 virtual bool AttributesEqual(Instruction* other) const { return true; } | 7811 virtual bool AttributesEqual(Instruction* other) const { return true; } |
| 7792 | 7812 |
| 7793 virtual void PrintOperandsTo(BufferFormatter* f) const; | 7813 PRINT_OPERANDS_TO_SUPPORT |
| 7794 | 7814 |
| 7795 private: | 7815 private: |
| 7796 intptr_t cid_; | 7816 intptr_t cid_; |
| 7797 | 7817 |
| 7798 DISALLOW_COPY_AND_ASSIGN(CheckClassIdInstr); | 7818 DISALLOW_COPY_AND_ASSIGN(CheckClassIdInstr); |
| 7799 }; | 7819 }; |
| 7800 | 7820 |
| 7801 | 7821 |
| 7802 class CheckArrayBoundInstr : public TemplateInstruction<2, NoThrow, Pure> { | 7822 class CheckArrayBoundInstr : public TemplateInstruction<2, NoThrow, Pure> { |
| 7803 public: | 7823 public: |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7893 virtual bool AttributesEqual(Instruction* other) const { | 7913 virtual bool AttributesEqual(Instruction* other) const { |
| 7894 ASSERT(other->IsUnboxedIntConverter()); | 7914 ASSERT(other->IsUnboxedIntConverter()); |
| 7895 UnboxedIntConverterInstr* converter = other->AsUnboxedIntConverter(); | 7915 UnboxedIntConverterInstr* converter = other->AsUnboxedIntConverter(); |
| 7896 return (converter->from() == from()) && | 7916 return (converter->from() == from()) && |
| 7897 (converter->to() == to()) && | 7917 (converter->to() == to()) && |
| 7898 (converter->is_truncating() == is_truncating()); | 7918 (converter->is_truncating() == is_truncating()); |
| 7899 } | 7919 } |
| 7900 | 7920 |
| 7901 virtual void InferRange(RangeAnalysis* analysis, Range* range); | 7921 virtual void InferRange(RangeAnalysis* analysis, Range* range); |
| 7902 | 7922 |
| 7903 virtual void PrintOperandsTo(BufferFormatter* f) const; | |
| 7904 | |
| 7905 virtual CompileType ComputeType() const { | 7923 virtual CompileType ComputeType() const { |
| 7906 // TODO(vegorov) use range information to improve type. | 7924 // TODO(vegorov) use range information to improve type. |
| 7907 return CompileType::Int(); | 7925 return CompileType::Int(); |
| 7908 } | 7926 } |
| 7909 | 7927 |
| 7910 DECLARE_INSTRUCTION(UnboxedIntConverter); | 7928 DECLARE_INSTRUCTION(UnboxedIntConverter); |
| 7911 | 7929 |
| 7930 PRINT_OPERANDS_TO_SUPPORT |
| 7931 |
| 7912 private: | 7932 private: |
| 7913 const Representation from_representation_; | 7933 const Representation from_representation_; |
| 7914 const Representation to_representation_; | 7934 const Representation to_representation_; |
| 7915 bool is_truncating_; | 7935 bool is_truncating_; |
| 7916 | 7936 |
| 7917 DISALLOW_COPY_AND_ASSIGN(UnboxedIntConverterInstr); | 7937 DISALLOW_COPY_AND_ASSIGN(UnboxedIntConverterInstr); |
| 7918 }; | 7938 }; |
| 7919 | 7939 |
| 7920 | 7940 |
| 7921 class GrowRegExpStackInstr : public TemplateDefinition<1, Throws> { | 7941 class GrowRegExpStackInstr : public TemplateDefinition<1, Throws> { |
| (...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8191 LocationSummary* Name::MakeLocationSummary(Zone* zone, bool opt) const { \ | 8211 LocationSummary* Name::MakeLocationSummary(Zone* zone, bool opt) const { \ |
| 8192 UNIMPLEMENTED(); \ | 8212 UNIMPLEMENTED(); \ |
| 8193 return NULL; \ | 8213 return NULL; \ |
| 8194 } \ | 8214 } \ |
| 8195 void Name::EmitNativeCode(FlowGraphCompiler* compiler) { UNIMPLEMENTED(); } | 8215 void Name::EmitNativeCode(FlowGraphCompiler* compiler) { UNIMPLEMENTED(); } |
| 8196 | 8216 |
| 8197 | 8217 |
| 8198 } // namespace dart | 8218 } // namespace dart |
| 8199 | 8219 |
| 8200 #endif // VM_INTERMEDIATE_LANGUAGE_H_ | 8220 #endif // VM_INTERMEDIATE_LANGUAGE_H_ |
| OLD | NEW |