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 #ifndef V8_CRANKSHAFT_LITHIUM_ALLOCATOR_H_ | 5 #ifndef V8_CRANKSHAFT_LITHIUM_ALLOCATOR_H_ |
6 #define V8_CRANKSHAFT_LITHIUM_ALLOCATOR_H_ | 6 #define V8_CRANKSHAFT_LITHIUM_ALLOCATOR_H_ |
7 | 7 |
8 #include "src/allocation.h" | 8 #include "src/allocation.h" |
9 #include "src/base/compiler-specific.h" | |
10 #include "src/crankshaft/compilation-phase.h" | 9 #include "src/crankshaft/compilation-phase.h" |
11 #include "src/crankshaft/lithium.h" | 10 #include "src/crankshaft/lithium.h" |
12 #include "src/zone.h" | 11 #include "src/zone.h" |
13 | 12 |
14 namespace v8 { | 13 namespace v8 { |
15 namespace internal { | 14 namespace internal { |
16 | 15 |
17 // Forward declarations. | 16 // Forward declarations. |
18 class HBasicBlock; | 17 class HBasicBlock; |
19 class HGraph; | 18 class HGraph; |
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
321 int spill_start_index_; | 320 int spill_start_index_; |
322 | 321 |
323 friend class LAllocator; // Assigns to kind_. | 322 friend class LAllocator; // Assigns to kind_. |
324 }; | 323 }; |
325 | 324 |
326 | 325 |
327 class LAllocator BASE_EMBEDDED { | 326 class LAllocator BASE_EMBEDDED { |
328 public: | 327 public: |
329 LAllocator(int first_virtual_register, HGraph* graph); | 328 LAllocator(int first_virtual_register, HGraph* graph); |
330 | 329 |
331 static PRINTF_FORMAT(1, 2) void TraceAlloc(const char* msg, ...); | 330 static void TraceAlloc(const char* msg, ...); |
332 | 331 |
333 // Checks whether the value of a given virtual register is tagged. | 332 // Checks whether the value of a given virtual register is tagged. |
334 bool HasTaggedValue(int virtual_register) const; | 333 bool HasTaggedValue(int virtual_register) const; |
335 | 334 |
336 // Returns the register kind required by the given virtual register. | 335 // Returns the register kind required by the given virtual register. |
337 RegisterKind RequiredRegisterKind(int virtual_register) const; | 336 RegisterKind RequiredRegisterKind(int virtual_register) const; |
338 | 337 |
339 bool Allocate(LChunk* chunk); | 338 bool Allocate(LChunk* chunk); |
340 | 339 |
341 const ZoneList<LiveRange*>* live_ranges() const { return &live_ranges_; } | 340 const ZoneList<LiveRange*>* live_ranges() const { return &live_ranges_; } |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
567 size_t allocator_zone_start_allocation_size_; | 566 size_t allocator_zone_start_allocation_size_; |
568 | 567 |
569 DISALLOW_COPY_AND_ASSIGN(LAllocatorPhase); | 568 DISALLOW_COPY_AND_ASSIGN(LAllocatorPhase); |
570 }; | 569 }; |
571 | 570 |
572 | 571 |
573 } // namespace internal | 572 } // namespace internal |
574 } // namespace v8 | 573 } // namespace v8 |
575 | 574 |
576 #endif // V8_CRANKSHAFT_LITHIUM_ALLOCATOR_H_ | 575 #endif // V8_CRANKSHAFT_LITHIUM_ALLOCATOR_H_ |
OLD | NEW |