| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |