| 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 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 | 169 |
| 170 | 170 |
| 171 void Heap::CollectAllGarbage() { | 171 void Heap::CollectAllGarbage() { |
| 172 new_space_->Scavenge(kInvokeApiCallbacks); | 172 new_space_->Scavenge(kInvokeApiCallbacks); |
| 173 old_space_->MarkSweep(kInvokeApiCallbacks); | 173 old_space_->MarkSweep(kInvokeApiCallbacks); |
| 174 // TODO(iposva): Merge old and code space. | 174 // TODO(iposva): Merge old and code space. |
| 175 // code_space_->MarkSweep(kInvokeApiCallbacks); | 175 // code_space_->MarkSweep(kInvokeApiCallbacks); |
| 176 } | 176 } |
| 177 | 177 |
| 178 | 178 |
| 179 void Heap::EnableGrowthControl() { |
| 180 old_space_->EnableGrowthControl(); |
| 181 } |
| 182 |
| 183 |
| 179 uword Heap::TopAddress() { | 184 uword Heap::TopAddress() { |
| 180 return reinterpret_cast<uword>(new_space_->TopAddress()); | 185 return reinterpret_cast<uword>(new_space_->TopAddress()); |
| 181 } | 186 } |
| 182 | 187 |
| 183 | 188 |
| 184 uword Heap::EndAddress() { | 189 uword Heap::EndAddress() { |
| 185 return reinterpret_cast<uword>(new_space_->EndAddress()); | 190 return reinterpret_cast<uword>(new_space_->EndAddress()); |
| 186 } | 191 } |
| 187 | 192 |
| 188 | 193 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 218 isolate()->IncrementNoGCScopeDepth(); | 223 isolate()->IncrementNoGCScopeDepth(); |
| 219 } | 224 } |
| 220 | 225 |
| 221 | 226 |
| 222 NoGCScope::~NoGCScope() { | 227 NoGCScope::~NoGCScope() { |
| 223 isolate()->DecrementNoGCScopeDepth(); | 228 isolate()->DecrementNoGCScopeDepth(); |
| 224 } | 229 } |
| 225 #endif // defined(DEBUG) | 230 #endif // defined(DEBUG) |
| 226 | 231 |
| 227 } // namespace dart | 232 } // namespace dart |
| OLD | NEW |