Index: src/elements-kind.cc |
diff --git a/src/elements-kind.cc b/src/elements-kind.cc |
index 758b80ddbdeaaf3a86af3d5d632fbf50bb6cefca..07d2837bdc86ca747d1e4468887f6bfa6b049dfd 100644 |
--- a/src/elements-kind.cc |
+++ b/src/elements-kind.cc |
@@ -53,13 +53,17 @@ 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 (IsExternalArrayElementsKind(elements_kind)) { |
+ if (IsTypedArrayElementsKind(elements_kind)) { |
return 0; |
- } else if (IsFixedTypedArrayElementsKind(elements_kind)) { |
- return FixedTypedArrayBase::kDataOffset - kHeapObjectTag; |
} else { |
return FixedArray::kHeaderSize - kHeapObjectTag; |
} |
@@ -135,12 +139,6 @@ ElementsKind GetNextTransitionElementsKind(ElementsKind kind) { |
} |
-static bool IsTypedArrayElementsKind(ElementsKind elements_kind) { |
- return IsFixedTypedArrayElementsKind(elements_kind) || |
- IsExternalArrayElementsKind(elements_kind); |
-} |
- |
- |
static inline bool IsFastTransitionTarget(ElementsKind elements_kind) { |
return IsFastElementsKind(elements_kind) || |
elements_kind == DICTIONARY_ELEMENTS; |