| 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 fd0a06ba68ceba34a19c04bfc6bee67dbe64c172..e6201ec67f8e6f627827b98b56e125200b67cfee 100644
|
| --- a/test/unittests/compiler/node-test-utils.cc
|
| +++ b/test/unittests/compiler/node-test-utils.cc
|
| @@ -323,6 +323,37 @@ class IsReturnMatcher final : public NodeMatcher {
|
| };
|
|
|
|
|
| +class IsTerminateMatcher final : public NodeMatcher {
|
| + public:
|
| + IsTerminateMatcher(const Matcher<Node*>& effect_matcher,
|
| + const Matcher<Node*>& control_matcher)
|
| + : NodeMatcher(IrOpcode::kTerminate),
|
| + effect_matcher_(effect_matcher),
|
| + control_matcher_(control_matcher) {}
|
| +
|
| + void DescribeTo(std::ostream* os) const final {
|
| + NodeMatcher::DescribeTo(os);
|
| + *os << " whose 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::GetEffectInput(node), "effect",
|
| + effect_matcher_, listener) &&
|
| + PrintMatchAndExplain(NodeProperties::GetControlInput(node),
|
| + "control", control_matcher_, listener));
|
| + }
|
| +
|
| + private:
|
| + const Matcher<Node*> effect_matcher_;
|
| + const Matcher<Node*> control_matcher_;
|
| +};
|
| +
|
| +
|
| template <typename T>
|
| class IsConstantMatcher final : public NodeMatcher {
|
| public:
|
| @@ -1289,11 +1320,6 @@ class IsUnopMatcher final : public NodeMatcher {
|
| } // namespace
|
|
|
|
|
| -Matcher<Node*> IsAlways() {
|
| - return MakeMatcher(new NodeMatcher(IrOpcode::kAlways));
|
| -}
|
| -
|
| -
|
| Matcher<Node*> IsEnd(const Matcher<Node*>& control_matcher) {
|
| return MakeMatcher(new IsControl1Matcher(IrOpcode::kEnd, control_matcher));
|
| }
|
| @@ -1389,6 +1415,12 @@ Matcher<Node*> IsReturn(const Matcher<Node*>& value_matcher,
|
| }
|
|
|
|
|
| +Matcher<Node*> IsTerminate(const Matcher<Node*>& effect_matcher,
|
| + const Matcher<Node*>& control_matcher) {
|
| + return MakeMatcher(new IsTerminateMatcher(effect_matcher, control_matcher));
|
| +}
|
| +
|
| +
|
| Matcher<Node*> IsExternalConstant(
|
| const Matcher<ExternalReference>& value_matcher) {
|
| return MakeMatcher(new IsConstantMatcher<ExternalReference>(
|
|
|