| Index: src/property.h
|
| diff --git a/src/property.h b/src/property.h
|
| index 65d4a0d6d29705107a771ab842591c60600ce563..60a9b544deff24bfac8d8722b543b73af244b4ea 100644
|
| --- a/src/property.h
|
| +++ b/src/property.h
|
| @@ -245,14 +245,25 @@ class LookupResult BASE_EMBEDDED {
|
| // Tells whether the value needs to be loaded.
|
| bool IsLoaded() {
|
| if (lookup_type_ == DESCRIPTOR_TYPE || lookup_type_ == DICTIONARY_TYPE) {
|
| - Object* value = GetValue();
|
| - if (value->IsJSFunction()) {
|
| - return JSFunction::cast(value)->IsLoaded();
|
| - }
|
| + Object* target = GetLazyValue();
|
| + return !target->IsJSObject() || JSObject::cast(target)->IsLoaded();
|
| }
|
| return true;
|
| }
|
|
|
| + Object* GetLazyValue() {
|
| + switch (type()) {
|
| + case FIELD:
|
| + return holder()->FastPropertyAt(GetFieldIndex());
|
| + case NORMAL:
|
| + return holder()->property_dictionary()->ValueAt(GetDictionaryEntry());
|
| + case CONSTANT_FUNCTION:
|
| + return GetConstantFunction();
|
| + default:
|
| + return Smi::FromInt(0);
|
| + }
|
| + }
|
| +
|
| Map* GetTransitionMap() {
|
| ASSERT(lookup_type_ == DESCRIPTOR_TYPE);
|
| ASSERT(type() == MAP_TRANSITION);
|
|
|