Index: src/ast.cc |
diff --git a/src/ast.cc b/src/ast.cc |
index 7d7a5b247d81920785e4d08c6d7a94fe78ee7e40..e8b065c4ea10b3615c43b0e0acf9badfa716822a 100644 |
--- a/src/ast.cc |
+++ b/src/ast.cc |
@@ -509,6 +509,11 @@ bool Call::ComputeTarget(Handle<Map> type, Handle<String> name) { |
} |
LookupResult lookup(type->GetIsolate()); |
while (true) { |
+ // If a dictionary map is found in the prototype chain before the actual |
+ // target, a new target can always appear. In that case, bail out. |
+ // TODO(verwaest): Alternatively a runtime negative lookup on the normal |
+ // receiver or prototype could be added. |
+ if (type->is_dictionary_map()) return false; |
type->LookupDescriptor(NULL, *name, &lookup); |
if (lookup.IsFound()) { |
switch (lookup.type()) { |
@@ -534,7 +539,6 @@ bool Call::ComputeTarget(Handle<Map> type, Handle<String> name) { |
if (!type->prototype()->IsJSObject()) return false; |
// Go up the prototype chain, recording where we are currently. |
holder_ = Handle<JSObject>(JSObject::cast(type->prototype())); |
- if (!holder_->HasFastProperties()) return false; |
type = Handle<Map>(holder()->map()); |
} |
} |