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

Unified Diff: test/mjsunit/elements-kind.js

Issue 11663005: Adapt Danno's Track Allocation Info idea to fast literals. When allocating a literal array, (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Always use in ICs, and moved feature behind a flag Created 8 years 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
« src/objects-printer.cc ('K') | « test/mjsunit/array-natives-elements.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/elements-kind.js
diff --git a/test/mjsunit/elements-kind.js b/test/mjsunit/elements-kind.js
index cf9c21605df62a84c9e843a762b67b06540dff5b..0f5389623fa3251a0c064c60456a985fd7fc66ab 100644
--- a/test/mjsunit/elements-kind.js
+++ b/test/mjsunit/elements-kind.js
@@ -229,8 +229,16 @@ if (support_smi_only_arrays) {
%OptimizeFunctionOnNextCall(convert_mixed);
smis = construct_smis();
doubles = construct_doubles();
- convert_mixed(smis, 1, elements_kind.fast);
- convert_mixed(doubles, 1, elements_kind.fast);
+ if (getKind(smis) == elements_kind.fast_smi_only) {
+ convert_mixed(smis, 1, elements_kind.fast);
+ // Test failure here. My change must have broken the assumption above, that
+ // the crankshafted convert_mixed() function will transition the doubles
+ // array to fast.
+ convert_mixed(doubles, 1, elements_kind.fast);
+ } else {
+ convert_mixed(smis, 1, elements_kind.fast);
+ convert_mixed(doubles, 1, elements_kind.fast);
+ }
assertTrue(%HaveSameMap(smis, doubles));
}
@@ -343,5 +351,25 @@ if (support_smi_only_arrays) {
assertKind(elements_kind.fast, c);
}
+/*
+if (support_smi_only_arrays) {
+ function create_array() {
+ var ar = [1,2,3];
+ return ar;
+ }
+
+ var a = create_array();
+ assertKind(elements_kind.fast_smi_only, a);
+ a[1] = 1;
+ assertKind(elements_kind.fast_smi_only, a);
+ a[1] = 1.5;
+ assertKind(elements_kind.fast_double, a);
+
+ // The boilerplate should have been pre-transitioned now.
+ var b = create_array();
+ assertKind(elements_kind.fast_double, b);
+}
+*/
+
// Throw away type information in the ICs for next stress run.
gc();
« src/objects-printer.cc ('K') | « test/mjsunit/array-natives-elements.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698