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

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

Issue 1319983004: Refactor type collector testing macros. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix Created 5 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 | « no previous file | test/cctest/test-ast-expression-visitor.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 2dcc1dcae73ca67332ecf789ea9487aff7b4d371..7071717b9a1631ead825e074f2b2450b2009b893 100644
--- a/test/cctest/expression-type-collector-macros.h
+++ b/test/cctest/expression-type-collector-macros.h
@@ -14,17 +14,14 @@
CHECK_EQ(index, types.size()); \
}
-#define DEFAULT_TYPE Bounds::Unbounded(handles.main_zone())
-#define INT32_TYPE \
- Bounds(Type::Signed32(handles.main_zone()), \
- Type::Signed32(handles.main_zone()))
-
-#define CHECK_EXPR(ekind, type) \
- CHECK_LT(index, types.size()); \
- CHECK(strcmp(#ekind, types[index].kind) == 0); \
- CHECK_EQ(depth, types[index].depth); \
- CHECK(type.lower->Is(types[index].bounds.lower)); \
- CHECK(type.upper->Is(types[index].bounds.upper)); \
+#define DEFAULT_TYPE Bounds::Unbounded(zone)
titzer 2015/08/31 09:54:42 I think the zone would be unnecessary if we had a
bradn 2015/08/31 18:05:28 Done in other CL
+
+
+#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)); \
for (int j = (++depth, ++index, 0); j < 1 ? 1 : (--depth, 0); ++j)
#define CHECK_VAR(vname, type) \
@@ -33,4 +30,12 @@
types[index - 1].name->raw_data() + \
types[index - 1].name->byte_length()));
+#define CHECK_SKIP() \
+ { \
+ ++index; \
+ while (index < types.size() && types[index].depth > depth) { \
+ ++index; \
+ } \
+ }
+
#endif // V8_EXPRESSION_TYPE_COLLECTOR_MACROS_H_
« no previous file with comments | « no previous file | test/cctest/test-ast-expression-visitor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698