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

Unified Diff: test/unittests/interpreter/interpreter-assembler-unittest.cc

Issue 2650273006: Make enabling of CSA verifier a build-time flag (Closed)
Patch Set: Fix tests Created 3 years, 11 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/flag-definitions.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/unittests/interpreter/interpreter-assembler-unittest.cc
diff --git a/test/unittests/interpreter/interpreter-assembler-unittest.cc b/test/unittests/interpreter/interpreter-assembler-unittest.cc
index 40f9a60c171ad60492256b7546c5233bc9815d9d..0d15343cb0bae1fe89d55680273029edd7d6b8b2 100644
--- a/test/unittests/interpreter/interpreter-assembler-unittest.cc
+++ b/test/unittests/interpreter/interpreter-assembler-unittest.cc
@@ -18,6 +18,14 @@ namespace internal {
using namespace compiler;
+#ifdef ENABLE_VERIFY_CSA
+#define IS_BITCAST_WORD_TO_TAGGED_SIGNED(x) IsBitcastWordToTaggedSigned(x)
+#define IS_BITCAST_TAGGED_TO_WORD(x) IsBitcastTaggedToWord(x)
+#else
+#define IS_BITCAST_WORD_TO_TAGGED_SIGNED(x) (x)
+#define IS_BITCAST_TAGGED_TO_WORD(x) (x)
+#endif
+
namespace interpreter {
InterpreterAssemblerTestState::InterpreterAssemblerTestState(
@@ -550,11 +558,12 @@ TARGET_TEST_F(InterpreterAssemblerTest, SmiTag) {
InterpreterAssemblerTestState state(this, bytecode);
InterpreterAssemblerForTest m(&state, bytecode);
Node* value = m.Int32Constant(44);
- EXPECT_THAT(m.SmiTag(value), IsBitcastWordToTaggedSigned(IsIntPtrConstant(
- static_cast<intptr_t>(44)
- << (kSmiShiftSize + kSmiTagSize))));
+ EXPECT_THAT(
+ m.SmiTag(value),
+ IS_BITCAST_WORD_TO_TAGGED_SIGNED(IsIntPtrConstant(
+ static_cast<intptr_t>(44) << (kSmiShiftSize + kSmiTagSize))));
EXPECT_THAT(m.SmiUntag(value),
- IsWordSar(IsBitcastTaggedToWord(value),
+ IsWordSar(IS_BITCAST_TAGGED_TO_WORD(value),
IsIntPtrConstant(kSmiShiftSize + kSmiTagSize)));
}
}
« no previous file with comments | « src/flag-definitions.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698