| Index: src/lithium-allocator.cc
|
| ===================================================================
|
| --- src/lithium-allocator.cc (revision 7031)
|
| +++ src/lithium-allocator.cc (working copy)
|
| @@ -483,11 +483,6 @@
|
| }
|
|
|
|
|
| -UsePosition* LiveRange::AddUsePosition(LifetimePosition pos) {
|
| - return AddUsePosition(pos, CreateAssignedOperand());
|
| -}
|
| -
|
| -
|
| bool LiveRange::CanCover(LifetimePosition position) const {
|
| if (IsEmpty()) return false;
|
| return Start().Value() <= position.Value() &&
|
| @@ -1103,6 +1098,21 @@
|
| } else {
|
| ASSERT(pred->end()->SecondSuccessor() == NULL);
|
| gap = GetLastGap(pred);
|
| +
|
| + // We are going to insert a move before the branch instruction.
|
| + // Some branch instructions (e.g. loops' back edges)
|
| + // can potentially cause a GC so they have a pointer map.
|
| + // By insterting a move we essentially create a copy of a
|
| + // value which is invisible to PopulatePointerMaps(), because we store
|
| + // it into a location different from the operand of a live range
|
| + // covering a branch instruction.
|
| + // Thus we need to manually record a pointer.
|
| + if (HasTaggedValue(range->id())) {
|
| + LInstruction* branch = InstructionAt(pred->last_instruction_index());
|
| + if (branch->HasPointerMap()) {
|
| + branch->pointer_map()->RecordPointer(cur_op);
|
| + }
|
| + }
|
| }
|
| gap->GetOrCreateParallelMove(LGap::START)->AddMove(pred_op, cur_op);
|
| }
|
|
|