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 540 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
551 if (collector->sweeping_in_progress()) { | 551 if (collector->sweeping_in_progress()) { |
552 collector->EnsureSweepingCompleted(); | 552 collector->EnsureSweepingCompleted(); |
553 } | 553 } |
554 CHECK(marking->IsMarking() || marking->IsStopped()); | 554 CHECK(marking->IsMarking() || marking->IsStopped()); |
555 if (marking->IsStopped()) { | 555 if (marking->IsStopped()) { |
556 marking->Start(); | 556 marking->Start(); |
557 } | 557 } |
558 CHECK(marking->IsMarking()); | 558 CHECK(marking->IsMarking()); |
559 while (!marking->IsComplete()) { | 559 while (!marking->IsComplete()) { |
560 marking->Step(i::MB, i::IncrementalMarking::NO_GC_VIA_STACK_GUARD); | 560 marking->Step(i::MB, i::IncrementalMarking::NO_GC_VIA_STACK_GUARD); |
| 561 if (marking->IsReadyToOverApproximateWeakClosure()) { |
| 562 marking->MarkObjectGroups(); |
| 563 } |
561 } | 564 } |
562 CHECK(marking->IsComplete()); | 565 CHECK(marking->IsComplete()); |
563 } | 566 } |
564 | 567 |
565 | 568 |
566 // Helper class for new allocations tracking and checking. | 569 // Helper class for new allocations tracking and checking. |
567 // To use checking of JS allocations tracking in a test, | 570 // To use checking of JS allocations tracking in a test, |
568 // just create an instance of this class. | 571 // just create an instance of this class. |
569 class HeapObjectsTracker { | 572 class HeapObjectsTracker { |
570 public: | 573 public: |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
605 HandleAndZoneScope() {} | 608 HandleAndZoneScope() {} |
606 | 609 |
607 // Prefixing the below with main_ reduces a lot of naming clashes. | 610 // Prefixing the below with main_ reduces a lot of naming clashes. |
608 i::Zone* main_zone() { return &main_zone_; } | 611 i::Zone* main_zone() { return &main_zone_; } |
609 | 612 |
610 private: | 613 private: |
611 i::Zone main_zone_; | 614 i::Zone main_zone_; |
612 }; | 615 }; |
613 | 616 |
614 #endif // ifndef CCTEST_H_ | 617 #endif // ifndef CCTEST_H_ |
OLD | NEW |