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

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

Issue 18080007: - Fix compilation errors. Apparently clang != clang everywhere. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | 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 <map> 7 #include <map>
8 #include <utility> 8 #include <utility>
9 9
10 #include "vm/allocation.h" 10 #include "vm/allocation.h"
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 // Key is white. Delay the weak property. 373 // Key is white. Delay the weak property.
374 visitor->DelayWeakProperty(raw_weak); 374 visitor->DelayWeakProperty(raw_weak);
375 } else { 375 } else {
376 // Key is gray or black. Make the weak property black. 376 // Key is gray or black. Make the weak property black.
377 raw_weak->VisitPointers(visitor); 377 raw_weak->VisitPointers(visitor);
378 } 378 }
379 } 379 }
380 380
381 381
382 void GCMarker::ProcessWeakTables(PageSpace* page_space) { 382 void GCMarker::ProcessWeakTables(PageSpace* page_space) {
383 for (Heap::WeakSelector sel = static_cast<Heap::WeakSelector>(0); 383 for (int sel = 0;
384 sel < Heap::kNumWeakSelectors; 384 sel < Heap::kNumWeakSelectors;
385 sel++) { 385 sel++) {
386 WeakTable* table = heap_->GetWeakTable(Heap::kOld, sel); 386 WeakTable* table = heap_->GetWeakTable(
387 Heap::kOld, static_cast<Heap::WeakSelector>(sel));
387 intptr_t size = table->size(); 388 intptr_t size = table->size();
388 for (intptr_t i = 0; i < size; i++) { 389 for (intptr_t i = 0; i < size; i++) {
389 if (table->IsValidEntryAt(i)) { 390 if (table->IsValidEntryAt(i)) {
390 RawObject* raw_obj = table->ObjectAt(i); 391 RawObject* raw_obj = table->ObjectAt(i);
391 ASSERT(raw_obj->IsHeapObject()); 392 ASSERT(raw_obj->IsHeapObject());
392 if (!raw_obj->IsMarked()) { 393 if (!raw_obj->IsMarked()) {
393 table->InvalidateAt(i); 394 table->InvalidateAt(i);
394 } 395 }
395 } 396 }
396 } 397 }
(...skipping 11 matching lines...) Expand all
408 DrainMarkingStack(isolate, &mark); 409 DrainMarkingStack(isolate, &mark);
409 IterateWeakReferences(isolate, &mark); 410 IterateWeakReferences(isolate, &mark);
410 MarkingWeakVisitor mark_weak; 411 MarkingWeakVisitor mark_weak;
411 IterateWeakRoots(isolate, &mark_weak, invoke_api_callbacks); 412 IterateWeakRoots(isolate, &mark_weak, invoke_api_callbacks);
412 mark.Finalize(); 413 mark.Finalize();
413 ProcessWeakTables(page_space); 414 ProcessWeakTables(page_space);
414 Epilogue(isolate, invoke_api_callbacks); 415 Epilogue(isolate, invoke_api_callbacks);
415 } 416 }
416 417
417 } // namespace dart 418 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698