Index: src/lookup-inl.h |
diff --git a/src/lookup-inl.h b/src/lookup-inl.h |
index 022bf7d07b1619aa8dfefb5af0501bb7d14509ed..bb82f1e28315e4722df8d06c66e182e977548532 100644 |
--- a/src/lookup-inl.h |
+++ b/src/lookup-inl.h |
@@ -31,7 +31,8 @@ JSReceiver* LookupIterator::NextHolder(Map* map) { |
} |
-LookupIterator::State LookupIterator::LookupInHolder(Map* map) { |
+LookupIterator::State LookupIterator::LookupInHolder(Map* map, |
+ JSReceiver* holder) { |
STATIC_ASSERT(INTERCEPTOR == BEFORE_PROPERTY); |
DisallowHeapAllocation no_gc; |
switch (state_) { |
@@ -47,14 +48,35 @@ LookupIterator::State LookupIterator::LookupInHolder(Map* map) { |
case INTERCEPTOR: |
if (map->is_dictionary_map()) { |
property_encoding_ = DICTIONARY; |
+ if (holder == NULL) return UNKNOWN; |
+ NameDictionary* dict = JSObject::cast(holder)->property_dictionary(); |
+ number_ = dict->FindEntry(name_); |
+ if (number_ == NameDictionary::kNotFound) return NOT_FOUND; |
+ property_details_ = dict->DetailsAt(number_); |
+ if (holder->IsGlobalObject()) { |
+ if (property_details_.IsDeleted()) return NOT_FOUND; |
+ PropertyCell* cell = PropertyCell::cast(dict->ValueAt(number_)); |
+ if (cell->value()->IsTheHole()) return NOT_FOUND; |
+ } |
} else { |
DescriptorArray* descriptors = map->instance_descriptors(); |
number_ = descriptors->SearchWithCache(*name_, map); |
if (number_ == DescriptorArray::kNotFound) return NOT_FOUND; |
property_encoding_ = DESCRIPTOR; |
+ property_details_ = descriptors->GetDetails(number_); |
} |
- return PROPERTY; |
- case PROPERTY: |
+ has_property_ = true; |
+ switch (property_details_.type()) { |
+ case v8::internal::CONSTANT: |
+ case v8::internal::FIELD: |
+ case v8::internal::NORMAL: |
+ return DATA; |
+ case v8::internal::CALLBACKS: |
+ return ACCESSOR; |
+ } |
+ case ACCESSOR: |
+ case DATA: |
+ case UNKNOWN: |
return NOT_FOUND; |
case JSPROXY: |
case TRANSITION: |