Track all non-hole global constants.
authorverwaest@chromium.org <verwaest@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 22 Jul 2013 12:15:13 +0000 (12:15 +0000)
committerverwaest@chromium.org <verwaest@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 22 Jul 2013 12:15:13 +0000 (12:15 +0000)
R=mvstanton@chromium.org

Review URL: https://chromiumcodereview.appspot.com/19784004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15803 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/objects.cc

index 1967b13..0898700 100644 (file)
@@ -15918,10 +15918,9 @@ Type* PropertyCell::UpdateType(Handle<PropertyCell> cell,
                                Handle<Object> value) {
   Isolate* isolate = cell->GetIsolate();
   Handle<Type> old_type(cell->type(), isolate);
-  Handle<Type> new_type((value->IsSmi() || value->IsJSFunction() ||
-                         value->IsUndefined())
-                        ? Type::Constant(value, isolate)
-                        : Type::Any(), isolate);
+  Handle<Type> new_type(value->IsTheHole()
+                        ? Type::Any()
+                        : Type::Constant(value, isolate), isolate);
 
   if (new_type->Is(old_type)) {
     return *old_type;