Index: src/objects-inl.h |
=================================================================== |
--- src/objects-inl.h (revision 2089) |
+++ src/objects-inl.h (working copy) |
@@ -2554,6 +2554,24 @@ |
} |
+Smi* JSObject::InterceptorPropertyLookupHint(String* name) { |
+ // TODO(antonm): do we want to do any shortcuts for global object? |
Kasper Lund
2009/06/02 18:27:16
do -> Do
|
+ if (HasFastProperties()) { |
+ LookupResult lookup; |
+ LocalLookupRealNamedProperty(name, &lookup); |
+ if (lookup.IsValid()) { |
+ if (lookup.type() == FIELD && lookup.IsCacheable()) { |
+ return Smi::FromInt(lookup.GetFieldIndex()); |
+ } |
+ } else { |
+ return Smi::FromInt(kLookupInPrototype); |
+ } |
+ } |
+ |
+ return Smi::FromInt(kLookupInHolder); |
+} |
+ |
+ |
bool AccessorInfo::all_can_read() { |
return BooleanBit::get(flag(), kAllCanReadBit); |
} |