Index: src/property.h |
diff --git a/src/property.h b/src/property.h |
index aa851f1c88a468a68f3540f2ceee56a085dc2ff8..5abc69eebbf180f68d7397ece997bbce6d015f49 100644 |
--- a/src/property.h |
+++ b/src/property.h |
@@ -189,7 +189,7 @@ class LookupResult BASE_EMBEDDED { |
lookup_type_(NOT_FOUND), |
holder_(NULL), |
cacheable_(true), |
- details_(NONE, NORMAL) { |
+ details_(NONE, NONEXISTENT) { |
isolate->SetTopLookupResult(this); |
} |
@@ -237,6 +237,7 @@ class LookupResult BASE_EMBEDDED { |
void NotFound() { |
lookup_type_ = NOT_FOUND; |
+ details_ = PropertyDetails(NONE, NONEXISTENT); |
holder_ = NULL; |
} |
@@ -250,6 +251,7 @@ class LookupResult BASE_EMBEDDED { |
return JSProxy::cast(holder_); |
} |
+ |
PropertyType type() { |
ASSERT(IsFound()); |
return details_.type(); |
@@ -264,12 +266,18 @@ class LookupResult BASE_EMBEDDED { |
return details_; |
} |
+ bool IsFastPropertyType() { return type() != NORMAL; } |
danno
2012/06/21 14:34:30
Add asserts for (IsFound());
|
bool IsReadOnly() { return details_.IsReadOnly(); } |
+ bool IsCallbacks() { return details_.type() == CALLBACKS; } |
danno
2012/06/21 14:34:30
Add asserts for (IsFound());
|
bool IsDontDelete() { return details_.IsDontDelete(); } |
bool IsDontEnum() { return details_.IsDontEnum(); } |
bool IsDeleted() { return details_.IsDeleted(); } |
bool IsFound() { return lookup_type_ != NOT_FOUND; } |
bool IsHandler() { return lookup_type_ == HANDLER_TYPE; } |
+ bool IsInterceptor() { return lookup_type_ == INTERCEPTOR_TYPE; } |
+ bool IsField() { return details_.type() == FIELD; } |
danno
2012/06/21 14:34:30
Add asserts for (IsFound());
|
+ bool IsNormal() { return details_.type() == NORMAL; } |
danno
2012/06/21 14:34:30
Add asserts for (IsFound());
|
+ bool IsConstantFunction() { return details_.type() == CONSTANT_FUNCTION; } |
danno
2012/06/21 14:34:30
Add asserts for (IsFound());
|
// Is the result is a property excluding transitions and the null descriptor? |
bool IsProperty() { |
@@ -298,7 +306,6 @@ class LookupResult BASE_EMBEDDED { |
} |
} |
- |
Map* GetTransitionMap() { |
ASSERT(lookup_type_ == DESCRIPTOR_TYPE); |
ASSERT(type() == MAP_TRANSITION || |
@@ -314,13 +321,13 @@ class LookupResult BASE_EMBEDDED { |
int GetFieldIndex() { |
ASSERT(lookup_type_ == DESCRIPTOR_TYPE); |
- ASSERT(type() == FIELD); |
+ ASSERT(IsField()); |
return Descriptor::IndexFromValue(GetValue()); |
} |
int GetLocalFieldIndexFromMap(Map* map) { |
ASSERT(lookup_type_ == DESCRIPTOR_TYPE); |
- ASSERT(type() == FIELD); |
+ ASSERT(IsField()); |
return Descriptor::IndexFromValue( |
map->instance_descriptors()->GetValue(number_)) - |
map->inobject_properties(); |