| 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 5154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5165 if (instr->hydrogen()->IsOldSpaceAllocation()) { | 5165 if (instr->hydrogen()->IsOldSpaceAllocation()) { |
| 5166 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation()); | 5166 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation()); |
| 5167 allocation_flags = static_cast<AllocationFlags>(flags | PRETENURE); | 5167 allocation_flags = static_cast<AllocationFlags>(flags | PRETENURE); |
| 5168 } | 5168 } |
| 5169 // If the allocation folding dominator allocate triggered a GC, allocation | 5169 // If the allocation folding dominator allocate triggered a GC, allocation |
| 5170 // happend in the runtime. We have to reset the top pointer to virtually | 5170 // happend in the runtime. We have to reset the top pointer to virtually |
| 5171 // undo the allocation. | 5171 // undo the allocation. |
| 5172 ExternalReference allocation_top = | 5172 ExternalReference allocation_top = |
| 5173 AllocationUtils::GetAllocationTopReference(isolate(), allocation_flags); | 5173 AllocationUtils::GetAllocationTopReference(isolate(), allocation_flags); |
| 5174 Register top_address = scratch0(); | 5174 Register top_address = scratch0(); |
| 5175 __ sub(r0, r0, Operand(kHeapObjectTag)); |
| 5175 __ mov(top_address, Operand(allocation_top)); | 5176 __ mov(top_address, Operand(allocation_top)); |
| 5176 __ str(r0, MemOperand(top_address)); | 5177 __ str(r0, MemOperand(top_address)); |
| 5178 __ add(r0, r0, Operand(kHeapObjectTag)); |
| 5177 } | 5179 } |
| 5178 } | 5180 } |
| 5179 | 5181 |
| 5180 void LCodeGen::DoFastAllocate(LFastAllocate* instr) { | 5182 void LCodeGen::DoFastAllocate(LFastAllocate* instr) { |
| 5181 DCHECK(instr->hydrogen()->IsAllocationFolded()); | 5183 DCHECK(instr->hydrogen()->IsAllocationFolded()); |
| 5182 DCHECK(!instr->hydrogen()->IsAllocationFoldingDominator()); | 5184 DCHECK(!instr->hydrogen()->IsAllocationFoldingDominator()); |
| 5183 Register result = ToRegister(instr->result()); | 5185 Register result = ToRegister(instr->result()); |
| 5184 Register scratch1 = ToRegister(instr->temp1()); | 5186 Register scratch1 = ToRegister(instr->temp1()); |
| 5185 Register scratch2 = ToRegister(instr->temp2()); | 5187 Register scratch2 = ToRegister(instr->temp2()); |
| 5186 | 5188 |
| (...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5558 __ ldr(result, FieldMemOperand(scratch, | 5560 __ ldr(result, FieldMemOperand(scratch, |
| 5559 FixedArray::kHeaderSize - kPointerSize)); | 5561 FixedArray::kHeaderSize - kPointerSize)); |
| 5560 __ bind(deferred->exit()); | 5562 __ bind(deferred->exit()); |
| 5561 __ bind(&done); | 5563 __ bind(&done); |
| 5562 } | 5564 } |
| 5563 | 5565 |
| 5564 #undef __ | 5566 #undef __ |
| 5565 | 5567 |
| 5566 } // namespace internal | 5568 } // namespace internal |
| 5567 } // namespace v8 | 5569 } // namespace v8 |
| OLD | NEW |