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 1380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1391 flags = static_cast<AllocationFlags>(flags | PRETENURE); | 1391 flags = static_cast<AllocationFlags>(flags | PRETENURE); |
1392 } | 1392 } |
1393 | 1393 |
1394 if (instr->hydrogen()->IsAllocationFoldingDominator()) { | 1394 if (instr->hydrogen()->IsAllocationFoldingDominator()) { |
1395 flags = static_cast<AllocationFlags>(flags | ALLOCATION_FOLDING_DOMINATOR); | 1395 flags = static_cast<AllocationFlags>(flags | ALLOCATION_FOLDING_DOMINATOR); |
1396 } | 1396 } |
1397 DCHECK(!instr->hydrogen()->IsAllocationFolded()); | 1397 DCHECK(!instr->hydrogen()->IsAllocationFolded()); |
1398 | 1398 |
1399 if (instr->size()->IsConstantOperand()) { | 1399 if (instr->size()->IsConstantOperand()) { |
1400 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); | 1400 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); |
1401 CHECK(size <= Page::kMaxRegularHeapObjectSize); | 1401 CHECK(size <= kMaxRegularHeapObjectSize); |
1402 __ Allocate(size, result, temp1, temp2, deferred->entry(), flags); | 1402 __ Allocate(size, result, temp1, temp2, deferred->entry(), flags); |
1403 } else { | 1403 } else { |
1404 Register size = ToRegister32(instr->size()); | 1404 Register size = ToRegister32(instr->size()); |
1405 __ Sxtw(size.X(), size); | 1405 __ Sxtw(size.X(), size); |
1406 __ Allocate(size.X(), result, temp1, temp2, deferred->entry(), flags); | 1406 __ Allocate(size.X(), result, temp1, temp2, deferred->entry(), flags); |
1407 } | 1407 } |
1408 | 1408 |
1409 __ Bind(deferred->exit()); | 1409 __ Bind(deferred->exit()); |
1410 | 1410 |
1411 if (instr->hydrogen()->MustPrefillWithFiller()) { | 1411 if (instr->hydrogen()->MustPrefillWithFiller()) { |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1487 AllocationFlags flags = ALLOCATION_FOLDED; | 1487 AllocationFlags flags = ALLOCATION_FOLDED; |
1488 if (instr->hydrogen()->MustAllocateDoubleAligned()) { | 1488 if (instr->hydrogen()->MustAllocateDoubleAligned()) { |
1489 flags = static_cast<AllocationFlags>(flags | DOUBLE_ALIGNMENT); | 1489 flags = static_cast<AllocationFlags>(flags | DOUBLE_ALIGNMENT); |
1490 } | 1490 } |
1491 if (instr->hydrogen()->IsOldSpaceAllocation()) { | 1491 if (instr->hydrogen()->IsOldSpaceAllocation()) { |
1492 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation()); | 1492 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation()); |
1493 flags = static_cast<AllocationFlags>(flags | PRETENURE); | 1493 flags = static_cast<AllocationFlags>(flags | PRETENURE); |
1494 } | 1494 } |
1495 if (instr->size()->IsConstantOperand()) { | 1495 if (instr->size()->IsConstantOperand()) { |
1496 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); | 1496 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); |
1497 CHECK(size <= Page::kMaxRegularHeapObjectSize); | 1497 CHECK(size <= kMaxRegularHeapObjectSize); |
1498 __ FastAllocate(size, result, scratch1, scratch2, flags); | 1498 __ FastAllocate(size, result, scratch1, scratch2, flags); |
1499 } else { | 1499 } else { |
1500 Register size = ToRegister(instr->size()); | 1500 Register size = ToRegister(instr->size()); |
1501 __ FastAllocate(size, result, scratch1, scratch2, flags); | 1501 __ FastAllocate(size, result, scratch1, scratch2, flags); |
1502 } | 1502 } |
1503 } | 1503 } |
1504 | 1504 |
1505 | 1505 |
1506 void LCodeGen::DoApplyArguments(LApplyArguments* instr) { | 1506 void LCodeGen::DoApplyArguments(LApplyArguments* instr) { |
1507 Register receiver = ToRegister(instr->receiver()); | 1507 Register receiver = ToRegister(instr->receiver()); |
(...skipping 4186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5694 // Index is equal to negated out of object property index plus 1. | 5694 // Index is equal to negated out of object property index plus 1. |
5695 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); | 5695 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); |
5696 __ Ldr(result, FieldMemOperand(result, | 5696 __ Ldr(result, FieldMemOperand(result, |
5697 FixedArray::kHeaderSize - kPointerSize)); | 5697 FixedArray::kHeaderSize - kPointerSize)); |
5698 __ Bind(deferred->exit()); | 5698 __ Bind(deferred->exit()); |
5699 __ Bind(&done); | 5699 __ Bind(&done); |
5700 } | 5700 } |
5701 | 5701 |
5702 } // namespace internal | 5702 } // namespace internal |
5703 } // namespace v8 | 5703 } // namespace v8 |
OLD | NEW |