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

Unified Diff: src/x64/lithium-codegen-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/lithium-codegen-x64.cc
diff --git a/src/x64/lithium-codegen-x64.cc b/src/x64/lithium-codegen-x64.cc
index 5c3324de064e2f59a5157d73488a3fbcf9798f16..d36b92d4c527d544a06fcccd396f294f95da896e 100644
--- a/src/x64/lithium-codegen-x64.cc
+++ b/src/x64/lithium-codegen-x64.cc
@@ -5012,12 +5012,8 @@ void LCodeGen::DoAllocateObject(LAllocateObject* instr) {
// the constructor's prototype changes, but instance size and property
// counts remain unchanged (if slack tracking finished).
ASSERT(!constructor->shared()->IsInobjectSlackTrackingInProgress());
- __ AllocateInNewSpace(instance_size,
- result,
- no_reg,
- scratch,
- deferred->entry(),
- TAG_OBJECT);
+ __ Allocate(instance_size, result, no_reg, scratch, deferred->entry(),
+ TAG_OBJECT, MacroAssembler::NEW_SPACE);
__ bind(deferred->exit());
if (FLAG_debug_code) {
@@ -5106,7 +5102,13 @@ void LCodeGen::DoAllocate(LAllocate* instr) {
}
if (instr->size()->IsConstantOperand()) {
int32_t size = ToInteger32(LConstantOperand::cast(instr->size()));
- __ AllocateInNewSpace(size, result, temp, no_reg, deferred->entry(), flags);
+ if (instr->hydrogen()->CanAllocateInOldPointerSpace()) {
+ __ Allocate(size, result, temp, no_reg, deferred->entry(), flags,
+ MacroAssembler::OLD_POINTER_SPACE);
+ } else {
+ __ Allocate(size, result, temp, no_reg, deferred->entry(), flags,
+ MacroAssembler::NEW_SPACE);
+ }
} else {
Register size = ToRegister(instr->size());
__ AllocateInNewSpace(size, result, temp, no_reg, deferred->entry(), flags);
@@ -5327,7 +5329,8 @@ void LCodeGen::DoFastLiteral(LFastLiteral* instr) {
// Allocate all objects that are part of the literal in one big
// allocation. This avoids multiple limit checks.
Label allocated, runtime_allocate;
- __ AllocateInNewSpace(size, rax, rcx, rdx, &runtime_allocate, TAG_OBJECT);
+ __ Allocate(size, rax, rcx, rdx, &runtime_allocate, TAG_OBJECT,
+ MacroAssembler::NEW_SPACE);
__ jmp(&allocated);
__ bind(&runtime_allocate);
@@ -5414,7 +5417,8 @@ void LCodeGen::DoRegExpLiteral(LRegExpLiteral* instr) {
__ bind(&materialized);
int size = JSRegExp::kSize + JSRegExp::kInObjectFieldCount * kPointerSize;
Label allocated, runtime_allocate;
- __ AllocateInNewSpace(size, rax, rcx, rdx, &runtime_allocate, TAG_OBJECT);
+ __ Allocate(size, rax, rcx, rdx, &runtime_allocate, TAG_OBJECT,
+ MacroAssembler::NEW_SPACE);
__ jmp(&allocated);
__ bind(&runtime_allocate);

Powered by Google App Engine
This is Rietveld 408576698