R=ishell@chromium.org
TEST=mjsunit/allocation-folding
Review URL: https://codereview.chromium.org/
73563004
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17805
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
}
}
- if (new_dominator_size > Page::kMaxNonCodeHeapObjectSize) {
+ if (new_dominator_size > isolate()->heap()->MaxRegularSpaceAllocationSize()) {
if (FLAG_trace_allocation_folding) {
PrintF("#%d (%s) cannot fold into #%d (%s) due to size: %d\n",
id(), Mnemonic(), dominator_allocate->id(),
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();