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

Side by Side Diff: src/ia32/lithium-codegen-ia32.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
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 6094 matching lines...) Expand 10 before | Expand all | Expand 10 after
6105 6105
6106 Register result = ToRegister(instr->result()); 6106 Register result = ToRegister(instr->result());
6107 Register temp = ToRegister(instr->temp()); 6107 Register temp = ToRegister(instr->temp());
6108 6108
6109 // Allocate memory for the object. 6109 // Allocate memory for the object.
6110 AllocationFlags flags = TAG_OBJECT; 6110 AllocationFlags flags = TAG_OBJECT;
6111 if (instr->hydrogen()->MustAllocateDoubleAligned()) { 6111 if (instr->hydrogen()->MustAllocateDoubleAligned()) {
6112 flags = static_cast<AllocationFlags>(flags | DOUBLE_ALIGNMENT); 6112 flags = static_cast<AllocationFlags>(flags | DOUBLE_ALIGNMENT);
6113 } 6113 }
6114 if (instr->hydrogen()->CanAllocateInOldPointerSpace()) { 6114 if (instr->hydrogen()->CanAllocateInOldPointerSpace()) {
6115 ASSERT(!instr->hydrogen()->CanAllocateInOldDataSpace());
6115 flags = static_cast<AllocationFlags>(flags | PRETENURE_OLD_POINTER_SPACE); 6116 flags = static_cast<AllocationFlags>(flags | PRETENURE_OLD_POINTER_SPACE);
6117 } else if (instr->hydrogen()->CanAllocateInOldDataSpace()) {
6118 flags = static_cast<AllocationFlags>(flags | PRETENURE_OLD_DATA_SPACE);
6116 } 6119 }
6120
6117 if (instr->size()->IsConstantOperand()) { 6121 if (instr->size()->IsConstantOperand()) {
6118 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); 6122 int32_t size = ToInteger32(LConstantOperand::cast(instr->size()));
6119 __ Allocate(size, result, temp, no_reg, deferred->entry(), flags); 6123 __ Allocate(size, result, temp, no_reg, deferred->entry(), flags);
6120 } else { 6124 } else {
6121 Register size = ToRegister(instr->size()); 6125 Register size = ToRegister(instr->size());
6122 __ Allocate(size, result, temp, no_reg, deferred->entry(), flags); 6126 __ Allocate(size, result, temp, no_reg, deferred->entry(), flags);
6123 } 6127 }
6124 6128
6125 __ bind(deferred->exit()); 6129 __ bind(deferred->exit());
6126 } 6130 }
(...skipping 12 matching lines...) Expand all
6139 Register size = ToRegister(instr->size()); 6143 Register size = ToRegister(instr->size());
6140 ASSERT(!size.is(result)); 6144 ASSERT(!size.is(result));
6141 __ SmiTag(ToRegister(instr->size())); 6145 __ SmiTag(ToRegister(instr->size()));
6142 __ push(size); 6146 __ push(size);
6143 } else { 6147 } else {
6144 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); 6148 int32_t size = ToInteger32(LConstantOperand::cast(instr->size()));
6145 __ push(Immediate(Smi::FromInt(size))); 6149 __ push(Immediate(Smi::FromInt(size)));
6146 } 6150 }
6147 6151
6148 if (instr->hydrogen()->CanAllocateInOldPointerSpace()) { 6152 if (instr->hydrogen()->CanAllocateInOldPointerSpace()) {
6153 ASSERT(!instr->hydrogen()->CanAllocateInOldDataSpace());
6149 CallRuntimeFromDeferred( 6154 CallRuntimeFromDeferred(
6150 Runtime::kAllocateInOldPointerSpace, 1, instr, instr->context()); 6155 Runtime::kAllocateInOldPointerSpace, 1, instr, instr->context());
6156 } else if (instr->hydrogen()->CanAllocateInOldDataSpace()) {
6157 CallRuntimeFromDeferred(
6158 Runtime::kAllocateInOldDataSpace, 1, instr, instr->context());
6151 } else { 6159 } else {
6152 CallRuntimeFromDeferred( 6160 CallRuntimeFromDeferred(
6153 Runtime::kAllocateInNewSpace, 1, instr, instr->context()); 6161 Runtime::kAllocateInNewSpace, 1, instr, instr->context());
6154 } 6162 }
6155 __ StoreToSafepointRegisterSlot(result, eax); 6163 __ StoreToSafepointRegisterSlot(result, eax);
6156 } 6164 }
6157 6165
6158 6166
6159 void LCodeGen::DoToFastProperties(LToFastProperties* instr) { 6167 void LCodeGen::DoToFastProperties(LToFastProperties* instr) {
6160 ASSERT(ToRegister(instr->value()).is(eax)); 6168 ASSERT(ToRegister(instr->value()).is(eax));
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after
6594 FixedArray::kHeaderSize - kPointerSize)); 6602 FixedArray::kHeaderSize - kPointerSize));
6595 __ bind(&done); 6603 __ bind(&done);
6596 } 6604 }
6597 6605
6598 6606
6599 #undef __ 6607 #undef __
6600 6608
6601 } } // namespace v8::internal 6609 } } // namespace v8::internal
6602 6610
6603 #endif // V8_TARGET_ARCH_IA32 6611 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | src/runtime.h » ('j') | src/runtime.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698