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 #if V8_TARGET_ARCH_IA32 | 5 #if V8_TARGET_ARCH_IA32 |
6 | 6 |
7 #include "src/crankshaft/ia32/lithium-codegen-ia32.h" | 7 #include "src/crankshaft/ia32/lithium-codegen-ia32.h" |
8 | 8 |
9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" |
(...skipping 4808 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4819 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation()); | 4819 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation()); |
4820 flags = static_cast<AllocationFlags>(flags | PRETENURE); | 4820 flags = static_cast<AllocationFlags>(flags | PRETENURE); |
4821 } | 4821 } |
4822 if (instr->hydrogen()->IsAllocationFoldingDominator()) { | 4822 if (instr->hydrogen()->IsAllocationFoldingDominator()) { |
4823 flags = static_cast<AllocationFlags>(flags | ALLOCATION_FOLDING_DOMINATOR); | 4823 flags = static_cast<AllocationFlags>(flags | ALLOCATION_FOLDING_DOMINATOR); |
4824 } | 4824 } |
4825 DCHECK(!instr->hydrogen()->IsAllocationFolded()); | 4825 DCHECK(!instr->hydrogen()->IsAllocationFolded()); |
4826 | 4826 |
4827 if (instr->size()->IsConstantOperand()) { | 4827 if (instr->size()->IsConstantOperand()) { |
4828 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); | 4828 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); |
4829 CHECK(size <= Page::kMaxRegularHeapObjectSize); | 4829 CHECK(size <= kMaxRegularHeapObjectSize); |
4830 __ Allocate(size, result, temp, no_reg, deferred->entry(), flags); | 4830 __ Allocate(size, result, temp, no_reg, deferred->entry(), flags); |
4831 } else { | 4831 } else { |
4832 Register size = ToRegister(instr->size()); | 4832 Register size = ToRegister(instr->size()); |
4833 __ Allocate(size, result, temp, no_reg, deferred->entry(), flags); | 4833 __ Allocate(size, result, temp, no_reg, deferred->entry(), flags); |
4834 } | 4834 } |
4835 | 4835 |
4836 __ bind(deferred->exit()); | 4836 __ bind(deferred->exit()); |
4837 | 4837 |
4838 if (instr->hydrogen()->MustPrefillWithFiller()) { | 4838 if (instr->hydrogen()->MustPrefillWithFiller()) { |
4839 if (instr->size()->IsConstantOperand()) { | 4839 if (instr->size()->IsConstantOperand()) { |
(...skipping 22 matching lines...) Expand all Loading... |
4862 AllocationFlags flags = ALLOCATION_FOLDED; | 4862 AllocationFlags flags = ALLOCATION_FOLDED; |
4863 if (instr->hydrogen()->MustAllocateDoubleAligned()) { | 4863 if (instr->hydrogen()->MustAllocateDoubleAligned()) { |
4864 flags = static_cast<AllocationFlags>(flags | DOUBLE_ALIGNMENT); | 4864 flags = static_cast<AllocationFlags>(flags | DOUBLE_ALIGNMENT); |
4865 } | 4865 } |
4866 if (instr->hydrogen()->IsOldSpaceAllocation()) { | 4866 if (instr->hydrogen()->IsOldSpaceAllocation()) { |
4867 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation()); | 4867 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation()); |
4868 flags = static_cast<AllocationFlags>(flags | PRETENURE); | 4868 flags = static_cast<AllocationFlags>(flags | PRETENURE); |
4869 } | 4869 } |
4870 if (instr->size()->IsConstantOperand()) { | 4870 if (instr->size()->IsConstantOperand()) { |
4871 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); | 4871 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); |
4872 CHECK(size <= Page::kMaxRegularHeapObjectSize); | 4872 CHECK(size <= kMaxRegularHeapObjectSize); |
4873 __ FastAllocate(size, result, temp, flags); | 4873 __ FastAllocate(size, result, temp, flags); |
4874 } else { | 4874 } else { |
4875 Register size = ToRegister(instr->size()); | 4875 Register size = ToRegister(instr->size()); |
4876 __ FastAllocate(size, result, temp, flags); | 4876 __ FastAllocate(size, result, temp, flags); |
4877 } | 4877 } |
4878 } | 4878 } |
4879 | 4879 |
4880 void LCodeGen::DoDeferredAllocate(LAllocate* instr) { | 4880 void LCodeGen::DoDeferredAllocate(LAllocate* instr) { |
4881 Register result = ToRegister(instr->result()); | 4881 Register result = ToRegister(instr->result()); |
4882 | 4882 |
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5281 __ bind(deferred->exit()); | 5281 __ bind(deferred->exit()); |
5282 __ bind(&done); | 5282 __ bind(&done); |
5283 } | 5283 } |
5284 | 5284 |
5285 #undef __ | 5285 #undef __ |
5286 | 5286 |
5287 } // namespace internal | 5287 } // namespace internal |
5288 } // namespace v8 | 5288 } // namespace v8 |
5289 | 5289 |
5290 #endif // V8_TARGET_ARCH_IA32 | 5290 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |