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

Unified Diff: test/unittests/compiler/node-test-utils.cc

Issue 1022783002: [turbofan] Remove last_use_ field from Node. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 9 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 | « test/unittests/compiler/node-properties-unittest.cc ('k') | test/unittests/compiler/node-unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/unittests/compiler/node-test-utils.cc
diff --git a/test/unittests/compiler/node-test-utils.cc b/test/unittests/compiler/node-test-utils.cc
index 17d0999cf08789a5cb7effc0011cbc38f5802a61..5c4f81dd6896f17b8d55ee198ef635731fdd378f 100644
--- a/test/unittests/compiler/node-test-utils.cc
+++ b/test/unittests/compiler/node-test-utils.cc
@@ -543,11 +543,23 @@ class IsEffectSetMatcher FINAL : public NodeMatcher {
}
bool MatchAndExplain(Node* node, MatchResultListener* listener) const FINAL {
- return (NodeMatcher::MatchAndExplain(node, listener) &&
- PrintMatchAndExplain(NodeProperties::GetEffectInput(node, 0),
- "effect0", effect0_matcher_, listener) &&
- PrintMatchAndExplain(NodeProperties::GetEffectInput(node, 1),
- "effect1", effect1_matcher_, listener));
+ if (!NodeMatcher::MatchAndExplain(node, listener)) return false;
+
+ Node* effect0 = NodeProperties::GetEffectInput(node, 0);
+ Node* effect1 = NodeProperties::GetEffectInput(node, 1);
+
+ {
+ // Try matching in the reverse order first.
+ StringMatchResultListener value_listener;
+ if (effect0_matcher_.MatchAndExplain(effect1, &value_listener) &&
+ effect1_matcher_.MatchAndExplain(effect0, &value_listener)) {
+ return true;
+ }
+ }
+
+ return PrintMatchAndExplain(effect0, "effect0", effect0_matcher_,
+ listener) &&
+ PrintMatchAndExplain(effect1, "effect1", effect1_matcher_, listener);
}
private:
« no previous file with comments | « test/unittests/compiler/node-properties-unittest.cc ('k') | test/unittests/compiler/node-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698