#include "src/compiler/node-matchers.h"
#include "src/compiler/common-operator.h"
#include "src/compiler/graph.h"
#include "src/compiler/machine-operator.h"
#include "src/compiler/node.h"
#include "test/unittests/compiler/graph-unittest.h"
#include "test/unittests/test-utils.h"
namespace v8 {
namespace internal {
namespace compiler {
class NodeMatcherTest : public GraphTest { … };
namespace {
template <class Matcher>
void CheckBaseWithIndexAndDisplacement(
Matcher* matcher, Node* index, int scale, Node* base, Node* displacement,
DisplacementMode displacement_mode = kPositiveDisplacement) { … }
}
#define ADD_ADDRESSING_OPERAND_USES(node) …
#define ADD_NONE_ADDRESSING_OPERAND_USES(node) …
TEST_F(NodeMatcherTest, ScaledWithOffset32Matcher) { … }
TEST_F(NodeMatcherTest, ScaledWithOffset64Matcher) { … }
TEST_F(NodeMatcherTest, BranchMatcher_match) { … }
TEST_F(NodeMatcherTest, BranchMatcher_fail) { … }
TEST_F(NodeMatcherTest, DiamondMatcher_match) { … }
TEST_F(NodeMatcherTest, DiamondMatcher_fail) { … }
}
}
}