| 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/compiler_stats.h" | 9 #include "vm/compiler_stats.h" |
| 10 #include "vm/flags.h" | 10 #include "vm/flags.h" |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 } | 97 } |
| 98 | 98 |
| 99 | 99 |
| 100 bool Heap::Contains(uword addr) const { | 100 bool Heap::Contains(uword addr) const { |
| 101 return new_space_->Contains(addr) || | 101 return new_space_->Contains(addr) || |
| 102 old_space_->Contains(addr) || | 102 old_space_->Contains(addr) || |
| 103 code_space_->Contains(addr); | 103 code_space_->Contains(addr); |
| 104 } | 104 } |
| 105 | 105 |
| 106 | 106 |
| 107 bool Heap::NewContains(uword addr) const { |
| 108 return new_space_->Contains(addr); |
| 109 } |
| 110 |
| 111 |
| 112 bool Heap::OldContains(uword addr) const { |
| 113 return old_space_->Contains(addr); |
| 114 } |
| 115 |
| 116 |
| 107 bool Heap::CodeContains(uword addr) const { | 117 bool Heap::CodeContains(uword addr) const { |
| 108 return code_space_->Contains(addr); | 118 return code_space_->Contains(addr); |
| 109 } | 119 } |
| 110 | 120 |
| 111 | 121 |
| 112 void Heap::IterateObjects(ObjectVisitor* visitor) { | 122 void Heap::IterateObjects(ObjectVisitor* visitor) { |
| 113 new_space_->VisitObjects(visitor); | 123 new_space_->VisitObjects(visitor); |
| 114 old_space_->VisitObjects(visitor); | 124 old_space_->VisitObjects(visitor); |
| 115 code_space_->VisitObjects(visitor); | 125 code_space_->VisitObjects(visitor); |
| 116 } | 126 } |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 319 isolate()->IncrementNoGCScopeDepth(); | 329 isolate()->IncrementNoGCScopeDepth(); |
| 320 } | 330 } |
| 321 | 331 |
| 322 | 332 |
| 323 NoGCScope::~NoGCScope() { | 333 NoGCScope::~NoGCScope() { |
| 324 isolate()->DecrementNoGCScopeDepth(); | 334 isolate()->DecrementNoGCScopeDepth(); |
| 325 } | 335 } |
| 326 #endif // defined(DEBUG) | 336 #endif // defined(DEBUG) |
| 327 | 337 |
| 328 } // namespace dart | 338 } // namespace dart |
| OLD | NEW |