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

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

Issue 2626343002: 1. Added new flag verify_gc_contains and moved all the asserts that do a (Closed)
Patch Set: Created 3 years, 11 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/heap.h ('k') | runtime/vm/isolate.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) 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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 bool Heap::OldContains(uword addr) const { 171 bool Heap::OldContains(uword addr) const {
172 return old_space_.Contains(addr); 172 return old_space_.Contains(addr);
173 } 173 }
174 174
175 175
176 bool Heap::CodeContains(uword addr) const { 176 bool Heap::CodeContains(uword addr) const {
177 return old_space_.Contains(addr, HeapPage::kExecutable); 177 return old_space_.Contains(addr, HeapPage::kExecutable);
178 } 178 }
179 179
180 180
181 bool Heap::DataContains(uword addr) const {
182 return old_space_.DataContains(addr);
183 }
184
185
181 void Heap::VisitObjects(ObjectVisitor* visitor) const { 186 void Heap::VisitObjects(ObjectVisitor* visitor) const {
182 new_space_.VisitObjects(visitor); 187 new_space_.VisitObjects(visitor);
183 old_space_.VisitObjects(visitor); 188 old_space_.VisitObjects(visitor);
184 } 189 }
185 190
186 191
187 HeapIterationScope::HeapIterationScope(bool writable) 192 HeapIterationScope::HeapIterationScope(bool writable)
188 : StackResource(Thread::Current()), 193 : StackResource(Thread::Current()),
189 old_space_(isolate()->heap()->old_space()), 194 old_space_(isolate()->heap()->old_space()),
190 writable_(writable) { 195 writable_(writable) {
(...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after
822 Dart::vm_isolate()->heap()->WriteProtect(false); 827 Dart::vm_isolate()->heap()->WriteProtect(false);
823 } 828 }
824 829
825 830
826 WritableVMIsolateScope::~WritableVMIsolateScope() { 831 WritableVMIsolateScope::~WritableVMIsolateScope() {
827 ASSERT(Dart::vm_isolate()->heap()->UsedInWords(Heap::kNew) == 0); 832 ASSERT(Dart::vm_isolate()->heap()->UsedInWords(Heap::kNew) == 0);
828 Dart::vm_isolate()->heap()->WriteProtect(true); 833 Dart::vm_isolate()->heap()->WriteProtect(true);
829 } 834 }
830 835
831 } // namespace dart 836 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/heap.h ('k') | runtime/vm/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698