| Index: src/compiler/node-matchers.h
|
| diff --git a/src/compiler/node-matchers.h b/src/compiler/node-matchers.h
|
| index 37d0e1a561b5e0446c976581dea81f242a0b626a..8a98d24c6c9b2793aeeef2d65eb9e6630e727bb1 100644
|
| --- a/src/compiler/node-matchers.h
|
| +++ b/src/compiler/node-matchers.h
|
| @@ -105,6 +105,32 @@ inline ValueMatcher<uint64_t, IrOpcode::kInt64Constant>::ValueMatcher(
|
| }
|
| }
|
|
|
| +template <>
|
| +inline ValueMatcher<
|
| + uint32_t, IrOpcode::kRelocatableInt32Constant>::ValueMatcher(Node* node)
|
| + : NodeMatcher(node),
|
| + value_(),
|
| + has_value_(opcode() == IrOpcode::kInt32Constant ||
|
| + opcode() == IrOpcode::kRelocatableInt32Constant) {
|
| + if (has_value_) {
|
| + value_ = static_cast<uint32_t>(OpParameter<int32_t>(node));
|
| + }
|
| +}
|
| +
|
| +template <>
|
| +inline ValueMatcher<
|
| + uint64_t, IrOpcode::kRelocatableInt64Constant>::ValueMatcher(Node* node)
|
| + : NodeMatcher(node), value_(), has_value_(false) {
|
| + if (opcode() == IrOpcode::kInt32Constant ||
|
| + opcode() == IrOpcode::kRelocatableInt32Constant) {
|
| + value_ = static_cast<uint32_t>(OpParameter<int32_t>(node));
|
| + has_value_ = true;
|
| + } else if (opcode() == IrOpcode::kInt64Constant ||
|
| + opcode() == IrOpcode::kRelocatableInt64Constant) {
|
| + value_ = static_cast<uint64_t>(OpParameter<int64_t>(node));
|
| + has_value_ = true;
|
| + }
|
| +}
|
|
|
| // A pattern matcher for integer constants.
|
| template <typename T, IrOpcode::Value kOpcode>
|
| @@ -132,14 +158,20 @@ struct IntMatcher final : public ValueMatcher<T, kOpcode> {
|
|
|
| typedef IntMatcher<int32_t, IrOpcode::kInt32Constant> Int32Matcher;
|
| typedef IntMatcher<uint32_t, IrOpcode::kInt32Constant> Uint32Matcher;
|
| +typedef IntMatcher<uint32_t, IrOpcode::kRelocatableInt32Constant>
|
| + RelocatableInt32Matcher;
|
| typedef IntMatcher<int64_t, IrOpcode::kInt64Constant> Int64Matcher;
|
| typedef IntMatcher<uint64_t, IrOpcode::kInt64Constant> Uint64Matcher;
|
| +typedef IntMatcher<uint64_t, IrOpcode::kRelocatableInt64Constant>
|
| + RelocatableInt64Matcher;
|
| #if V8_HOST_ARCH_32_BIT
|
| typedef Int32Matcher IntPtrMatcher;
|
| typedef Uint32Matcher UintPtrMatcher;
|
| +typedef RelocatableInt32Matcher PtrMatcher;
|
| #else
|
| typedef Int64Matcher IntPtrMatcher;
|
| typedef Uint64Matcher UintPtrMatcher;
|
| +typedef RelocatableInt64Matcher PtrMatcher;
|
| #endif
|
|
|
|
|
|
|