| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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/arm64/lithium-codegen-arm64.h" | 5 #include "src/crankshaft/arm64/lithium-codegen-arm64.h" |
| 6 | 6 |
| 7 #include "src/arm64/frames-arm64.h" | 7 #include "src/arm64/frames-arm64.h" |
| 8 #include "src/base/bits.h" | 8 #include "src/base/bits.h" |
| 9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" |
| 10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
| (...skipping 1475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1486 if (instr->hydrogen()->IsOldSpaceAllocation()) { | 1486 if (instr->hydrogen()->IsOldSpaceAllocation()) { |
| 1487 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation()); | 1487 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation()); |
| 1488 allocation_flags = static_cast<AllocationFlags>(flags | PRETENURE); | 1488 allocation_flags = static_cast<AllocationFlags>(flags | PRETENURE); |
| 1489 } | 1489 } |
| 1490 // If the allocation folding dominator allocate triggered a GC, allocation | 1490 // If the allocation folding dominator allocate triggered a GC, allocation |
| 1491 // happend in the runtime. We have to reset the top pointer to virtually | 1491 // happend in the runtime. We have to reset the top pointer to virtually |
| 1492 // undo the allocation. | 1492 // undo the allocation. |
| 1493 ExternalReference allocation_top = | 1493 ExternalReference allocation_top = |
| 1494 AllocationUtils::GetAllocationTopReference(isolate(), allocation_flags); | 1494 AllocationUtils::GetAllocationTopReference(isolate(), allocation_flags); |
| 1495 Register top_address = x10; | 1495 Register top_address = x10; |
| 1496 __ Sub(x0, x0, Operand(kHeapObjectTag)); | |
| 1497 __ Mov(top_address, Operand(allocation_top)); | 1496 __ Mov(top_address, Operand(allocation_top)); |
| 1498 __ Str(x0, MemOperand(top_address)); | 1497 __ Str(x0, MemOperand(top_address)); |
| 1499 __ Add(x0, x0, Operand(kHeapObjectTag)); | |
| 1500 } | 1498 } |
| 1501 } | 1499 } |
| 1502 | 1500 |
| 1503 void LCodeGen::DoFastAllocate(LFastAllocate* instr) { | 1501 void LCodeGen::DoFastAllocate(LFastAllocate* instr) { |
| 1504 DCHECK(instr->hydrogen()->IsAllocationFolded()); | 1502 DCHECK(instr->hydrogen()->IsAllocationFolded()); |
| 1505 DCHECK(!instr->hydrogen()->IsAllocationFoldingDominator()); | 1503 DCHECK(!instr->hydrogen()->IsAllocationFoldingDominator()); |
| 1506 Register result = ToRegister(instr->result()); | 1504 Register result = ToRegister(instr->result()); |
| 1507 Register scratch1 = ToRegister(instr->temp1()); | 1505 Register scratch1 = ToRegister(instr->temp1()); |
| 1508 Register scratch2 = ToRegister(instr->temp2()); | 1506 Register scratch2 = ToRegister(instr->temp2()); |
| 1509 | 1507 |
| (...skipping 4229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5739 // Index is equal to negated out of object property index plus 1. | 5737 // Index is equal to negated out of object property index plus 1. |
| 5740 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); | 5738 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); |
| 5741 __ Ldr(result, FieldMemOperand(result, | 5739 __ Ldr(result, FieldMemOperand(result, |
| 5742 FixedArray::kHeaderSize - kPointerSize)); | 5740 FixedArray::kHeaderSize - kPointerSize)); |
| 5743 __ Bind(deferred->exit()); | 5741 __ Bind(deferred->exit()); |
| 5744 __ Bind(&done); | 5742 __ Bind(&done); |
| 5745 } | 5743 } |
| 5746 | 5744 |
| 5747 } // namespace internal | 5745 } // namespace internal |
| 5748 } // namespace v8 | 5746 } // namespace v8 |
| OLD | NEW |