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

Unified Diff: test/mjsunit/sparse-array-reverse.js

Issue 40290: Experimental: Merge 1395:1441 from bleeding_edge branch to the... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/global/
Patch Set: Created 11 years, 9 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 | « test/mjsunit/regexp-string-methods.js ('k') | test/mjsunit/try.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/sparse-array-reverse.js
===================================================================
--- test/mjsunit/sparse-array-reverse.js (revision 1441)
+++ test/mjsunit/sparse-array-reverse.js (working copy)
@@ -74,7 +74,15 @@
var to_delete = [];
- var a = new Array(size);
+ var a;
+ // Make sure we test both array-backed and hash-table backed
+ // arrays.
+ if (size < 1000) {
+ a = new Array(size);
+ } else {
+ a = new Array();
+ a.length = size;
+ }
var expected = '';
var expected_reversed = '';
« no previous file with comments | « test/mjsunit/regexp-string-methods.js ('k') | test/mjsunit/try.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698