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

Unified Diff: test/mjsunit/regress/regress-1878.js

Issue 9402009: Initialize internal arrays with the correct map. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: . Created 8 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 | « 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/regress/regress-1878.js
diff --git a/test/mjsunit/regress/regress-1878.js b/test/mjsunit/regress/regress-1878.js
index 1b3c63aeb1ec56d1d3d223eb5b821fcb5d221065..baa385fd7c754b338e036842bcedb3945008c678 100644
--- a/test/mjsunit/regress/regress-1878.js
+++ b/test/mjsunit/regress/regress-1878.js
@@ -1,4 +1,4 @@
-// Copyright 2009 the V8 project authors. All rights reserved.
+// Copyright 2012 the V8 project authors. All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
@@ -30,5 +30,15 @@
// Flags: --allow-natives-syntax --expose_natives_as=natives
var a = Array();
-var ai = natives.InternalArray();
-assertFalse(%HaveSameMap(ai, a));
+
+for (var i = 0; i < 1000; i++) {
+ var ai = natives.InternalArray(10000);
+ assertFalse(%HaveSameMap(ai, a));
+ assertTrue(%HasFastElements(ai));
+}
+
+for (var i = 0; i < 1000; i++) {
+ var ai = new natives.InternalArray(10000);
+ assertFalse(%HaveSameMap(ai, a));
+ assertTrue(%HasFastElements(ai));
+}
« 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