| Index: src/transitions.h
|
| diff --git a/src/transitions.h b/src/transitions.h
|
| index 52a043ce096d837db9e49ef1a214d4591f78bf9c..b87b9730303aa32274885c2b6309cdc1679833e4 100644
|
| --- a/src/transitions.h
|
| +++ b/src/transitions.h
|
| @@ -91,7 +91,7 @@ class TransitionArray: public FixedArray {
|
|
|
| // Returns the number of transitions in the array.
|
| int number_of_transitions() {
|
| - if (IsSimpleTransition()) return 1;
|
| + ASSERT(length() >= kFirstIndex);
|
| int len = length();
|
| return len <= kFirstIndex ? 0 : (len - kFirstIndex) / kTransitionSize;
|
| }
|
| @@ -100,17 +100,11 @@ class TransitionArray: public FixedArray {
|
|
|
| // Allocate a new transition array with a single entry.
|
| static MUST_USE_RESULT MaybeObject* NewWith(
|
| - SimpleTransitionFlag flag,
|
| - String* key,
|
| + String* name,
|
| Map* target,
|
| JSGlobalPropertyCell* descriptor_pointer,
|
| Object* back_pointer);
|
|
|
| - static MUST_USE_RESULT MaybeObject* AllocateDescriptorsHolder(
|
| - JSGlobalPropertyCell* descriptor_pointer);
|
| -
|
| - MUST_USE_RESULT MaybeObject* ExtendToFullTransitionArray();
|
| -
|
| // Copy the transition array, inserting a new transition.
|
| // TODO(verwaest): This should not cause an existing transition to be
|
| // overwritten.
|
| @@ -129,10 +123,6 @@ class TransitionArray: public FixedArray {
|
| int number_of_transitions,
|
| JSGlobalPropertyCell* descriptors_cell);
|
|
|
| - bool IsDescriptorsHolder() { return length() == kDescriptorsHolderSize; }
|
| - bool IsSimpleTransition() { return length() == kSimpleTransitionSize; }
|
| - bool IsFullTransitionArray() { return length() >= kFirstIndex; }
|
| -
|
| // Casting.
|
| static inline TransitionArray* cast(Object* obj);
|
|
|
| @@ -141,30 +131,20 @@ class TransitionArray: public FixedArray {
|
|
|
| static const int kDescriptorsPointerIndex = 0;
|
| static const int kBackPointerStorageIndex = 1;
|
| - static const int kDescriptorsHolderSize = 2;
|
| -
|
| - // Layout for full transition arrays.
|
| static const int kElementsTransitionIndex = 2;
|
| static const int kPrototypeTransitionsIndex = 3;
|
| static const int kFirstIndex = 4;
|
|
|
| - // Layout for simple transition arrays.
|
| - static const int kSimpleTransitionTarget = 2;
|
| - static const int kSimpleTransitionSize = 3;
|
| - static const int kSimpleTransitionIndex = 0;
|
| - STATIC_ASSERT(kSimpleTransitionIndex != kNotFound);
|
| -
|
| + // Layout transition array header.
|
| static const int kDescriptorsPointerOffset = FixedArray::kHeaderSize;
|
| static const int kBackPointerStorageOffset = kDescriptorsPointerOffset +
|
| kPointerSize;
|
| -
|
| - // Layout for the full transition array header.
|
| static const int kElementsTransitionOffset = kBackPointerStorageOffset +
|
| kPointerSize;
|
| static const int kPrototypeTransitionsOffset = kElementsTransitionOffset +
|
| kPointerSize;
|
|
|
| - // Layout of map transition entries in full transition arrays.
|
| + // Layout of map transition.
|
| static const int kTransitionKey = 0;
|
| static const int kTransitionTarget = 1;
|
| static const int kTransitionSize = 2;
|
|
|