Index: src/ic.cc |
=================================================================== |
--- src/ic.cc (revision 4423) |
+++ src/ic.cc (working copy) |
@@ -694,8 +694,8 @@ |
State state, |
Handle<Object> object, |
Handle<String> name) { |
- // Bail out if we didn't find a result. |
- if (!lookup->IsProperty() || !lookup->IsCacheable()) return; |
+ // Bail out if the result is not cachable. |
Erik Corry
2010/04/15 10:28:44
http://www.googlefight.com/index.php?lang=en_GB&wo
|
+ if (!lookup->IsCacheable()) return; |
// Loading properties from values is not common, so don't try to |
// deal with non-JS objects here. |
@@ -709,6 +709,9 @@ |
// Set the target to the pre monomorphic stub to delay |
// setting the monomorphic state. |
code = pre_monomorphic_stub(); |
+ } else if (!lookup->IsProperty()) { |
+ // Nonexistent property. The result is undefined. |
+ code = StubCache::ComputeLoadNonexistent(*name, *receiver); |
} else { |
// Compute monomorphic stub. |
switch (lookup->type()) { |