| 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 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 279 static const int kInvalidAssignment = 0x7fffffff; | 279 static const int kInvalidAssignment = 0x7fffffff; |
| 280 | 280 |
| 281 explicit LiveRange(int id); | 281 explicit LiveRange(int id); |
| 282 | 282 |
| 283 UseInterval* first_interval() const { return first_interval_; } | 283 UseInterval* first_interval() const { return first_interval_; } |
| 284 UsePosition* first_pos() const { return first_pos_; } | 284 UsePosition* first_pos() const { return first_pos_; } |
| 285 LiveRange* parent() const { return parent_; } | 285 LiveRange* parent() const { return parent_; } |
| 286 LiveRange* TopLevel() { return (parent_ == NULL) ? this : parent_; } | 286 LiveRange* TopLevel() { return (parent_ == NULL) ? this : parent_; } |
| 287 LiveRange* next() const { return next_; } | 287 LiveRange* next() const { return next_; } |
| 288 bool IsChild() const { return parent() != NULL; } | 288 bool IsChild() const { return parent() != NULL; } |
| 289 bool IsParent() const { return parent() == NULL; } | |
| 290 int id() const { return id_; } | 289 int id() const { return id_; } |
| 291 bool IsFixed() const { return id_ < 0; } | 290 bool IsFixed() const { return id_ < 0; } |
| 292 bool IsEmpty() const { return first_interval() == NULL; } | 291 bool IsEmpty() const { return first_interval() == NULL; } |
| 293 LOperand* CreateAssignedOperand(); | 292 LOperand* CreateAssignedOperand(); |
| 294 int assigned_register() const { return assigned_register_; } | 293 int assigned_register() const { return assigned_register_; } |
| 295 int spill_start_index() const { return spill_start_index_; } | 294 int spill_start_index() const { return spill_start_index_; } |
| 296 void set_assigned_register(int reg, RegisterKind register_kind); | 295 void set_assigned_register(int reg, RegisterKind register_kind); |
| 297 void MakeSpilled(); | 296 void MakeSpilled(); |
| 298 | 297 |
| 299 // Returns use position in this live range that follows both start | 298 // Returns use position in this live range that follows both start |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 353 | 352 |
| 354 bool ShouldBeAllocatedBefore(const LiveRange* other) const; | 353 bool ShouldBeAllocatedBefore(const LiveRange* other) const; |
| 355 bool CanCover(LifetimePosition position) const; | 354 bool CanCover(LifetimePosition position) const; |
| 356 bool Covers(LifetimePosition position); | 355 bool Covers(LifetimePosition position); |
| 357 LifetimePosition FirstIntersection(LiveRange* other); | 356 LifetimePosition FirstIntersection(LiveRange* other); |
| 358 | 357 |
| 359 // Add a new interval or a new use position to this live range. | 358 // Add a new interval or a new use position to this live range. |
| 360 void EnsureInterval(LifetimePosition start, LifetimePosition end); | 359 void EnsureInterval(LifetimePosition start, LifetimePosition end); |
| 361 void AddUseInterval(LifetimePosition start, LifetimePosition end); | 360 void AddUseInterval(LifetimePosition start, LifetimePosition end); |
| 362 UsePosition* AddUsePosition(LifetimePosition pos, LOperand* operand); | 361 UsePosition* AddUsePosition(LifetimePosition pos, LOperand* operand); |
| 363 UsePosition* AddUsePosition(LifetimePosition pos); | |
| 364 | 362 |
| 365 // Shorten the most recently added interval by setting a new start. | 363 // Shorten the most recently added interval by setting a new start. |
| 366 void ShortenTo(LifetimePosition start); | 364 void ShortenTo(LifetimePosition start); |
| 367 | 365 |
| 368 #ifdef DEBUG | 366 #ifdef DEBUG |
| 369 // True if target overlaps an existing interval. | 367 // True if target overlaps an existing interval. |
| 370 bool HasOverlap(UseInterval* target) const; | 368 bool HasOverlap(UseInterval* target) const; |
| 371 void Verify() const; | 369 void Verify() const; |
| 372 #endif | 370 #endif |
| 373 | 371 |
| (...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 637 | 635 |
| 638 bool has_osr_entry_; | 636 bool has_osr_entry_; |
| 639 | 637 |
| 640 DISALLOW_COPY_AND_ASSIGN(LAllocator); | 638 DISALLOW_COPY_AND_ASSIGN(LAllocator); |
| 641 }; | 639 }; |
| 642 | 640 |
| 643 | 641 |
| 644 } } // namespace v8::internal | 642 } } // namespace v8::internal |
| 645 | 643 |
| 646 #endif // V8_LITHIUM_ALLOCATOR_H_ | 644 #endif // V8_LITHIUM_ALLOCATOR_H_ |
| OLD | NEW |