Chromium Code Reviews| Index: src/property.h |
| diff --git a/src/property.h b/src/property.h |
| index 6ec826c1406bef800b804a1557416d5d8881f89f..570dd108805839c14b2ec607fd60c0274bb7cad7 100644 |
| --- a/src/property.h |
| +++ b/src/property.h |
| @@ -236,12 +236,6 @@ class LookupResult BASE_EMBEDDED { |
| return details_.type() == CALLBACKS; |
| } |
| - // Is callbacks contains both property callbacks and transitions to callbacks. |
| - bool IsCallbacks() { |
| - return IsPropertyCallbacks() || |
| - (IsTransition() && GetTransitionValue()->IsAccessorPair()); |
| - } |
| - |
| bool IsReadOnly() { |
| ASSERT(IsFound()); |
| ASSERT(!IsTransition()); |
| @@ -299,11 +293,10 @@ class LookupResult BASE_EMBEDDED { |
| } |
| } |
| - Object* GetTransitionValue() { |
| + Map* GetTransitionTarget() { |
| ASSERT(IsTransition()); |
| TransitionArray* transitions = holder()->map()->transitions(); |
| - Object* value = transitions->GetValue(number_); |
| - return value; |
| + return transitions->GetTarget(number_); |
| } |
| PropertyDetails GetTransitionDetails(Map* map) { |
| @@ -327,7 +320,7 @@ class LookupResult BASE_EMBEDDED { |
| Map* GetTransitionMapFromMap(Map* map) { |
| ASSERT(IsTransition()); |
| - return Map::cast(map->transitions()->GetValue(number_)); |
| + return map->transitions()->GetTarget(number_); |
| } |
| int GetTransitionIndex() { |
| @@ -363,13 +356,11 @@ class LookupResult BASE_EMBEDDED { |
| } |
| Object* GetCallbackObject() { |
| - switch (lookup_type_) { |
| - case CONSTANT_TYPE: |
| - return HEAP->prototype_accessors(); |
| - case TRANSITION_TYPE: |
| - return GetTransitionValue(); |
| - default: |
| - return GetValue(); |
| + ASSERT(!IsTransition()); |
| + if (lookup_type_ == CONSTANT_TYPE) { |
| + return HEAP->prototype_accessors(); |
| + } else { |
| + return GetValue(); |
|
Sven Panne
2012/07/16 13:49:43
Can we put an ASSERT here about the lookup_type_?
|
| } |
| } |