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

Unified Diff: test/cctest/test-types.cc

Issue 226883003: Shut up Windows and ASAN (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 8 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/types-inl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-types.cc
diff --git a/test/cctest/test-types.cc b/test/cctest/test-types.cc
index e45a1c7da2b72a63617db35279e59c2f0d2c745b..445a9e1a7f63fcb495c4ae4a81e7a38d1d4d404f 100644
--- a/test/cctest/test-types.cc
+++ b/test/cctest/test-types.cc
@@ -176,10 +176,10 @@ class Types {
// Testing auxiliaries (breaking the Type abstraction).
struct ZoneRep {
- struct Struct { int tag; int length; void* args[1]; };
+ typedef void* Struct;
static bool IsStruct(Type* t, int tag) {
- return !IsBitset(t) && AsStruct(t)->tag == tag;
+ return !IsBitset(t) && reinterpret_cast<intptr_t>(AsStruct(t)[0]) == tag;
}
static bool IsBitset(Type* t) { return reinterpret_cast<intptr_t>(t) & 1; }
static bool IsClass(Type* t) { return IsStruct(t, 0); }
@@ -193,15 +193,17 @@ struct ZoneRep {
return static_cast<int>(reinterpret_cast<intptr_t>(t) >> 1);
}
static Map* AsClass(Type* t) {
- return *static_cast<Map**>(AsStruct(t)->args[1]);
+ return *static_cast<Map**>(AsStruct(t)[3]);
}
static Object* AsConstant(Type* t) {
- return *static_cast<Object**>(AsStruct(t)->args[1]);
+ return *static_cast<Object**>(AsStruct(t)[3]);
}
static Struct* AsUnion(Type* t) {
return AsStruct(t);
}
- static int Length(Struct* structured) { return structured->length; }
+ static int Length(Struct* structured) {
+ return static_cast<int>(reinterpret_cast<intptr_t>(structured[1]));
+ }
static Zone* ToRegion(Zone* zone, Isolate* isolate) { return zone; }
};
« no previous file with comments | « src/types-inl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698