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

Unified Diff: test/mjsunit/regress/regress-transition-elements-heap-verification.js

Issue 228643002: Make new space iterable when transitioning double array to objects (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Replace Smi(0) with one-map-filler Created 6 years, 8 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/x64/codegen-x64.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-transition-elements-heap-verification.js
diff --git a/test/mjsunit/regress/regress-transition-elements-heap-verification.js b/test/mjsunit/regress/regress-transition-elements-heap-verification.js
new file mode 100644
index 0000000000000000000000000000000000000000..8a5ba9585f02d40988b3293611ecc143e2c9fd5d
--- /dev/null
+++ b/test/mjsunit/regress/regress-transition-elements-heap-verification.js
@@ -0,0 +1,83 @@
+// Copyright 2014 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --expose-gc --allow-natives-syntax --verify-heap --stress-compaction
+
+%SetAllocationTimeout(1000000, 1000000);
+
+function classOf(object) {
+ var string = Object.prototype.toString.call(object);
+ return string.substring(8, string.length - 1);
+}
+
+function PrettyPrint() { }
+
+function fail() { }
+
+function deepEquals(a, b) {
+ if (a === b) return true;
+ var objectClass = classOf(a);
+ var objectClassB = classOf(b);
+ if (objectClass !== objectClassB) return false;
+}
+
+function assertEquals(expected, found, name_opt) {
+ deepEquals(found, expected);
+ fail(PrettyPrint());
+}
+
+function assertTrue(value, name_opt) { assertEquals(true, value, name_opt); }
+
+var __v_3 = {};
+
+assertEquals(true, true);
+
+Object.prototype.__defineGetter__(0, function() { } );
+var __v_9 = { };
+
+function __f_11(obj) {
+ if (%HasFastObjectElements(obj)) return __v_9.dummy2;
+ assertTrue(true);
+}
+
+function __f_10(expected, obj) {
+ assertEquals(true, __f_11(obj));
+}
+
+var __sequence = undefined + 1;
+
+function __f_12() {
+ this.__sequence = this.__sequence + 1;
+ return eval("/* " + this.__sequence + " */ [-5, 3, 9];");
+}
+
+function __f_15() {
+ var __v_8 = __f_12();
+ __v_8[0] = 0;
+ __f_10(__v_9.dummy1, __v_3);
+ return __v_8;
+}
+
+function __f_9() {
+ var __v_8 = __f_15();
+ __v_8[0] = 1.5;
+ __f_10("", __v_8);
+ return __v_8;
+}
+
+function __f_8(array, value, kind) {
+ array[1] = value;
+ __f_10("", array);
+ assertEquals(true, array[1]);
+}
+
+gc();
+%SetAllocationTimeout(100000, 150);
+
+function __f_14() {
+ __f_8(__f_15(), 1.5);
+ __f_8(__f_9(), "x");
+}
+
+__f_14();
« no previous file with comments | « src/x64/codegen-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698