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 5659 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5670 flags = static_cast<AllocationFlags>(flags | DOUBLE_ALIGNMENT); | 5670 flags = static_cast<AllocationFlags>(flags | DOUBLE_ALIGNMENT); |
5671 } | 5671 } |
5672 if (instr->size()->IsConstantOperand()) { | 5672 if (instr->size()->IsConstantOperand()) { |
5673 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); | 5673 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); |
5674 if (instr->hydrogen()->CanAllocateInOldPointerSpace()) { | 5674 if (instr->hydrogen()->CanAllocateInOldPointerSpace()) { |
5675 flags = static_cast<AllocationFlags>(flags | PRETENURE_OLD_POINTER_SPACE); | 5675 flags = static_cast<AllocationFlags>(flags | PRETENURE_OLD_POINTER_SPACE); |
5676 } | 5676 } |
5677 __ Allocate(size, result, scratch, scratch2, deferred->entry(), flags); | 5677 __ Allocate(size, result, scratch, scratch2, deferred->entry(), flags); |
5678 } else { | 5678 } else { |
5679 Register size = ToRegister(instr->size()); | 5679 Register size = ToRegister(instr->size()); |
5680 __ AllocateInNewSpace(size, | 5680 __ Allocate(size, |
5681 result, | 5681 result, |
5682 scratch, | 5682 scratch, |
5683 scratch2, | 5683 scratch2, |
5684 deferred->entry(), | 5684 deferred->entry(), |
5685 flags); | 5685 flags); |
5686 } | 5686 } |
5687 | 5687 |
5688 __ bind(deferred->exit()); | 5688 __ bind(deferred->exit()); |
5689 } | 5689 } |
5690 | 5690 |
5691 | 5691 |
5692 void LCodeGen::DoDeferredAllocate(LAllocate* instr) { | 5692 void LCodeGen::DoDeferredAllocate(LAllocate* instr) { |
5693 Register size = ToRegister(instr->size()); | 5693 Register size = ToRegister(instr->size()); |
5694 Register result = ToRegister(instr->result()); | 5694 Register result = ToRegister(instr->result()); |
5695 | 5695 |
(...skipping 701 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6397 __ sub(scratch, result, Operand(index, LSL, kPointerSizeLog2 - kSmiTagSize)); | 6397 __ sub(scratch, result, Operand(index, LSL, kPointerSizeLog2 - kSmiTagSize)); |
6398 __ ldr(result, FieldMemOperand(scratch, | 6398 __ ldr(result, FieldMemOperand(scratch, |
6399 FixedArray::kHeaderSize - kPointerSize)); | 6399 FixedArray::kHeaderSize - kPointerSize)); |
6400 __ bind(&done); | 6400 __ bind(&done); |
6401 } | 6401 } |
6402 | 6402 |
6403 | 6403 |
6404 #undef __ | 6404 #undef __ |
6405 | 6405 |
6406 } } // namespace v8::internal | 6406 } } // namespace v8::internal |
OLD | NEW |