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

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

Issue 8334028: Fix Runtime_ArrayConcat to handle FAST_DOUBLE_ELEMENTS (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 1 month 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/runtime.cc ('K') | « src/runtime.cc ('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 cfd47c7781203078ecf7a3892cfa9abbe8ff62fa..4790a618412f5755dddc3a5c4f584c50aef92101 100644
--- a/test/mjsunit/elements-kind.js
+++ b/test/mjsunit/elements-kind.js
@@ -305,5 +305,17 @@ if (support_smi_only_arrays) {
assertTrue(%HaveSameMap(e, f));
}
+// Test if Array.concat() works correctly with DOUBLE elements.
+if (support_smi_only_arrays) {
+ var a = [1, 2];
+ assertKind(elements_kind.fast_smi_only, a);
+ var b = [4.5, 5.5];
+ assertKind(elements_kind.fast_double, b);
+ var c = a.concat(b);
+ assertEquals([1, 2, 4.5, 5.5], c);
+ // TODO(1810): Change implementation so that we get DOUBLE elements here?
+ assertKind(elements_kind.fast, c);
+}
+
// Throw away type information in the ICs for next stress run.
gc();
« src/runtime.cc ('K') | « src/runtime.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698