| Index: test/compiler-unittests/graph-unittest.cc
|
| diff --git a/test/compiler-unittests/graph-unittest.cc b/test/compiler-unittests/graph-unittest.cc
|
| index e5b413c545260c519d8697a1556702ec85a499c7..5a816c2545262d366fe420889e1984c8fc97b149 100644
|
| --- a/test/compiler-unittests/graph-unittest.cc
|
| +++ b/test/compiler-unittests/graph-unittest.cc
|
| @@ -8,6 +8,7 @@
|
|
|
| #include "src/compiler/node-properties-inl.h"
|
|
|
| +using testing::_;
|
| using testing::MakeMatcher;
|
| using testing::MatcherInterface;
|
| using testing::MatchResultListener;
|
| @@ -39,6 +40,19 @@ GraphTest::GraphTest(int num_parameters) : graph_(zone()) {
|
| GraphTest::~GraphTest() {}
|
|
|
|
|
| +Matcher<Node*> GraphTest::IsAllocateHeapNumber(
|
| + const Matcher<Node*>& effect_matcher,
|
| + const Matcher<Node*>& control_matcher) {
|
| + return IsCall(
|
| + _, IsHeapConstant(PrintableUnique<HeapObject>::CreateImmovable(
|
| + zone(), CEntryStub(isolate(), 1).GetCode())),
|
| + IsExternalConstant(ExternalReference(
|
| + Runtime::FunctionForId(Runtime::kAllocateHeapNumber), isolate())),
|
| + IsInt32Constant(0), IsNumberConstant(0.0), effect_matcher,
|
| + control_matcher);
|
| +}
|
| +
|
| +
|
| namespace {
|
|
|
| template <typename T>
|
| @@ -567,6 +581,11 @@ Matcher<Node*> IsControlEffect(const Matcher<Node*>& control_matcher) {
|
| }
|
|
|
|
|
| +Matcher<Node*> IsValueEffect(const Matcher<Node*>& value_matcher) {
|
| + return MakeMatcher(new IsUnopMatcher(IrOpcode::kValueEffect, value_matcher));
|
| +}
|
| +
|
| +
|
| Matcher<Node*> IsFinish(const Matcher<Node*>& value_matcher,
|
| const Matcher<Node*>& effect_matcher) {
|
| return MakeMatcher(new IsFinishMatcher(value_matcher, effect_matcher));
|
| @@ -671,6 +690,7 @@ IS_BINOP_MATCHER(Int32AddWithOverflow)
|
| return MakeMatcher(new IsUnopMatcher(IrOpcode::k##Name, input_matcher)); \
|
| }
|
| IS_UNOP_MATCHER(ConvertInt64ToInt32)
|
| +IS_UNOP_MATCHER(ChangeFloat64ToInt32)
|
| IS_UNOP_MATCHER(ChangeInt32ToFloat64)
|
| #undef IS_UNOP_MATCHER
|
|
|
|
|