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

Side by Side Diff: runtime/vm/gc_marker.cc

Issue 2146713004: More changes to use #ifndef PRODUCT ... #endif explicitly instead of relying on compiler magic. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 5 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 | « runtime/vm/flags.cc ('k') | runtime/vm/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 (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/gc_marker.h" 5 #include "vm/gc_marker.h"
6 6
7 #include "vm/allocation.h" 7 #include "vm/allocation.h"
8 #include "vm/dart_api_state.h" 8 #include "vm/dart_api_state.h"
9 #include "vm/isolate.h" 9 #include "vm/isolate.h"
10 #include "vm/log.h" 10 #include "vm/log.h"
(...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after
527 if (raw_obj->IsOldObject() && !raw_obj->IsMarked()) { 527 if (raw_obj->IsOldObject() && !raw_obj->IsMarked()) {
528 // Object has become garbage. Replace it will null. 528 // Object has become garbage. Replace it will null.
529 *current = Object::null(); 529 *current = Object::null();
530 } 530 }
531 } 531 }
532 } 532 }
533 }; 533 };
534 534
535 535
536 void GCMarker::ProcessObjectIdTable(Isolate* isolate) { 536 void GCMarker::ProcessObjectIdTable(Isolate* isolate) {
537 #ifndef PRODUCT
537 if (!FLAG_support_service) { 538 if (!FLAG_support_service) {
538 return; 539 return;
539 } 540 }
540 ObjectIdRingClearPointerVisitor visitor(isolate); 541 ObjectIdRingClearPointerVisitor visitor(isolate);
541 ObjectIdRing* ring = isolate->object_id_ring(); 542 ObjectIdRing* ring = isolate->object_id_ring();
542 ASSERT(ring != NULL); 543 ASSERT(ring != NULL);
543 ring->VisitPointers(&visitor); 544 ring->VisitPointers(&visitor);
545 #endif // !PRODUCT
544 } 546 }
545 547
546 548
547 class MarkTask : public ThreadPool::Task { 549 class MarkTask : public ThreadPool::Task {
548 public: 550 public:
549 MarkTask(GCMarker* marker, 551 MarkTask(GCMarker* marker,
550 Isolate* isolate, 552 Isolate* isolate,
551 Heap* heap, 553 Heap* heap,
552 PageSpace* page_space, 554 PageSpace* page_space,
553 MarkingStack* marking_stack, 555 MarkingStack* marking_stack,
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
777 // Phase 3: Finalize results from all markers (detach code, etc.). 779 // Phase 3: Finalize results from all markers (detach code, etc.).
778 barrier.Exit(); 780 barrier.Exit();
779 } 781 }
780 ProcessWeakTables(page_space); 782 ProcessWeakTables(page_space);
781 ProcessObjectIdTable(isolate); 783 ProcessObjectIdTable(isolate);
782 } 784 }
783 Epilogue(isolate, invoke_api_callbacks); 785 Epilogue(isolate, invoke_api_callbacks);
784 } 786 }
785 787
786 } // namespace dart 788 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/flags.cc ('k') | runtime/vm/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698