Turn on allocation site pretenuring.
authormvstanton@chromium.org <mvstanton@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Fri, 10 Jan 2014 14:35:58 +0000 (14:35 +0000)
committermvstanton@chromium.org <mvstanton@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Fri, 10 Jan 2014 14:35:58 +0000 (14:35 +0000)
BUG=
R=mvstanton@chromium.org

Review URL: https://codereview.chromium.org/133883002

Patch from Hannes Payer <hpayer@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18542 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/flag-definitions.h
test/cctest/test-heap.cc

index 93adb62..bbad227 100644 (file)
@@ -220,7 +220,7 @@ DEFINE_bool(pretenuring, true, "allocate objects in old space")
 // TODO(hpayer): We will remove this flag as soon as we have pretenuring
 // support for specific allocation sites.
 DEFINE_bool(pretenuring_call_new, false, "pretenure call new")
-DEFINE_bool(allocation_site_pretenuring, false,
+DEFINE_bool(allocation_site_pretenuring, true,
             "pretenure with allocation sites")
 DEFINE_bool(trace_pretenuring, false,
             "trace pretenuring decisions of HAllocate instructions")
index d5fae58..dbdb0cc 100644 (file)
@@ -2240,7 +2240,7 @@ TEST(OptimizedPretenuringAllocationFoldingBlocks) {
   CcTest::heap()->SetNewSpaceHighPromotionModeActive(true);
 
   v8::Local<v8::Value> res = CompileRun(
-      "var number_elements = 3000;"
+      "var number_elements = 10000;"
       "var elements = new Array(number_elements);"
       "function DataObject() {"
       "  this.a = [{}];"
@@ -2349,7 +2349,7 @@ TEST(OptimizedPretenuringDoubleArrayProperties) {
       "var elements = new Array(number_elements);"
       "function f() {"
       "  for (var i = 0; i < number_elements; i++) {"
-      "    elements[i] = {a: 1.1, b: 2.2};"
+      "    elements[i] = {a: 1.1, b: 2.2, c: 3.3};"
       "  }"
       "  return elements[i - 1];"
       "};"