Use common allocation choke point in Heap::AllocateConstantPoolArray.
authormstarzinger@chromium.org <mstarzinger@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 23 Oct 2013 12:49:27 +0000 (12:49 +0000)
committermstarzinger@chromium.org <mstarzinger@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 23 Oct 2013 12:49:27 +0000 (12:49 +0000)
R=hpayer@chromium.org

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

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

src/heap.cc

index fd5504f..2e46048 100644 (file)
@@ -5520,9 +5520,10 @@ MaybeObject* Heap::AllocateConstantPoolArray(int number_of_int64_entries,
 #ifndef V8_HOST_ARCH_64_BIT
   size += kPointerSize;
 #endif
+  AllocationSpace space = SelectSpace(size, OLD_POINTER_SPACE, TENURED);
 
   HeapObject* object;
-  { MaybeObject* maybe_object = old_pointer_space_->AllocateRaw(size);
+  { MaybeObject* maybe_object = AllocateRaw(size, space, OLD_POINTER_SPACE);
     if (!maybe_object->To<HeapObject>(&object)) return maybe_object;
   }
   object = EnsureDoubleAligned(this, object, size);