| OLD | NEW | 
|---|
| 1 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file | 1 // Copyright (c) 2012, 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/heap.h" | 5 #include "vm/heap.h" | 
| 6 | 6 | 
| 7 #include "platform/assert.h" | 7 #include "platform/assert.h" | 
| 8 #include "platform/utils.h" | 8 #include "platform/utils.h" | 
| 9 #include "vm/flags.h" | 9 #include "vm/flags.h" | 
| 10 #include "vm/isolate.h" | 10 #include "vm/isolate.h" | 
| (...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 555     // VM isolate heap is premarked. | 555     // VM isolate heap is premarked. | 
| 556     VerifyObjectVisitor vm_object_visitor( | 556     VerifyObjectVisitor vm_object_visitor( | 
| 557         isolate(), allocated_set, kRequireMarked); | 557         isolate(), allocated_set, kRequireMarked); | 
| 558     vm_isolate->heap()->VisitObjects(&vm_object_visitor); | 558     vm_isolate->heap()->VisitObjects(&vm_object_visitor); | 
| 559   } | 559   } | 
| 560   return allocated_set; | 560   return allocated_set; | 
| 561 } | 561 } | 
| 562 | 562 | 
| 563 | 563 | 
| 564 bool Heap::Verify(MarkExpectation mark_expectation) const { | 564 bool Heap::Verify(MarkExpectation mark_expectation) const { | 
|  | 565 // TODO(27373): Remove this test when the issue is fixed. | 
|  | 566 #if defined(ARCH_IS_64_BIT) | 
|  | 567   if ((Dart::snapshot_kind() == Snapshot::kAppNoJIT) || | 
|  | 568       (Dart::snapshot_kind() == Snapshot::kAppWithJIT)) { | 
|  | 569     return true; | 
|  | 570   } | 
|  | 571 #endif | 
| 565   HeapIterationScope heap_iteration_scope; | 572   HeapIterationScope heap_iteration_scope; | 
| 566   return VerifyGC(mark_expectation); | 573   return VerifyGC(mark_expectation); | 
| 567 } | 574 } | 
| 568 | 575 | 
| 569 | 576 | 
| 570 bool Heap::VerifyGC(MarkExpectation mark_expectation) const { | 577 bool Heap::VerifyGC(MarkExpectation mark_expectation) const { | 
| 571   ObjectSet* allocated_set = CreateAllocatedObjectSet(mark_expectation); | 578   ObjectSet* allocated_set = CreateAllocatedObjectSet(mark_expectation); | 
| 572   VerifyPointersVisitor visitor(isolate(), allocated_set); | 579   VerifyPointersVisitor visitor(isolate(), allocated_set); | 
| 573   VisitObjectPointers(&visitor); | 580   VisitObjectPointers(&visitor); | 
| 574   delete allocated_set; | 581   delete allocated_set; | 
| (...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 871   Dart::vm_isolate()->heap()->WriteProtect(false); | 878   Dart::vm_isolate()->heap()->WriteProtect(false); | 
| 872 } | 879 } | 
| 873 | 880 | 
| 874 | 881 | 
| 875 WritableVMIsolateScope::~WritableVMIsolateScope() { | 882 WritableVMIsolateScope::~WritableVMIsolateScope() { | 
| 876   ASSERT(Dart::vm_isolate()->heap()->UsedInWords(Heap::kNew) == 0); | 883   ASSERT(Dart::vm_isolate()->heap()->UsedInWords(Heap::kNew) == 0); | 
| 877   Dart::vm_isolate()->heap()->WriteProtect(true); | 884   Dart::vm_isolate()->heap()->WriteProtect(true); | 
| 878 } | 885 } | 
| 879 | 886 | 
| 880 }  // namespace dart | 887 }  // namespace dart | 
| OLD | NEW | 
|---|