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 460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
471 if (use_pos->HasOperand()) { | 471 if (use_pos->HasOperand()) { |
472 ASSERT(op->IsRegister() || op->IsDoubleRegister() || | 472 ASSERT(op->IsRegister() || op->IsDoubleRegister() || |
473 !use_pos->RequiresRegister()); | 473 !use_pos->RequiresRegister()); |
474 use_pos->operand()->ConvertTo(op->kind(), op->index()); | 474 use_pos->operand()->ConvertTo(op->kind(), op->index()); |
475 } | 475 } |
476 use_pos = use_pos->next(); | 476 use_pos = use_pos->next(); |
477 } | 477 } |
478 } | 478 } |
479 | 479 |
480 | 480 |
481 UsePosition* LiveRange::AddUsePosition(LifetimePosition pos) { | |
482 return AddUsePosition(pos, CreateAssignedOperand()); | |
483 } | |
484 | |
485 | |
486 bool LiveRange::CanCover(LifetimePosition position) const { | 481 bool LiveRange::CanCover(LifetimePosition position) const { |
487 if (IsEmpty()) return false; | 482 if (IsEmpty()) return false; |
488 return Start().Value() <= position.Value() && | 483 return Start().Value() <= position.Value() && |
489 position.Value() < End().Value(); | 484 position.Value() < End().Value(); |
490 } | 485 } |
491 | 486 |
492 | 487 |
493 bool LiveRange::Covers(LifetimePosition position) { | 488 bool LiveRange::Covers(LifetimePosition position) { |
494 if (!CanCover(position)) return false; | 489 if (!CanCover(position)) return false; |
495 UseInterval* start_search = FirstSearchIntervalForPosition(position); | 490 UseInterval* start_search = FirstSearchIntervalForPosition(position); |
(...skipping 1593 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2089 LiveRange* current = live_ranges()->at(i); | 2084 LiveRange* current = live_ranges()->at(i); |
2090 if (current != NULL) current->Verify(); | 2085 if (current != NULL) current->Verify(); |
2091 } | 2086 } |
2092 } | 2087 } |
2093 | 2088 |
2094 | 2089 |
2095 #endif | 2090 #endif |
2096 | 2091 |
2097 | 2092 |
2098 } } // namespace v8::internal | 2093 } } // namespace v8::internal |
OLD | NEW |