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

Unified Diff: test/mjsunit/array-splice.js

Issue 417953004: Revert 22595: "Keep new arrays allocated with 'new Array(N)' in fast mode" (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 5 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/array-feedback.js ('k') | test/mjsunit/array-unshift.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/array-splice.js
diff --git a/test/mjsunit/array-splice.js b/test/mjsunit/array-splice.js
index 03afac3ec4cdbe6795c8090e9262abbbd1204d48..be2b1064e6a12f49d00e713a42b126a4eb45c485 100644
--- a/test/mjsunit/array-splice.js
+++ b/test/mjsunit/array-splice.js
@@ -25,8 +25,6 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --allow-natives-syntax
-
// Check that splicing array of holes keeps it as array of holes
(function() {
for (var i = 0; i < 7; i++) {
@@ -359,9 +357,7 @@
(function() {
for (var i = 0; i < 7; i++) {
try {
- var a = %NormalizeElements([]);
- a.length = Math.pow(2, 32) - 3;
- a.splice(-1, 0, 1, 2, 3, 4, 5);
+ new Array(Math.pow(2, 32) - 3).splice(-1, 0, 1, 2, 3, 4, 5);
throw 'Should have thrown RangeError';
} catch (e) {
assertTrue(e instanceof RangeError);
@@ -369,8 +365,7 @@
// Check smi boundary
var bigNum = (1 << 30) - 3;
- var array = %NormalizeElements([]);
- array.length = bigNum;
+ var array = new Array(bigNum);
array.splice(-1, 0, 1, 2, 3, 4, 5, 6, 7);
assertEquals(bigNum + 7, array.length);
}
« no previous file with comments | « test/mjsunit/array-feedback.js ('k') | test/mjsunit/array-unshift.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698