| Index: test/unittests/compiler/node-test-utils.cc
|
| diff --git a/test/unittests/compiler/node-test-utils.cc b/test/unittests/compiler/node-test-utils.cc
|
| index e6201ec67f8e6f627827b98b56e125200b67cfee..f63f49b0915baa0b366b296665d68609c31e7f79 100644
|
| --- a/test/unittests/compiler/node-test-utils.cc
|
| +++ b/test/unittests/compiler/node-test-utils.cc
|
| @@ -1415,6 +1415,53 @@ Matcher<Node*> IsReturn(const Matcher<Node*>& value_matcher,
|
| }
|
|
|
|
|
| +class IsDeoptimizeMatcher final : public NodeMatcher {
|
| + public:
|
| + IsDeoptimizeMatcher(const Matcher<Node*>& frame_state_matcher,
|
| + const Matcher<Node*>& effect_matcher,
|
| + const Matcher<Node*>& control_matcher)
|
| + : NodeMatcher(IrOpcode::kDeoptimize),
|
| + frame_state_matcher_(frame_state_matcher),
|
| + effect_matcher_(effect_matcher),
|
| + control_matcher_(control_matcher) {}
|
| +
|
| + void DescribeTo(std::ostream* os) const final {
|
| + NodeMatcher::DescribeTo(os);
|
| + *os << " whose frame_state (";
|
| + frame_state_matcher_.DescribeTo(os);
|
| + *os << ") and effect (";
|
| + effect_matcher_.DescribeTo(os);
|
| + *os << ") and control (";
|
| + control_matcher_.DescribeTo(os);
|
| + *os << ")";
|
| + }
|
| +
|
| + bool MatchAndExplain(Node* node, MatchResultListener* listener) const final {
|
| + return (NodeMatcher::MatchAndExplain(node, listener) &&
|
| + PrintMatchAndExplain(NodeProperties::GetValueInput(node, 0),
|
| + "frame_state", frame_state_matcher_,
|
| + listener) &&
|
| + PrintMatchAndExplain(NodeProperties::GetEffectInput(node), "effect",
|
| + effect_matcher_, listener) &&
|
| + PrintMatchAndExplain(NodeProperties::GetControlInput(node),
|
| + "control", control_matcher_, listener));
|
| + }
|
| +
|
| + private:
|
| + const Matcher<Node*> frame_state_matcher_;
|
| + const Matcher<Node*> effect_matcher_;
|
| + const Matcher<Node*> control_matcher_;
|
| +};
|
| +
|
| +
|
| +Matcher<Node*> IsDeoptimize(const Matcher<Node*>& frame_state_matcher,
|
| + const Matcher<Node*>& effect_matcher,
|
| + const Matcher<Node*>& control_matcher) {
|
| + return MakeMatcher(new IsDeoptimizeMatcher(frame_state_matcher,
|
| + effect_matcher, control_matcher));
|
| +}
|
| +
|
| +
|
| Matcher<Node*> IsTerminate(const Matcher<Node*>& effect_matcher,
|
| const Matcher<Node*>& control_matcher) {
|
| return MakeMatcher(new IsTerminateMatcher(effect_matcher, control_matcher));
|
|
|