1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef V8_LITHIUM_ALLOCATOR_INL_H_
6 #define V8_LITHIUM_ALLOCATOR_INL_H_
8 #include "src/lithium-allocator.h"
10 #if V8_TARGET_ARCH_IA32
11 #include "src/ia32/lithium-ia32.h" // NOLINT
12 #elif V8_TARGET_ARCH_X64
13 #include "src/x64/lithium-x64.h" // NOLINT
14 #elif V8_TARGET_ARCH_ARM64
15 #include "src/arm64/lithium-arm64.h" // NOLINT
16 #elif V8_TARGET_ARCH_ARM
17 #include "src/arm/lithium-arm.h" // NOLINT
18 #elif V8_TARGET_ARCH_PPC
19 #include "src/ppc/lithium-ppc.h" // NOLINT
20 #elif V8_TARGET_ARCH_MIPS
21 #include "src/mips/lithium-mips.h" // NOLINT
22 #elif V8_TARGET_ARCH_MIPS64
23 #include "src/mips64/lithium-mips64.h" // NOLINT
24 #elif V8_TARGET_ARCH_X87
25 #include "src/x87/lithium-x87.h" // NOLINT
27 #error "Unknown architecture."
33 bool LAllocator::IsGapAt(int index) { return chunk_->IsGapAt(index); }
36 LInstruction* LAllocator::InstructionAt(int index) {
37 return chunk_->instructions()->at(index);
41 LGap* LAllocator::GapAt(int index) {
42 return chunk_->GetGapAt(index);
46 void LAllocator::SetLiveRangeAssignedRegister(LiveRange* range, int reg) {
47 if (range->Kind() == DOUBLE_REGISTERS) {
48 assigned_double_registers_->Add(reg);
50 DCHECK(range->Kind() == GENERAL_REGISTERS);
51 assigned_registers_->Add(reg);
53 range->set_assigned_register(reg, chunk()->zone());
57 } // namespace internal
60 #endif // V8_LITHIUM_ALLOCATOR_INL_H_