OLD | NEW |
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 5317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5328 | 5328 |
5329 Register result = ToRegister(instr->result()); | 5329 Register result = ToRegister(instr->result()); |
5330 Register scratch = ToRegister(instr->temp1()); | 5330 Register scratch = ToRegister(instr->temp1()); |
5331 Register scratch2 = ToRegister(instr->temp2()); | 5331 Register scratch2 = ToRegister(instr->temp2()); |
5332 | 5332 |
5333 // Allocate memory for the object. | 5333 // Allocate memory for the object. |
5334 AllocationFlags flags = TAG_OBJECT; | 5334 AllocationFlags flags = TAG_OBJECT; |
5335 if (instr->hydrogen()->MustAllocateDoubleAligned()) { | 5335 if (instr->hydrogen()->MustAllocateDoubleAligned()) { |
5336 flags = static_cast<AllocationFlags>(flags | DOUBLE_ALIGNMENT); | 5336 flags = static_cast<AllocationFlags>(flags | DOUBLE_ALIGNMENT); |
5337 } | 5337 } |
| 5338 if (instr->hydrogen()->CanAllocateInOldPointerSpace()) { |
| 5339 flags = static_cast<AllocationFlags>(flags | PRETENURE_OLD_POINTER_SPACE); |
| 5340 } |
5338 if (instr->size()->IsConstantOperand()) { | 5341 if (instr->size()->IsConstantOperand()) { |
5339 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); | 5342 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); |
5340 if (instr->hydrogen()->CanAllocateInOldPointerSpace()) { | |
5341 flags = static_cast<AllocationFlags>(flags | PRETENURE_OLD_POINTER_SPACE); | |
5342 } | |
5343 __ Allocate(size, result, scratch, scratch2, deferred->entry(), flags); | 5343 __ Allocate(size, result, scratch, scratch2, deferred->entry(), flags); |
5344 } else { | 5344 } else { |
5345 Register size = ToRegister(instr->size()); | 5345 Register size = ToRegister(instr->size()); |
5346 __ Allocate(size, | 5346 __ Allocate(size, |
5347 result, | 5347 result, |
5348 scratch, | 5348 scratch, |
5349 scratch2, | 5349 scratch2, |
5350 deferred->entry(), | 5350 deferred->entry(), |
5351 flags); | 5351 flags); |
5352 } | 5352 } |
(...skipping 746 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6099 __ Subu(scratch, result, scratch); | 6099 __ Subu(scratch, result, scratch); |
6100 __ lw(result, FieldMemOperand(scratch, | 6100 __ lw(result, FieldMemOperand(scratch, |
6101 FixedArray::kHeaderSize - kPointerSize)); | 6101 FixedArray::kHeaderSize - kPointerSize)); |
6102 __ bind(&done); | 6102 __ bind(&done); |
6103 } | 6103 } |
6104 | 6104 |
6105 | 6105 |
6106 #undef __ | 6106 #undef __ |
6107 | 6107 |
6108 } } // namespace v8::internal | 6108 } } // namespace v8::internal |
OLD | NEW |