| OLD | NEW |
| 1 // Copyright 2008 the V8 project authors. All rights reserved. | 1 // Copyright 2008 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 543 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 554 // Helper function that simulates many incremental marking steps until | 554 // Helper function that simulates many incremental marking steps until |
| 555 // marking is completed. | 555 // marking is completed. |
| 556 static inline void SimulateIncrementalMarking(i::Heap* heap) { | 556 static inline void SimulateIncrementalMarking(i::Heap* heap) { |
| 557 i::MarkCompactCollector* collector = heap->mark_compact_collector(); | 557 i::MarkCompactCollector* collector = heap->mark_compact_collector(); |
| 558 i::IncrementalMarking* marking = heap->incremental_marking(); | 558 i::IncrementalMarking* marking = heap->incremental_marking(); |
| 559 if (collector->sweeping_in_progress()) { | 559 if (collector->sweeping_in_progress()) { |
| 560 collector->EnsureSweepingCompleted(); | 560 collector->EnsureSweepingCompleted(); |
| 561 } | 561 } |
| 562 CHECK(marking->IsMarking() || marking->IsStopped()); | 562 CHECK(marking->IsMarking() || marking->IsStopped()); |
| 563 if (marking->IsStopped()) { | 563 if (marking->IsStopped()) { |
| 564 marking->Start(); | 564 marking->Start(i::Heap::kNoGCFlags); |
| 565 } | 565 } |
| 566 CHECK(marking->IsMarking()); | 566 CHECK(marking->IsMarking()); |
| 567 while (!marking->IsComplete()) { | 567 while (!marking->IsComplete()) { |
| 568 marking->Step(i::MB, i::IncrementalMarking::NO_GC_VIA_STACK_GUARD); | 568 marking->Step(i::MB, i::IncrementalMarking::NO_GC_VIA_STACK_GUARD); |
| 569 if (marking->IsReadyToOverApproximateWeakClosure()) { | 569 if (marking->IsReadyToOverApproximateWeakClosure()) { |
| 570 marking->MarkObjectGroups(); | 570 marking->MarkObjectGroups(); |
| 571 } | 571 } |
| 572 } | 572 } |
| 573 CHECK(marking->IsComplete()); | 573 CHECK(marking->IsComplete()); |
| 574 } | 574 } |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 616 HandleAndZoneScope() {} | 616 HandleAndZoneScope() {} |
| 617 | 617 |
| 618 // Prefixing the below with main_ reduces a lot of naming clashes. | 618 // Prefixing the below with main_ reduces a lot of naming clashes. |
| 619 i::Zone* main_zone() { return &main_zone_; } | 619 i::Zone* main_zone() { return &main_zone_; } |
| 620 | 620 |
| 621 private: | 621 private: |
| 622 i::Zone main_zone_; | 622 i::Zone main_zone_; |
| 623 }; | 623 }; |
| 624 | 624 |
| 625 #endif // ifndef CCTEST_H_ | 625 #endif // ifndef CCTEST_H_ |
| OLD | NEW |