Revision: 20423
Author:   [email protected]
Date:     Wed Apr  2 07:01:43 2014 UTC
Log:      Add unhandlified versions of Of() and NowOf().

[email protected]

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

Modified:
 /branches/bleeding_edge/src/types.cc
 /branches/bleeding_edge/src/types.h
 /branches/bleeding_edge/src/typing.cc

=======================================
--- /branches/bleeding_edge/src/types.cc        Tue Apr  1 13:11:12 2014 UTC
+++ /branches/bleeding_edge/src/types.cc        Wed Apr  2 07:01:43 2014 UTC
@@ -249,13 +249,13 @@
 // Most precise _current_ type of a value (usually its class).
 template<class Config>
 typename TypeImpl<Config>::TypeHandle TypeImpl<Config>::NowOf(
-    i::Handle<i::Object> value, Region* region) {
+    i::Object* value, Region* region) {
   if (value->IsSmi() ||
- i::HeapObject::cast(*value)->map()->instance_type() == HEAP_NUMBER_TYPE || - i::HeapObject::cast(*value)->map()->instance_type() == ODDBALL_TYPE) { + i::HeapObject::cast(value)->map()->instance_type() == HEAP_NUMBER_TYPE ||
+      i::HeapObject::cast(value)->map()->instance_type() == ODDBALL_TYPE) {
     return Of(value, region);
   }
-  return Class(i::handle(i::HeapObject::cast(*value)->map()), region);
+  return Class(i::handle(i::HeapObject::cast(value)->map()), region);
 }


=======================================
--- /branches/bleeding_edge/src/types.h Tue Apr  1 13:11:12 2014 UTC
+++ /branches/bleeding_edge/src/types.h Wed Apr  2 07:01:43 2014 UTC
@@ -213,8 +213,11 @@
   static TypeHandle Union(TypeHandle type1, TypeHandle type2, Region* reg);
static TypeHandle Intersect(TypeHandle type1, TypeHandle type2, Region* reg);

+  static TypeHandle Of(i::Object* value, Region* region) {
+    return Config::from_bitset(LubBitset(value), region);
+  }
   static TypeHandle Of(i::Handle<i::Object> value, Region* region) {
-    return Config::from_bitset(LubBitset(*value), region);
+    return Of(*value, region);
   }

   bool Is(TypeImpl* that) { return this == that || this->SlowIs(that); }
@@ -231,7 +234,10 @@

   // State-dependent versions of Of and Is that consider subtyping between
   // a constant and its map class.
-  static TypeHandle NowOf(i::Handle<i::Object> value, Region* region);
+  static TypeHandle NowOf(i::Object* value, Region* region);
+  static TypeHandle NowOf(i::Handle<i::Object> value, Region* region) {
+    return NowOf(*value, region);
+  }
   bool NowIs(TypeImpl* that);
   template<class TypeHandle>
   bool NowIs(TypeHandle that)  { return this->NowIs(*that); }
=======================================
--- /branches/bleeding_edge/src/typing.cc       Tue Apr  1 13:11:12 2014 UTC
+++ /branches/bleeding_edge/src/typing.cc       Wed Apr  2 07:01:43 2014 UTC
@@ -83,7 +83,7 @@


 Effect AstTyper::ObservedOnStack(Object* value) {
-  Type* lower = Type::NowOf(handle(value, isolate()), zone());
+  Type* lower = Type::NowOf(value, zone());
   return Effect(Bounds(lower, Type::Any(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