Revision: 20575
Author:   [email protected]
Date:     Tue Apr  8 11:13:26 2014 UTC
Log:      Shut up Windows and ASAN

[email protected]
BUG=

Review URL: https://codereview.chromium.org/226883003
http://code.google.com/p/v8/source/detail?r=20575

Modified:
 /branches/bleeding_edge/src/types-inl.h
 /branches/bleeding_edge/test/cctest/test-types.cc

=======================================
--- /branches/bleeding_edge/src/types-inl.h     Tue Apr  8 10:50:56 2014 UTC
+++ /branches/bleeding_edge/src/types-inl.h     Tue Apr  8 11:13:26 2014 UTC
@@ -130,15 +130,13 @@

 // static
 int ZoneTypeConfig::struct_tag(Struct* structured) {
-  int tag = reinterpret_cast<intptr_t>(structured[0]);
-  return tag;
+  return static_cast<int>(reinterpret_cast<intptr_t>(structured[0]));
 }


 // static
 int ZoneTypeConfig::struct_length(Struct* structured) {
-  int length = reinterpret_cast<intptr_t>(structured[1]);
-  return length;
+  return static_cast<int>(reinterpret_cast<intptr_t>(structured[1]));
 }


=======================================
--- /branches/bleeding_edge/test/cctest/test-types.cc Tue Apr 8 10:50:56 2014 UTC +++ /branches/bleeding_edge/test/cctest/test-types.cc Tue Apr 8 11:13:26 2014 UTC
@@ -176,10 +176,10 @@

 // 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 @@
     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; }
 };

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to