Index: src/objects-inl.h |
diff --git a/src/objects-inl.h b/src/objects-inl.h |
index 4060969f1f0b991c5b01125136e2d8d536bca691..11bde9461baa0037ee5171e0ee564eb86b3992d0 100644 |
--- a/src/objects-inl.h |
+++ b/src/objects-inl.h |
@@ -119,6 +119,18 @@ PropertyDetails PropertyDetails::AsDeleted() { |
} |
+bool IsMoreGeneralElementsKindTransition(ElementsKind from_kind, |
+ ElementsKind to_kind) { |
+ if (to_kind == FAST_ELEMENTS) { |
+ return from_kind == FAST_SMI_ONLY_ELEMENTS || |
+ from_kind == FAST_DOUBLE_ELEMENTS; |
+ } else { |
+ return to_kind == FAST_DOUBLE_ELEMENTS && |
+ from_kind == FAST_SMI_ONLY_ELEMENTS; |
+ } |
+} |
+ |
+ |
bool Object::IsFixedArrayBase() { |
return IsFixedArray() || IsFixedDoubleArray(); |
} |