Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(23)

Unified Diff: src/compiler/node-matchers.h

Issue 479793004: [turbofan] Initial import of SimplifiedOperatorReducer. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/graph-reducer.h ('k') | src/compiler/simplified-operator-reducer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « src/compiler/graph-reducer.h ('k') | src/compiler/simplified-operator-reducer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698