| OLD | NEW | 
|---|
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 216 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 227 | 227 | 
| 228 | 228 | 
| 229 bool LiveRange::CanBeSpilled(LifetimePosition pos) { | 229 bool LiveRange::CanBeSpilled(LifetimePosition pos) { | 
| 230   // TODO(kmillikin): Comment. Now. | 230   // TODO(kmillikin): Comment. Now. | 
| 231   if (pos.Value() <= Start().Value() && HasRegisterAssigned()) return false; | 231   if (pos.Value() <= Start().Value() && HasRegisterAssigned()) return false; | 
| 232 | 232 | 
| 233   // We cannot spill a live range that has a use requiring a register | 233   // We cannot spill a live range that has a use requiring a register | 
| 234   // at the current or the immediate next position. | 234   // at the current or the immediate next position. | 
| 235   UsePosition* use_pos = NextRegisterPosition(pos); | 235   UsePosition* use_pos = NextRegisterPosition(pos); | 
| 236   if (use_pos == NULL) return true; | 236   if (use_pos == NULL) return true; | 
| 237   return use_pos->pos().Value() > pos.NextInstruction().Value(); | 237   return | 
|  | 238       use_pos->pos().Value() > pos.NextInstruction().InstructionEnd().Value(); | 
| 238 } | 239 } | 
| 239 | 240 | 
| 240 | 241 | 
| 241 UsePosition* LiveRange::FirstPosWithHint() const { | 242 UsePosition* LiveRange::FirstPosWithHint() const { | 
| 242   UsePosition* pos = first_pos_; | 243   UsePosition* pos = first_pos_; | 
| 243   while (pos != NULL && !pos->HasHint()) pos = pos->next(); | 244   while (pos != NULL && !pos->HasHint()) pos = pos->next(); | 
| 244   return pos; | 245   return pos; | 
| 245 } | 246 } | 
| 246 | 247 | 
| 247 | 248 | 
| (...skipping 1873 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 2121     LiveRange* current = live_ranges()->at(i); | 2122     LiveRange* current = live_ranges()->at(i); | 
| 2122     if (current != NULL) current->Verify(); | 2123     if (current != NULL) current->Verify(); | 
| 2123   } | 2124   } | 
| 2124 } | 2125 } | 
| 2125 | 2126 | 
| 2126 | 2127 | 
| 2127 #endif | 2128 #endif | 
| 2128 | 2129 | 
| 2129 | 2130 | 
| 2130 } }  // namespace v8::internal | 2131 } }  // namespace v8::internal | 
| OLD | NEW | 
|---|