Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(282)

Side by Side Diff: test/cctest/cctest.h

Issue 1314853002: [heap] Make the current GCCallbackFlags are part of {Heap}. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/heap/incremental-marking.cc ('k') | test/cctest/test-heap.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 528 matching lines...) Expand 10 before | Expand all | Expand 10 after
539 // marking is completed. 539 // marking is completed.
540 static inline void SimulateIncrementalMarking(i::Heap* heap, 540 static inline void SimulateIncrementalMarking(i::Heap* heap,
541 bool force_completion = true) { 541 bool force_completion = true) {
542 i::MarkCompactCollector* collector = heap->mark_compact_collector(); 542 i::MarkCompactCollector* collector = heap->mark_compact_collector();
543 i::IncrementalMarking* marking = heap->incremental_marking(); 543 i::IncrementalMarking* marking = heap->incremental_marking();
544 if (collector->sweeping_in_progress()) { 544 if (collector->sweeping_in_progress()) {
545 collector->EnsureSweepingCompleted(); 545 collector->EnsureSweepingCompleted();
546 } 546 }
547 CHECK(marking->IsMarking() || marking->IsStopped()); 547 CHECK(marking->IsMarking() || marking->IsStopped());
548 if (marking->IsStopped()) { 548 if (marking->IsStopped()) {
549 marking->Start(i::Heap::kNoGCFlags); 549 heap->StartIncrementalMarking();
550 } 550 }
551 CHECK(marking->IsMarking()); 551 CHECK(marking->IsMarking());
552 if (!force_completion) return; 552 if (!force_completion) return;
553 553
554 while (!marking->IsComplete()) { 554 while (!marking->IsComplete()) {
555 marking->Step(i::MB, i::IncrementalMarking::NO_GC_VIA_STACK_GUARD); 555 marking->Step(i::MB, i::IncrementalMarking::NO_GC_VIA_STACK_GUARD);
556 if (marking->IsReadyToOverApproximateWeakClosure()) { 556 if (marking->IsReadyToOverApproximateWeakClosure()) {
557 marking->MarkObjectGroups(); 557 marking->MarkObjectGroups();
558 } 558 }
559 } 559 }
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
600 HandleAndZoneScope() {} 600 HandleAndZoneScope() {}
601 601
602 // Prefixing the below with main_ reduces a lot of naming clashes. 602 // Prefixing the below with main_ reduces a lot of naming clashes.
603 i::Zone* main_zone() { return &main_zone_; } 603 i::Zone* main_zone() { return &main_zone_; }
604 604
605 private: 605 private:
606 i::Zone main_zone_; 606 i::Zone main_zone_;
607 }; 607 };
608 608
609 #endif // ifndef CCTEST_H_ 609 #endif // ifndef CCTEST_H_
OLDNEW
« no previous file with comments | « src/heap/incremental-marking.cc ('k') | test/cctest/test-heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698