OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_HYDROGEN_INSTRUCTIONS_H_ | 5 #ifndef V8_HYDROGEN_INSTRUCTIONS_H_ |
6 #define V8_HYDROGEN_INSTRUCTIONS_H_ | 6 #define V8_HYDROGEN_INSTRUCTIONS_H_ |
7 | 7 |
8 #include <cstring> | 8 #include <cstring> |
9 #include <iosfwd> | 9 #include <iosfwd> |
10 | 10 |
(...skipping 4508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4519 DECLARE_CONCRETE_INSTRUCTION(IsUndetectableAndBranch) | 4519 DECLARE_CONCRETE_INSTRUCTION(IsUndetectableAndBranch) |
4520 | 4520 |
4521 private: | 4521 private: |
4522 HIsUndetectableAndBranch(HValue* value, | 4522 HIsUndetectableAndBranch(HValue* value, |
4523 HBasicBlock* true_target = NULL, | 4523 HBasicBlock* true_target = NULL, |
4524 HBasicBlock* false_target = NULL) | 4524 HBasicBlock* false_target = NULL) |
4525 : HUnaryControlInstruction(value, true_target, false_target) {} | 4525 : HUnaryControlInstruction(value, true_target, false_target) {} |
4526 }; | 4526 }; |
4527 | 4527 |
4528 | 4528 |
4529 class HStringCompareAndBranch : public HTemplateControlInstruction<2, 3> { | 4529 class HStringCompareAndBranch final : public HTemplateControlInstruction<2, 3> { |
4530 public: | 4530 public: |
4531 DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P3(HStringCompareAndBranch, | 4531 DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P3(HStringCompareAndBranch, |
4532 HValue*, | 4532 HValue*, |
4533 HValue*, | 4533 HValue*, |
4534 Token::Value); | 4534 Token::Value); |
4535 | 4535 |
4536 HValue* context() { return OperandAt(0); } | 4536 HValue* context() const { return OperandAt(0); } |
4537 HValue* left() { return OperandAt(1); } | 4537 HValue* left() const { return OperandAt(1); } |
4538 HValue* right() { return OperandAt(2); } | 4538 HValue* right() const { return OperandAt(2); } |
4539 Token::Value token() const { return token_; } | 4539 Token::Value token() const { return token_; } |
4540 | 4540 |
4541 std::ostream& PrintDataTo(std::ostream& os) const override; // NOLINT | 4541 std::ostream& PrintDataTo(std::ostream& os) const final; // NOLINT |
4542 | 4542 |
4543 Representation RequiredInputRepresentation(int index) override { | 4543 Representation RequiredInputRepresentation(int index) final { |
4544 return Representation::Tagged(); | |
4545 } | |
4546 | |
4547 Representation GetInputRepresentation() const { | |
4548 return Representation::Tagged(); | 4544 return Representation::Tagged(); |
4549 } | 4545 } |
4550 | 4546 |
4551 DECLARE_CONCRETE_INSTRUCTION(StringCompareAndBranch) | 4547 DECLARE_CONCRETE_INSTRUCTION(StringCompareAndBranch) |
4552 | 4548 |
4553 private: | 4549 private: |
4554 HStringCompareAndBranch(HValue* context, | 4550 HStringCompareAndBranch(HValue* context, HValue* left, HValue* right, |
4555 HValue* left, | |
4556 HValue* right, | |
4557 Token::Value token) | 4551 Token::Value token) |
4558 : token_(token) { | 4552 : token_(token) { |
4559 DCHECK(Token::IsCompareOp(token)); | 4553 DCHECK(Token::IsCompareOp(token)); |
4560 SetOperandAt(0, context); | 4554 SetOperandAt(0, context); |
4561 SetOperandAt(1, left); | 4555 SetOperandAt(1, left); |
4562 SetOperandAt(2, right); | 4556 SetOperandAt(2, right); |
4563 set_representation(Representation::Tagged()); | 4557 set_representation(Representation::Tagged()); |
4564 SetChangesFlag(kNewSpacePromotion); | 4558 SetChangesFlag(kNewSpacePromotion); |
| 4559 SetDependsOnFlag(kStringChars); |
| 4560 SetDependsOnFlag(kStringLengths); |
4565 } | 4561 } |
4566 | 4562 |
4567 Token::Value token_; | 4563 Token::Value const token_; |
4568 }; | 4564 }; |
4569 | 4565 |
4570 | 4566 |
4571 class HIsConstructCallAndBranch : public HTemplateControlInstruction<2, 0> { | 4567 class HIsConstructCallAndBranch : public HTemplateControlInstruction<2, 0> { |
4572 public: | 4568 public: |
4573 DECLARE_INSTRUCTION_FACTORY_P0(HIsConstructCallAndBranch); | 4569 DECLARE_INSTRUCTION_FACTORY_P0(HIsConstructCallAndBranch); |
4574 | 4570 |
4575 Representation RequiredInputRepresentation(int index) override { | 4571 Representation RequiredInputRepresentation(int index) override { |
4576 return Representation::None(); | 4572 return Representation::None(); |
4577 } | 4573 } |
(...skipping 3398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7976 }; | 7972 }; |
7977 | 7973 |
7978 | 7974 |
7979 | 7975 |
7980 #undef DECLARE_INSTRUCTION | 7976 #undef DECLARE_INSTRUCTION |
7981 #undef DECLARE_CONCRETE_INSTRUCTION | 7977 #undef DECLARE_CONCRETE_INSTRUCTION |
7982 | 7978 |
7983 } } // namespace v8::internal | 7979 } } // namespace v8::internal |
7984 | 7980 |
7985 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 7981 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
OLD | NEW |