OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 1579 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1590 | 1590 |
1591 HValue* value() { return OperandAt(0); } | 1591 HValue* value() { return OperandAt(0); } |
1592 }; | 1592 }; |
1593 | 1593 |
1594 | 1594 |
1595 class HBranch: public HUnaryControlInstruction { | 1595 class HBranch: public HUnaryControlInstruction { |
1596 public: | 1596 public: |
1597 HBranch(HValue* value, | 1597 HBranch(HValue* value, |
1598 HBasicBlock* true_target, | 1598 HBasicBlock* true_target, |
1599 HBasicBlock* false_target, | 1599 HBasicBlock* false_target, |
1600 ToBooleanStub::Types expected_input_types = ToBooleanStub::no_types()) | 1600 ToBooleanStub::Types expected_input_types = ToBooleanStub::Types()) |
1601 : HUnaryControlInstruction(value, true_target, false_target), | 1601 : HUnaryControlInstruction(value, true_target, false_target), |
1602 expected_input_types_(expected_input_types) { | 1602 expected_input_types_(expected_input_types) { |
1603 ASSERT(true_target != NULL && false_target != NULL); | 1603 ASSERT(true_target != NULL && false_target != NULL); |
| 1604 SetFlag(kAllowUndefinedAsNaN); |
1604 } | 1605 } |
1605 explicit HBranch(HValue* value) | 1606 explicit HBranch(HValue* value) |
1606 : HUnaryControlInstruction(value, NULL, NULL) { } | 1607 : HUnaryControlInstruction(value, NULL, NULL) { |
| 1608 SetFlag(kAllowUndefinedAsNaN); |
| 1609 } |
1607 HBranch(HValue* value, ToBooleanStub::Types expected_input_types) | 1610 HBranch(HValue* value, ToBooleanStub::Types expected_input_types) |
1608 : HUnaryControlInstruction(value, NULL, NULL), | 1611 : HUnaryControlInstruction(value, NULL, NULL), |
1609 expected_input_types_(expected_input_types) { } | 1612 expected_input_types_(expected_input_types) { |
1610 | 1613 SetFlag(kAllowUndefinedAsNaN); |
| 1614 } |
1611 | 1615 |
1612 virtual Representation RequiredInputRepresentation(int index) { | 1616 virtual Representation RequiredInputRepresentation(int index) { |
1613 return Representation::None(); | 1617 return Representation::None(); |
1614 } | 1618 } |
1615 virtual Representation observed_input_representation(int index); | 1619 virtual Representation observed_input_representation(int index); |
1616 | 1620 |
1617 ToBooleanStub::Types expected_input_types() const { | 1621 ToBooleanStub::Types expected_input_types() const { |
1618 return expected_input_types_; | 1622 return expected_input_types_; |
1619 } | 1623 } |
1620 | 1624 |
(...skipping 5019 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6640 virtual bool IsDeletable() const { return true; } | 6644 virtual bool IsDeletable() const { return true; } |
6641 }; | 6645 }; |
6642 | 6646 |
6643 | 6647 |
6644 #undef DECLARE_INSTRUCTION | 6648 #undef DECLARE_INSTRUCTION |
6645 #undef DECLARE_CONCRETE_INSTRUCTION | 6649 #undef DECLARE_CONCRETE_INSTRUCTION |
6646 | 6650 |
6647 } } // namespace v8::internal | 6651 } } // namespace v8::internal |
6648 | 6652 |
6649 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 6653 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
OLD | NEW |