Index: test/mjsunit/allocation-folding.js |
diff --git a/test/mjsunit/allocation-folding.js b/test/mjsunit/allocation-folding.js |
index ec07392f2c223687f3e6c4bcd6d0df8cabde59f4..a914b59ec9e27cec96aae34801ecb986c5a01c9e 100644 |
--- a/test/mjsunit/allocation-folding.js |
+++ b/test/mjsunit/allocation-folding.js |
@@ -100,3 +100,17 @@ gc(); |
assertEquals(result[1], 4); |
assertEquals(result2[1], 6); |
+ |
+// Test to exceed the Heap::MaxRegularSpaceAllocationSize limit but not |
+// the Page::kMaxNonCodeHeapObjectSize limit with allocation folding. |
+ |
+function boom() { |
+ var a1 = new Array(84632); |
+ var a2 = new Array(84632); |
+ var a3 = new Array(84632); |
+ return [ a1, a2, a3 ]; |
+} |
+ |
+boom(); boom(); boom(); |
+%OptimizeFunctionOnNextCall(boom); |
+boom(); |