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

Unified Diff: test/mjsunit/array-natives-elements.js

Issue 1725383002: [test] Rewrite mjsunit/array-natives-elements to make it pass with Crankshaft. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/array-natives-elements.js
diff --git a/test/mjsunit/array-natives-elements.js b/test/mjsunit/array-natives-elements.js
index bf884fca4740eebd84583792ce59a118d3117ebc..9898faac231cd56e2ecbc5865364e98fb7881fa7 100644
--- a/test/mjsunit/array-natives-elements.js
+++ b/test/mjsunit/array-natives-elements.js
@@ -30,6 +30,16 @@
// IC and Crankshaft support for smi-only elements in dynamic array literals.
function get(foo) { return foo; } // Used to generate dynamic values.
+// This code exists to eliminate the learning influence of AllocationSites
+// on the following tests.
+function make_array_string(literal) {
+ this.__sequence = this.__sequence + 1;
+ return "/* " + this.__sequence + " */ " + literal;
+}
+function make_array(literal) {
+ return eval(make_array_string(literal));
+}
+
var __sequence = 0;
function array_natives_test() {
@@ -40,16 +50,6 @@ function array_natives_test() {
assertTrue(%HasFastDoubleElements([1.1]));
assertTrue(%HasFastDoubleElements([1.1,2]));
- // This code exists to eliminate the learning influence of AllocationSites
- // on the following tests.
- function make_array_string(literal) {
- this.__sequence = this.__sequence + 1;
- return "/* " + this.__sequence + " */ " + literal;
- }
- function make_array(literal) {
- return eval(make_array_string(literal));
- }
-
// Push
var a0 = make_array("[1, 2, 3]");
assertTrue(%HasFastSmiElements(a0));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698