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

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

Issue 8430036: Fix Array.{splice,slice} to set proper ElementsKind of result (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
« no previous file with comments | « src/builtins.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..a86202e0fbc85f0dc2cba946c8cd87e342b65fdb 100644
--- a/test/mjsunit/elements-kind.js
+++ b/test/mjsunit/elements-kind.js
@@ -305,5 +305,15 @@ if (support_smi_only_arrays) {
assertTrue(%HaveSameMap(e, f));
}
+// Test that Array.splice() and Array.slice() return correct ElementsKinds.
+if (support_smi_only_arrays) {
+ var a = ["foo", "bar"];
+ assertKind(elements_kind.fast, a);
+ var b = a.splice(0, 1);
+ assertKind(elements_kind.fast, b);
+ var c = a.slice(0, 1);
+ assertKind(elements_kind.fast, c);
+}
+
// Throw away type information in the ICs for next stress run.
gc();
« no previous file with comments | « src/builtins.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698