| 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 431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 442 | 442 |
| 443 // Prepares for GC by resetting relocation info in old and map spaces and | 443 // Prepares for GC by resetting relocation info in old and map spaces and |
| 444 // choosing spaces to compact. | 444 // choosing spaces to compact. |
| 445 void Prepare(GCTracer* tracer); | 445 void Prepare(GCTracer* tracer); |
| 446 | 446 |
| 447 // Performs a global garbage collection. | 447 // Performs a global garbage collection. |
| 448 void CollectGarbage(); | 448 void CollectGarbage(); |
| 449 | 449 |
| 450 bool StartCompaction(); | 450 bool StartCompaction(); |
| 451 | 451 |
| 452 void AbortCompaction(); |
| 453 |
| 452 // During a full GC, there is a stack-allocated GCTracer that is used for | 454 // During a full GC, there is a stack-allocated GCTracer that is used for |
| 453 // bookkeeping information. Return a pointer to that tracer. | 455 // bookkeeping information. Return a pointer to that tracer. |
| 454 GCTracer* tracer() { return tracer_; } | 456 GCTracer* tracer() { return tracer_; } |
| 455 | 457 |
| 456 #ifdef DEBUG | 458 #ifdef DEBUG |
| 457 // Checks whether performing mark-compact collection. | 459 // Checks whether performing mark-compact collection. |
| 458 bool in_use() { return state_ > PREPARE_GC; } | 460 bool in_use() { return state_ > PREPARE_GC; } |
| 459 bool are_map_pointers_encoded() { return state_ == UPDATE_POINTERS; } | 461 bool are_map_pointers_encoded() { return state_ == UPDATE_POINTERS; } |
| 460 #endif | 462 #endif |
| 461 | 463 |
| (...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 763 | 765 |
| 764 friend class Heap; | 766 friend class Heap; |
| 765 }; | 767 }; |
| 766 | 768 |
| 767 | 769 |
| 768 const char* AllocationSpaceName(AllocationSpace space); | 770 const char* AllocationSpaceName(AllocationSpace space); |
| 769 | 771 |
| 770 } } // namespace v8::internal | 772 } } // namespace v8::internal |
| 771 | 773 |
| 772 #endif // V8_MARK_COMPACT_H_ | 774 #endif // V8_MARK_COMPACT_H_ |
| OLD | NEW |