| Index: src/lithium-allocator.h
|
| ===================================================================
|
| --- src/lithium-allocator.h (revision 10595)
|
| +++ src/lithium-allocator.h (working copy)
|
| @@ -431,25 +431,14 @@
|
|
|
| static void TraceAlloc(const char* msg, ...);
|
|
|
| - // Lithium translation support.
|
| - // Record a use of an input operand in the current instruction.
|
| - void RecordUse(HValue* value, LUnallocated* operand);
|
| - // Record the definition of the output operand.
|
| - void RecordDefinition(HInstruction* instr, LUnallocated* operand);
|
| - // Record a temporary operand.
|
| - void RecordTemporary(LUnallocated* operand);
|
| -
|
| // Checks whether the value of a given virtual register is tagged.
|
| bool HasTaggedValue(int virtual_register) const;
|
|
|
| // Returns the register kind required by the given virtual register.
|
| RegisterKind RequiredRegisterKind(int virtual_register) const;
|
|
|
| - // Control max function size.
|
| - static int max_initial_value_ids();
|
| + bool Allocate(LChunk* chunk);
|
|
|
| - void Allocate(LChunk* chunk);
|
| -
|
| const ZoneList<LiveRange*>* live_ranges() const { return &live_ranges_; }
|
| const Vector<LiveRange*>* fixed_live_ranges() const {
|
| return &fixed_live_ranges_;
|
| @@ -461,6 +450,15 @@
|
| LChunk* chunk() const { return chunk_; }
|
| HGraph* graph() const { return graph_; }
|
|
|
| + int GetVirtualRegister() {
|
| + if (next_virtual_register_ > LUnallocated::kMaxVirtualRegisters) {
|
| + allocation_ok_ = false;
|
| + }
|
| + return next_virtual_register_++;
|
| + }
|
| +
|
| + bool AllocationOk() { return allocation_ok_; }
|
| +
|
| void MarkAsOsrEntry() {
|
| // There can be only one.
|
| ASSERT(!has_osr_entry_);
|
| @@ -533,7 +531,7 @@
|
| // Otherwise returns the live range that starts at pos and contains
|
| // all uses from the original range that follow pos. Uses at pos will
|
| // still be owned by the original range after splitting.
|
| - LiveRange* SplitAt(LiveRange* range, LifetimePosition pos);
|
| + LiveRange* SplitRangeAt(LiveRange* range, LifetimePosition pos);
|
|
|
| // Split the given range in a position from the interval [start, end].
|
| LiveRange* SplitBetween(LiveRange* range,
|
| @@ -591,6 +589,9 @@
|
|
|
| LChunk* chunk_;
|
|
|
| + // Indicates success or failure during register allocation.
|
| + bool allocation_ok_;
|
| +
|
| // During liveness analysis keep a mapping from block id to live_in sets
|
| // for blocks already analyzed.
|
| ZoneList<BitVector*> live_in_sets_;
|
|
|