Index: src/elements-kind.cc |
diff --git a/src/elements-kind.cc b/src/elements-kind.cc |
index 07d2837bdc86ca747d1e4468887f6bfa6b049dfd..0d29c3047238cbcfe6b0df71b196441686fa3e48 100644 |
--- a/src/elements-kind.cc |
+++ b/src/elements-kind.cc |
@@ -15,26 +15,17 @@ namespace internal { |
int ElementsKindToShiftSize(ElementsKind elements_kind) { |
switch (elements_kind) { |
- case EXTERNAL_INT8_ELEMENTS: |
- case EXTERNAL_UINT8_CLAMPED_ELEMENTS: |
- case EXTERNAL_UINT8_ELEMENTS: |
case UINT8_ELEMENTS: |
case INT8_ELEMENTS: |
case UINT8_CLAMPED_ELEMENTS: |
return 0; |
- case EXTERNAL_INT16_ELEMENTS: |
- case EXTERNAL_UINT16_ELEMENTS: |
case UINT16_ELEMENTS: |
case INT16_ELEMENTS: |
return 1; |
- case EXTERNAL_INT32_ELEMENTS: |
- case EXTERNAL_UINT32_ELEMENTS: |
- case EXTERNAL_FLOAT32_ELEMENTS: |
case UINT32_ELEMENTS: |
case INT32_ELEMENTS: |
case FLOAT32_ELEMENTS: |
return 2; |
- case EXTERNAL_FLOAT64_ELEMENTS: |
case FAST_DOUBLE_ELEMENTS: |
case FAST_HOLEY_DOUBLE_ELEMENTS: |
case FLOAT64_ELEMENTS: |
@@ -53,16 +44,10 @@ int ElementsKindToShiftSize(ElementsKind elements_kind) { |
} |
-static bool IsTypedArrayElementsKind(ElementsKind elements_kind) { |
- return IsFixedTypedArrayElementsKind(elements_kind) || |
- IsExternalArrayElementsKind(elements_kind); |
-} |
- |
- |
int GetDefaultHeaderSizeForElementsKind(ElementsKind elements_kind) { |
STATIC_ASSERT(FixedArray::kHeaderSize == FixedDoubleArray::kHeaderSize); |
- if (IsTypedArrayElementsKind(elements_kind)) { |
+ if (IsFixedTypedArrayElementsKind(elements_kind)) { |
return 0; |
} else { |
return FixedArray::kHeaderSize - kHeapObjectTag; |
@@ -125,17 +110,8 @@ int GetSequenceIndexFromFastElementsKind(ElementsKind elements_kind) { |
ElementsKind GetNextTransitionElementsKind(ElementsKind kind) { |
- switch (kind) { |
-#define FIXED_TYPED_ARRAY_CASE(Type, type, TYPE, ctype, size) \ |
- case TYPE##_ELEMENTS: return EXTERNAL_##TYPE##_ELEMENTS; |
- |
- TYPED_ARRAYS(FIXED_TYPED_ARRAY_CASE) |
-#undef FIXED_TYPED_ARRAY_CASE |
- default: { |
- int index = GetSequenceIndexFromFastElementsKind(kind); |
- return GetFastElementsKindFromSequenceIndex(index + 1); |
- } |
- } |
+ int index = GetSequenceIndexFromFastElementsKind(kind); |
+ return GetFastElementsKindFromSequenceIndex(index + 1); |
} |
@@ -146,18 +122,9 @@ static inline bool IsFastTransitionTarget(ElementsKind elements_kind) { |
bool IsMoreGeneralElementsKindTransition(ElementsKind from_kind, |
ElementsKind to_kind) { |
- if (IsTypedArrayElementsKind(from_kind) || |
- IsTypedArrayElementsKind(to_kind)) { |
- switch (from_kind) { |
-#define FIXED_TYPED_ARRAY_CASE(Type, type, TYPE, ctype, size) \ |
- case TYPE##_ELEMENTS: \ |
- return to_kind == EXTERNAL_##TYPE##_ELEMENTS; |
- |
- TYPED_ARRAYS(FIXED_TYPED_ARRAY_CASE); |
-#undef FIXED_TYPED_ARRAY_CASE |
- default: |
- return false; |
- } |
+ if (IsFixedTypedArrayElementsKind(from_kind) || |
+ IsFixedTypedArrayElementsKind(to_kind)) { |
+ return false; |
} |
if (IsFastElementsKind(from_kind) && IsFastTransitionTarget(to_kind)) { |
switch (from_kind) { |