| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 2037 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2048 InstructionAt(pos.InstructionIndex())->IsLabel(); | 2048 InstructionAt(pos.InstructionIndex())->IsLabel(); |
| 2049 } | 2049 } |
| 2050 | 2050 |
| 2051 | 2051 |
| 2052 LiveRange* LAllocator::SplitRangeAt(LiveRange* range, LifetimePosition pos) { | 2052 LiveRange* LAllocator::SplitRangeAt(LiveRange* range, LifetimePosition pos) { |
| 2053 ASSERT(!range->IsFixed()); | 2053 ASSERT(!range->IsFixed()); |
| 2054 TraceAlloc("Splitting live range %d at %d\n", range->id(), pos.Value()); | 2054 TraceAlloc("Splitting live range %d at %d\n", range->id(), pos.Value()); |
| 2055 | 2055 |
| 2056 if (pos.Value() <= range->Start().Value()) return range; | 2056 if (pos.Value() <= range->Start().Value()) return range; |
| 2057 | 2057 |
| 2058 // We can't properly connect liveranges if split occured at the end | 2058 // We can't properly connect liveranges if split occurred at the end |
| 2059 // of control instruction. | 2059 // of control instruction. |
| 2060 ASSERT(pos.IsInstructionStart() || | 2060 ASSERT(pos.IsInstructionStart() || |
| 2061 !chunk_->instructions()->at(pos.InstructionIndex())->IsControl()); | 2061 !chunk_->instructions()->at(pos.InstructionIndex())->IsControl()); |
| 2062 | 2062 |
| 2063 int vreg = GetVirtualRegister(); | 2063 int vreg = GetVirtualRegister(); |
| 2064 if (!AllocationOk()) return NULL; | 2064 if (!AllocationOk()) return NULL; |
| 2065 LiveRange* result = LiveRangeFor(vreg); | 2065 LiveRange* result = LiveRangeFor(vreg); |
| 2066 range->SplitAt(pos, result, zone_); | 2066 range->SplitAt(pos, result, zone_); |
| 2067 return result; | 2067 return result; |
| 2068 } | 2068 } |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2188 LiveRange* current = live_ranges()->at(i); | 2188 LiveRange* current = live_ranges()->at(i); |
| 2189 if (current != NULL) current->Verify(); | 2189 if (current != NULL) current->Verify(); |
| 2190 } | 2190 } |
| 2191 } | 2191 } |
| 2192 | 2192 |
| 2193 | 2193 |
| 2194 #endif | 2194 #endif |
| 2195 | 2195 |
| 2196 | 2196 |
| 2197 } } // namespace v8::internal | 2197 } } // namespace v8::internal |
| OLD | NEW |