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

Side by Side Diff: src/x64/lithium-codegen-x64.cc

Issue 16099004: Added old data space allocation infrastructure for pretenuring. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« src/runtime.cc ('K') | « src/serialize.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 5179 matching lines...) Expand 10 before | Expand all | Expand 10 after
5190 5190
5191 Register result = ToRegister(instr->result()); 5191 Register result = ToRegister(instr->result());
5192 Register temp = ToRegister(instr->temp()); 5192 Register temp = ToRegister(instr->temp());
5193 5193
5194 // Allocate memory for the object. 5194 // Allocate memory for the object.
5195 AllocationFlags flags = TAG_OBJECT; 5195 AllocationFlags flags = TAG_OBJECT;
5196 if (instr->hydrogen()->MustAllocateDoubleAligned()) { 5196 if (instr->hydrogen()->MustAllocateDoubleAligned()) {
5197 flags = static_cast<AllocationFlags>(flags | DOUBLE_ALIGNMENT); 5197 flags = static_cast<AllocationFlags>(flags | DOUBLE_ALIGNMENT);
5198 } 5198 }
5199 if (instr->hydrogen()->CanAllocateInOldPointerSpace()) { 5199 if (instr->hydrogen()->CanAllocateInOldPointerSpace()) {
5200 ASSERT(!instr->hydrogen()->CanAllocateInOldDataSpace());
5200 flags = static_cast<AllocationFlags>(flags | PRETENURE_OLD_POINTER_SPACE); 5201 flags = static_cast<AllocationFlags>(flags | PRETENURE_OLD_POINTER_SPACE);
5202 } else if (instr->hydrogen()->CanAllocateInOldDataSpace()) {
5203 flags = static_cast<AllocationFlags>(flags | PRETENURE_OLD_DATA_SPACE);
5201 } 5204 }
5205
5202 if (instr->size()->IsConstantOperand()) { 5206 if (instr->size()->IsConstantOperand()) {
5203 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); 5207 int32_t size = ToInteger32(LConstantOperand::cast(instr->size()));
5204 __ Allocate(size, result, temp, no_reg, deferred->entry(), flags); 5208 __ Allocate(size, result, temp, no_reg, deferred->entry(), flags);
5205 } else { 5209 } else {
5206 Register size = ToRegister(instr->size()); 5210 Register size = ToRegister(instr->size());
5207 __ Allocate(size, result, temp, no_reg, deferred->entry(), flags); 5211 __ Allocate(size, result, temp, no_reg, deferred->entry(), flags);
5208 } 5212 }
5209 5213
5210 __ bind(deferred->exit()); 5214 __ bind(deferred->exit());
5211 } 5215 }
(...skipping 12 matching lines...) Expand all
5224 Register size = ToRegister(instr->size()); 5228 Register size = ToRegister(instr->size());
5225 ASSERT(!size.is(result)); 5229 ASSERT(!size.is(result));
5226 __ Integer32ToSmi(size, size); 5230 __ Integer32ToSmi(size, size);
5227 __ push(size); 5231 __ push(size);
5228 } else { 5232 } else {
5229 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); 5233 int32_t size = ToInteger32(LConstantOperand::cast(instr->size()));
5230 __ Push(Smi::FromInt(size)); 5234 __ Push(Smi::FromInt(size));
5231 } 5235 }
5232 5236
5233 if (instr->hydrogen()->CanAllocateInOldPointerSpace()) { 5237 if (instr->hydrogen()->CanAllocateInOldPointerSpace()) {
5234 CallRuntimeFromDeferred( 5238 ASSERT(!instr->hydrogen()->CanAllocateInOldDataSpace());
5235 Runtime::kAllocateInOldPointerSpace, 1, instr); 5239 CallRuntimeFromDeferred(Runtime::kAllocateInOldPointerSpace, 1, instr);
5240 } else if (instr->hydrogen()->CanAllocateInOldDataSpace()) {
5241 CallRuntimeFromDeferred(Runtime::kAllocateInOldDataSpace, 1, instr);
5236 } else { 5242 } else {
5237 CallRuntimeFromDeferred( 5243 CallRuntimeFromDeferred(Runtime::kAllocateInNewSpace, 1, instr);
5238 Runtime::kAllocateInNewSpace, 1, instr);
5239 } 5244 }
5240 __ StoreToSafepointRegisterSlot(result, rax); 5245 __ StoreToSafepointRegisterSlot(result, rax);
5241 } 5246 }
5242 5247
5243 5248
5244 void LCodeGen::DoToFastProperties(LToFastProperties* instr) { 5249 void LCodeGen::DoToFastProperties(LToFastProperties* instr) {
5245 ASSERT(ToRegister(instr->value()).is(rax)); 5250 ASSERT(ToRegister(instr->value()).is(rax));
5246 __ push(rax); 5251 __ push(rax);
5247 CallRuntime(Runtime::kToFastProperties, 1, instr); 5252 CallRuntime(Runtime::kToFastProperties, 1, instr);
5248 } 5253 }
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after
5690 FixedArray::kHeaderSize - kPointerSize)); 5695 FixedArray::kHeaderSize - kPointerSize));
5691 __ bind(&done); 5696 __ bind(&done);
5692 } 5697 }
5693 5698
5694 5699
5695 #undef __ 5700 #undef __
5696 5701
5697 } } // namespace v8::internal 5702 } } // namespace v8::internal
5698 5703
5699 #endif // V8_TARGET_ARCH_X64 5704 #endif // V8_TARGET_ARCH_X64
OLDNEW
« src/runtime.cc ('K') | « src/serialize.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698