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 #ifndef VM_SCAVENGER_H_ | 5 #ifndef VM_SCAVENGER_H_ |
6 #define VM_SCAVENGER_H_ | 6 #define VM_SCAVENGER_H_ |
7 | 7 |
8 #include "platform/assert.h" | 8 #include "platform/assert.h" |
9 #include "platform/utils.h" | 9 #include "platform/utils.h" |
10 #include "vm/dart.h" | 10 #include "vm/dart.h" |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
261 uword result = *reinterpret_cast<uword*>(end_); | 261 uword result = *reinterpret_cast<uword*>(end_); |
262 end_ += sizeof(result); | 262 end_ += sizeof(result); |
263 ASSERT(end_ <= to_->end()); | 263 ASSERT(end_ <= to_->end()); |
264 return result; | 264 return result; |
265 } | 265 } |
266 bool PromotedStackHasMore() const { | 266 bool PromotedStackHasMore() const { |
267 ASSERT(scavenging_); | 267 ASSERT(scavenging_); |
268 return end_ < to_->end(); | 268 return end_ < to_->end(); |
269 } | 269 } |
270 | 270 |
| 271 void UpdateMaxHeapCapacity(); |
| 272 |
271 void ProcessWeakTables(); | 273 void ProcessWeakTables(); |
272 | 274 |
273 intptr_t NewSizeInWords(intptr_t old_size_in_words) const; | 275 intptr_t NewSizeInWords(intptr_t old_size_in_words) const; |
274 | 276 |
275 // Current allocation top and end. These values are being accessed directly | 277 // Current allocation top and end. These values are being accessed directly |
276 // from generated code. | 278 // from generated code. |
277 uword top_; | 279 uword top_; |
278 uword end_; | 280 uword end_; |
279 | 281 |
280 SemiSpace* to_; | 282 SemiSpace* to_; |
(...skipping 25 matching lines...) Expand all Loading... |
306 | 308 |
307 friend class ScavengerVisitor; | 309 friend class ScavengerVisitor; |
308 friend class ScavengerWeakVisitor; | 310 friend class ScavengerWeakVisitor; |
309 | 311 |
310 DISALLOW_COPY_AND_ASSIGN(Scavenger); | 312 DISALLOW_COPY_AND_ASSIGN(Scavenger); |
311 }; | 313 }; |
312 | 314 |
313 } // namespace dart | 315 } // namespace dart |
314 | 316 |
315 #endif // VM_SCAVENGER_H_ | 317 #endif // VM_SCAVENGER_H_ |
OLD | NEW |