| Index: src/compiler/node-matchers.h
|
| diff --git a/src/compiler/node-matchers.h b/src/compiler/node-matchers.h
|
| index 3b34d07c08f921d112d8bf378b495ecd8ce9a027..136fa529cd3e99d3d0f301cfb2dbcc96f6e7730c 100644
|
| --- a/src/compiler/node-matchers.h
|
| +++ b/src/compiler/node-matchers.h
|
| @@ -6,6 +6,7 @@
|
| #define V8_COMPILER_NODE_MATCHERS_H_
|
|
|
| #include "src/compiler/common-operator.h"
|
| +#include "src/compiler/node.h"
|
|
|
| namespace v8 {
|
| namespace internal {
|
| @@ -92,6 +93,18 @@ struct FloatMatcher V8_FINAL : public ValueMatcher<T> {
|
| typedef FloatMatcher<double> Float64Matcher;
|
|
|
|
|
| +// A pattern matcher for heap object constants.
|
| +struct HeapObjectMatcher V8_FINAL
|
| + : public ValueMatcher<PrintableUnique<HeapObject> > {
|
| + explicit HeapObjectMatcher(Node* node)
|
| + : ValueMatcher<PrintableUnique<HeapObject> >(node) {}
|
| +
|
| + bool IsKnownGlobal(HeapObject* global) const {
|
| + return HasValue() && Value().IsKnownGlobal(global);
|
| + }
|
| +};
|
| +
|
| +
|
| // For shorter pattern matching code, this struct matches both the left and
|
| // right hand sides of a binary operation and can put constants on the right
|
| // if they appear on the left hand side of a commutative operation.
|
|
|