Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(509)

Unified Diff: test/mjsunit/allocation-site-info.js

Issue 18917003: A bug in AllocationSite::GetMode(from, to) meant that we didn't update (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Feedback addressed Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/objects-inl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « src/objects-inl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698