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

Unified Diff: src/objects.cc

Issue 19784004: Track all non-hole global constants. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 5 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index 1967b1324d48ac6c6a0e3f39eddf3503deae33a9..089870068f81aaeac6e727f0b99625692bca7085 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -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;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698