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