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

Unified Diff: src/objects.cc

Issue 18751003: Calls to HCheckFunction can be eliminated if the value is an HConstant (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fixed two issues 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 | « src/hydrogen-instructions.cc ('k') | 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 2611b57aef1a6aae6f9efa3b137fab0a717d91c0..8147106aaab168b8bbfa825f92ee5c310ace1359 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -15836,7 +15836,8 @@ 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->IsUndefined())
+ Handle<Type> new_type((value->IsSmi() || value->IsJSFunction() ||
+ value->IsUndefined())
? Type::Constant(value, isolate)
: Type::Any(), isolate);
« no previous file with comments | « src/hydrogen-instructions.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698