OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/crankshaft/arm/lithium-codegen-arm.h" | 5 #include "src/crankshaft/arm/lithium-codegen-arm.h" |
6 | 6 |
7 #include "src/base/bits.h" | 7 #include "src/base/bits.h" |
8 #include "src/code-factory.h" | 8 #include "src/code-factory.h" |
9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
10 #include "src/crankshaft/arm/lithium-gap-resolver-arm.h" | 10 #include "src/crankshaft/arm/lithium-gap-resolver-arm.h" |
(...skipping 5144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5155 if (instr->hydrogen()->IsOldSpaceAllocation()) { | 5155 if (instr->hydrogen()->IsOldSpaceAllocation()) { |
5156 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation()); | 5156 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation()); |
5157 allocation_flags = static_cast<AllocationFlags>(flags | PRETENURE); | 5157 allocation_flags = static_cast<AllocationFlags>(flags | PRETENURE); |
5158 } | 5158 } |
5159 // If the allocation folding dominator allocate triggered a GC, allocation | 5159 // If the allocation folding dominator allocate triggered a GC, allocation |
5160 // happend in the runtime. We have to reset the top pointer to virtually | 5160 // happend in the runtime. We have to reset the top pointer to virtually |
5161 // undo the allocation. | 5161 // undo the allocation. |
5162 ExternalReference allocation_top = | 5162 ExternalReference allocation_top = |
5163 AllocationUtils::GetAllocationTopReference(isolate(), allocation_flags); | 5163 AllocationUtils::GetAllocationTopReference(isolate(), allocation_flags); |
5164 Register top_address = scratch0(); | 5164 Register top_address = scratch0(); |
5165 __ sub(r0, r0, Operand(kHeapObjectTag)); | |
5166 __ mov(top_address, Operand(allocation_top)); | 5165 __ mov(top_address, Operand(allocation_top)); |
5167 __ str(r0, MemOperand(top_address)); | 5166 __ str(r0, MemOperand(top_address)); |
5168 __ add(r0, r0, Operand(kHeapObjectTag)); | |
5169 } | 5167 } |
5170 } | 5168 } |
5171 | 5169 |
5172 void LCodeGen::DoFastAllocate(LFastAllocate* instr) { | 5170 void LCodeGen::DoFastAllocate(LFastAllocate* instr) { |
5173 DCHECK(instr->hydrogen()->IsAllocationFolded()); | 5171 DCHECK(instr->hydrogen()->IsAllocationFolded()); |
5174 DCHECK(!instr->hydrogen()->IsAllocationFoldingDominator()); | 5172 DCHECK(!instr->hydrogen()->IsAllocationFoldingDominator()); |
5175 Register result = ToRegister(instr->result()); | 5173 Register result = ToRegister(instr->result()); |
5176 Register scratch1 = ToRegister(instr->temp1()); | 5174 Register scratch1 = ToRegister(instr->temp1()); |
5177 Register scratch2 = ToRegister(instr->temp2()); | 5175 Register scratch2 = ToRegister(instr->temp2()); |
5178 | 5176 |
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5550 __ ldr(result, FieldMemOperand(scratch, | 5548 __ ldr(result, FieldMemOperand(scratch, |
5551 FixedArray::kHeaderSize - kPointerSize)); | 5549 FixedArray::kHeaderSize - kPointerSize)); |
5552 __ bind(deferred->exit()); | 5550 __ bind(deferred->exit()); |
5553 __ bind(&done); | 5551 __ bind(&done); |
5554 } | 5552 } |
5555 | 5553 |
5556 #undef __ | 5554 #undef __ |
5557 | 5555 |
5558 } // namespace internal | 5556 } // namespace internal |
5559 } // namespace v8 | 5557 } // namespace v8 |
OLD | NEW |