Commit 91dec1ad authored by rossberg@chromium.org's avatar rossberg@chromium.org

Shut up Windows and ASAN

TBR=dcarney@chromium.org
BUG=

Review URL: https://codereview.chromium.org/226883003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20575 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 19f924a2
...@@ -130,15 +130,13 @@ void ZoneTypeConfig::struct_shrink(Struct* structured, int length) { ...@@ -130,15 +130,13 @@ void ZoneTypeConfig::struct_shrink(Struct* structured, int length) {
// static // static
int ZoneTypeConfig::struct_tag(Struct* structured) { int ZoneTypeConfig::struct_tag(Struct* structured) {
int tag = reinterpret_cast<intptr_t>(structured[0]); return static_cast<int>(reinterpret_cast<intptr_t>(structured[0]));
return tag;
} }
// static // static
int ZoneTypeConfig::struct_length(Struct* structured) { int ZoneTypeConfig::struct_length(Struct* structured) {
int length = reinterpret_cast<intptr_t>(structured[1]); return static_cast<int>(reinterpret_cast<intptr_t>(structured[1]));
return length;
} }
......
...@@ -176,10 +176,10 @@ class Types { ...@@ -176,10 +176,10 @@ class Types {
// Testing auxiliaries (breaking the Type abstraction). // Testing auxiliaries (breaking the Type abstraction).
struct ZoneRep { struct ZoneRep {
struct Struct { int tag; int length; void* args[1]; }; typedef void* Struct;
static bool IsStruct(Type* t, int tag) { 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 IsBitset(Type* t) { return reinterpret_cast<intptr_t>(t) & 1; }
static bool IsClass(Type* t) { return IsStruct(t, 0); } static bool IsClass(Type* t) { return IsStruct(t, 0); }
...@@ -193,15 +193,17 @@ struct ZoneRep { ...@@ -193,15 +193,17 @@ struct ZoneRep {
return static_cast<int>(reinterpret_cast<intptr_t>(t) >> 1); return static_cast<int>(reinterpret_cast<intptr_t>(t) >> 1);
} }
static Map* AsClass(Type* t) { 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) { 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) { static Struct* AsUnion(Type* t) {
return AsStruct(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; } static Zone* ToRegion(Zone* zone, Isolate* isolate) { return zone; }
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment