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

Unified Diff: test/cctest/expression-type-collector-macros.h

Issue 1471073003: Make typing-asm match spec more closely around load/store, add more tests. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: revised Created 5 years, 1 month 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/typing-asm.cc ('k') | test/cctest/test-asm-validator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/expression-type-collector-macros.h
diff --git a/test/cctest/expression-type-collector-macros.h b/test/cctest/expression-type-collector-macros.h
index 0b739f40b720e8554f730cecb2b2f5b0e731cc45..68d69481d9c58e83dc7437920376d368709287d3 100644
--- a/test/cctest/expression-type-collector-macros.h
+++ b/test/cctest/expression-type-collector-macros.h
@@ -14,11 +14,30 @@
CHECK_EQ(index, types.size()); \
}
+#ifdef DEBUG
+#define CHECK_TYPE(type) \
+ if (!types[index].bounds.Narrows(type)) { \
+ fprintf(stderr, "Expected:\n"); \
+ fprintf(stderr, " lower: "); \
+ type.lower->Print(); \
+ fprintf(stderr, " upper: "); \
+ type.upper->Print(); \
+ fprintf(stderr, "Actual:\n"); \
+ fprintf(stderr, " lower: "); \
+ types[index].bounds.lower->Print(); \
+ fprintf(stderr, " upper: "); \
+ types[index].bounds.upper->Print(); \
+ } \
+ CHECK(types[index].bounds.Narrows(type));
+#else
+#define CHECK_TYPE(type) CHECK(types[index].bounds.Narrows(type));
+#endif
+
#define CHECK_EXPR(ekind, type) \
CHECK_LT(index, types.size()); \
CHECK(strcmp(#ekind, types[index].kind) == 0); \
CHECK_EQ(depth, types[index].depth); \
- CHECK(types[index].bounds.Narrows(type)); \
+ CHECK_TYPE(type); \
for (int j = (++depth, ++index, 0); j < 1 ? 1 : (--depth, 0); ++j)
#define CHECK_VAR(vname, type) \
« no previous file with comments | « src/typing-asm.cc ('k') | test/cctest/test-asm-validator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698