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

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

Issue 2201073002: [turbofan] Adds speculative operator for bitwise and, or and xor. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Handles kSigned32 feedback. Created 4 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 | « test/unittests/compiler/js-typed-lowering-unittest.cc ('k') | test/unittests/compiler/node-test-utils.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.h
diff --git a/test/unittests/compiler/node-test-utils.h b/test/unittests/compiler/node-test-utils.h
index d3ae6ddd28ccbf323fccb49e34b3ac64d7b98a1b..97355a5d945237de935ce329a36c7cb3d3025ffe 100644
--- a/test/unittests/compiler/node-test-utils.h
+++ b/test/unittests/compiler/node-test-utils.h
@@ -34,6 +34,15 @@ class Node;
using ::testing::Matcher;
+#define SPECULATIVE_BINOPS(V) \
+ V(SpeculativeNumberAdd) \
+ V(SpeculativeNumberSubtract) \
+ V(SpeculativeNumberShiftLeft) \
+ V(SpeculativeNumberShiftRight) \
+ V(SpeculativeNumberShiftRightLogical) \
+ V(SpeculativeNumberBitwiseAnd) \
+ V(SpeculativeNumberBitwiseOr) \
+ V(SpeculativeNumberBitwiseXor)
Matcher<Node*> IsDead();
Matcher<Node*> IsEnd(const Matcher<Node*>& control0_matcher);
@@ -202,31 +211,16 @@ Matcher<Node*> IsNumberLessThan(const Matcher<Node*>& lhs_matcher,
const Matcher<Node*>& rhs_matcher);
Matcher<Node*> IsNumberAdd(const Matcher<Node*>& lhs_matcher,
const Matcher<Node*>& rhs_matcher);
-Matcher<Node*> IsSpeculativeNumberAdd(
- const Matcher<BinaryOperationHints::Hint>& hint_matcher,
- const Matcher<Node*>& lhs_matcher, const Matcher<Node*>& rhs_matcher,
- const Matcher<Node*>& effect_matcher,
- const Matcher<Node*>& control_matcher);
-Matcher<Node*> IsSpeculativeNumberSubtract(
- const Matcher<BinaryOperationHints::Hint>& hint_matcher,
- const Matcher<Node*>& lhs_matcher, const Matcher<Node*>& rhs_matcher,
- const Matcher<Node*>& effect_matcher,
- const Matcher<Node*>& control_matcher);
-Matcher<Node*> IsSpeculativeNumberShiftLeft(
- const Matcher<BinaryOperationHints::Hint>& hint_matcher,
- const Matcher<Node*>& lhs_matcher, const Matcher<Node*>& rhs_matcher,
- const Matcher<Node*>& effect_matcher,
- const Matcher<Node*>& control_matcher);
-Matcher<Node*> IsSpeculativeNumberShiftRight(
- const Matcher<BinaryOperationHints::Hint>& hint_matcher,
- const Matcher<Node*>& lhs_matcher, const Matcher<Node*>& rhs_matcher,
- const Matcher<Node*>& effect_matcher,
- const Matcher<Node*>& control_matcher);
-Matcher<Node*> IsSpeculativeNumberShiftRightLogical(
- const Matcher<BinaryOperationHints::Hint>& hint_matcher,
- const Matcher<Node*>& lhs_matcher, const Matcher<Node*>& rhs_matcher,
- const Matcher<Node*>& effect_matcher,
- const Matcher<Node*>& control_matcher);
+
+#define DECLARE_SPECULATIVE_BINOP_MATCHER(opcode) \
+ Matcher<Node*> Is##opcode( \
+ const Matcher<BinaryOperationHints::Hint>& hint_matcher, \
+ const Matcher<Node*>& lhs_matcher, const Matcher<Node*>& rhs_matcher, \
+ const Matcher<Node*>& effect_matcher, \
+ const Matcher<Node*>& control_matcher);
+SPECULATIVE_BINOPS(DECLARE_SPECULATIVE_BINOP_MATCHER);
+#undef DECLARE_SPECULATIVE_BINOP_MATCHER
+
Matcher<Node*> IsNumberSubtract(const Matcher<Node*>& lhs_matcher,
const Matcher<Node*>& rhs_matcher);
Matcher<Node*> IsNumberMultiply(const Matcher<Node*>& lhs_matcher,
« no previous file with comments | « test/unittests/compiler/js-typed-lowering-unittest.cc ('k') | test/unittests/compiler/node-test-utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698