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

Unified Diff: src/x64/code-stubs-x64.cc

Issue 12314155: Allow direct allocation in old pointer space. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 10 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
Index: src/x64/code-stubs-x64.cc
diff --git a/src/x64/code-stubs-x64.cc b/src/x64/code-stubs-x64.cc
index f617c9583d7a3b8af699f57ff8916835324b09f2..7f932487cd19b327eb6ba8749fdec0a336f31cb0 100644
--- a/src/x64/code-stubs-x64.cc
+++ b/src/x64/code-stubs-x64.cc
@@ -102,7 +102,8 @@ void FastNewClosureStub::Generate(MacroAssembler* masm) {
Counters* counters = masm->isolate()->counters();
Label gc;
- __ AllocateInNewSpace(JSFunction::kSize, rax, rbx, rcx, &gc, TAG_OBJECT);
+ __ Allocate(JSFunction::kSize, rax, rbx, rcx, &gc, TAG_OBJECT,
+ MacroAssembler::NEW_SPACE);
__ IncrementCounter(counters->fast_new_closure_total(), 1);
@@ -236,8 +237,8 @@ void FastNewContextStub::Generate(MacroAssembler* masm) {
// Try to allocate the context in new space.
Label gc;
int length = slots_ + Context::MIN_CONTEXT_SLOTS;
- __ AllocateInNewSpace((length * kPointerSize) + FixedArray::kHeaderSize,
- rax, rbx, rcx, &gc, TAG_OBJECT);
+ __ Allocate((length * kPointerSize) + FixedArray::kHeaderSize,
+ rax, rbx, rcx, &gc, TAG_OBJECT, MacroAssembler::NEW_SPACE);
// Get the function from the stack.
__ movq(rcx, Operand(rsp, 1 * kPointerSize));
@@ -282,8 +283,8 @@ void FastNewBlockContextStub::Generate(MacroAssembler* masm) {
// Try to allocate the context in new space.
Label gc;
int length = slots_ + Context::MIN_CONTEXT_SLOTS;
- __ AllocateInNewSpace(FixedArray::SizeFor(length),
- rax, rbx, rcx, &gc, TAG_OBJECT);
+ __ Allocate(FixedArray::SizeFor(length),
+ rax, rbx, rcx, &gc, TAG_OBJECT, MacroAssembler::NEW_SPACE);
// Get the function from the stack.
__ movq(rcx, Operand(rsp, 1 * kPointerSize));
@@ -368,7 +369,8 @@ static void GenerateFastCloneShallowArrayCommon(
if (mode == FastCloneShallowArrayStub::CLONE_DOUBLE_ELEMENTS) {
flags = static_cast<AllocationFlags>(DOUBLE_ALIGNMENT | flags);
}
- __ AllocateInNewSpace(size, rax, rbx, rdx, fail, flags);
+ __ Allocate(size, rax, rbx, rdx, fail, flags,
+ MacroAssembler::NEW_SPACE);
if (allocation_site_mode == TRACK_ALLOCATION_SITE) {
__ LoadRoot(kScratchRegister, Heap::kAllocationSiteInfoMapRootIndex);
@@ -1278,12 +1280,8 @@ static void BinaryOpStub_GenerateFloatingPointCode(MacroAssembler* masm,
// Allocate heap number in new space.
// Not using AllocateHeapNumber macro in order to reuse
// already loaded heap_number_map.
- __ AllocateInNewSpace(HeapNumber::kSize,
- rax,
- rdx,
- no_reg,
- &allocation_failed,
- TAG_OBJECT);
+ __ Allocate(HeapNumber::kSize, rax, rdx, no_reg, &allocation_failed,
+ TAG_OBJECT, MacroAssembler::NEW_SPACE);
// Set the map.
__ AssertRootValue(heap_number_map,
Heap::kHeapNumberMapRootIndex,

Powered by Google App Engine
This is Rietveld 408576698