Index: test/mjsunit/allocation-site-info.js |
diff --git a/test/mjsunit/allocation-site-info.js b/test/mjsunit/allocation-site-info.js |
index 72df772b0c11986940ec61b0f6e17ca5c0d951f7..b8b1076ff9f11450f18f6821c4514b63df9a5d6c 100644 |
--- a/test/mjsunit/allocation-site-info.js |
+++ b/test/mjsunit/allocation-site-info.js |
@@ -175,6 +175,20 @@ if (support_smi_only_arrays) { |
obj = fastliteralcase_smifast(2); |
assertKind(elements_kind.fast, obj); |
+ // Case: make sure transitions from packed to holey are tracked |
+ function fastliteralcase_smiholey(index, value) { |
+ var literal = [1, 2, 3, 4]; |
+ literal[index] = value; |
+ return literal; |
+ } |
+ |
+ obj = fastliteralcase_smiholey(5, 1); |
+ assertKind(elements_kind.fast_smi_only, obj); |
+ assertHoley(obj); |
+ obj = fastliteralcase_smiholey(0, 1); |
+ assertKind(elements_kind.fast_smi_only, obj); |
+ assertHoley(obj); |
+ |
function newarraycase_smidouble(value) { |
var a = new Array(); |
a[0] = value; |