| OLD | NEW | 
|     1 // Copyright 2010 the V8 project authors. All rights reserved. |     1 // Copyright 2010 the V8 project authors. All rights reserved. | 
|     2 // Redistribution and use in source and binary forms, with or without |     2 // Redistribution and use in source and binary forms, with or without | 
|     3 // modification, are permitted provided that the following conditions are |     3 // modification, are permitted provided that the following conditions are | 
|     4 // met: |     4 // met: | 
|     5 // |     5 // | 
|     6 //     * Redistributions of source code must retain the above copyright |     6 //     * Redistributions of source code must retain the above copyright | 
|     7 //       notice, this list of conditions and the following disclaimer. |     7 //       notice, this list of conditions and the following disclaimer. | 
|     8 //     * Redistributions in binary form must reproduce the above |     8 //     * Redistributions in binary form must reproduce the above | 
|     9 //       copyright notice, this list of conditions and the following |     9 //       copyright notice, this list of conditions and the following | 
|    10 //       disclaimer in the documentation and/or other materials provided |    10 //       disclaimer in the documentation and/or other materials provided | 
| (...skipping 1995 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  2006   } |  2006   } | 
|  2007 } |  2007 } | 
|  2008  |  2008  | 
|  2009  |  2009  | 
|  2010 bool LAllocator::IsBlockBoundary(LifetimePosition pos) { |  2010 bool LAllocator::IsBlockBoundary(LifetimePosition pos) { | 
|  2011   return pos.IsInstructionStart() && |  2011   return pos.IsInstructionStart() && | 
|  2012       chunk_->instructions()->at(pos.InstructionIndex())->IsLabel(); |  2012       chunk_->instructions()->at(pos.InstructionIndex())->IsLabel(); | 
|  2013 } |  2013 } | 
|  2014  |  2014  | 
|  2015  |  2015  | 
|  2016 void LAllocator::AddGapMove(int pos, LiveRange* prev, LiveRange* next) { |  | 
|  2017   UsePosition* prev_pos = prev->AddUsePosition( |  | 
|  2018       LifetimePosition::FromInstructionIndex(pos)); |  | 
|  2019   UsePosition* next_pos = next->AddUsePosition( |  | 
|  2020       LifetimePosition::FromInstructionIndex(pos)); |  | 
|  2021   LOperand* prev_operand = prev_pos->operand(); |  | 
|  2022   LOperand* next_operand = next_pos->operand(); |  | 
|  2023   LGap* gap = chunk_->GetGapAt(pos); |  | 
|  2024   gap->GetOrCreateParallelMove(LGap::START)-> |  | 
|  2025       AddMove(prev_operand, next_operand); |  | 
|  2026   next_pos->set_hint(prev_operand); |  | 
|  2027 } |  | 
|  2028  |  | 
|  2029  |  | 
|  2030 LiveRange* LAllocator::SplitAt(LiveRange* range, LifetimePosition pos) { |  2016 LiveRange* LAllocator::SplitAt(LiveRange* range, LifetimePosition pos) { | 
|  2031   ASSERT(!range->IsFixed()); |  2017   ASSERT(!range->IsFixed()); | 
|  2032   TraceAlloc("Splitting live range %d at %d\n", range->id(), pos.Value()); |  2018   TraceAlloc("Splitting live range %d at %d\n", range->id(), pos.Value()); | 
|  2033  |  2019  | 
|  2034   if (pos.Value() <= range->Start().Value()) return range; |  2020   if (pos.Value() <= range->Start().Value()) return range; | 
|  2035  |  2021  | 
|  2036   LiveRange* result = LiveRangeFor(next_virtual_register_++); |  2022   LiveRange* result = LiveRangeFor(next_virtual_register_++); | 
|  2037   range->SplitAt(pos, result); |  2023   range->SplitAt(pos, result); | 
|  2038   return result; |  2024   return result; | 
|  2039 } |  2025 } | 
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  2146     LiveRange* current = live_ranges()->at(i); |  2132     LiveRange* current = live_ranges()->at(i); | 
|  2147     if (current != NULL) current->Verify(); |  2133     if (current != NULL) current->Verify(); | 
|  2148   } |  2134   } | 
|  2149 } |  2135 } | 
|  2150  |  2136  | 
|  2151  |  2137  | 
|  2152 #endif |  2138 #endif | 
|  2153  |  2139  | 
|  2154  |  2140  | 
|  2155 } }  // namespace v8::internal |  2141 } }  // namespace v8::internal | 
| OLD | NEW |