| 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 RUNTIME_VM_BITMAP_H_ | 5 #ifndef RUNTIME_VM_BITMAP_H_ |
| 6 #define RUNTIME_VM_BITMAP_H_ | 6 #define RUNTIME_VM_BITMAP_H_ |
| 7 | 7 |
| 8 #include "vm/allocation.h" | 8 #include "vm/allocation.h" |
| 9 #include "vm/isolate.h" | 9 #include "vm/isolate.h" |
| 10 #include "vm/zone.h" | 10 #include "vm/zone.h" |
| 11 | 11 |
| 12 namespace dart { | 12 namespace dart { |
| 13 | 13 |
| 14 // Forward declarations. | 14 // Forward declarations. |
| 15 class RawStackMap; | 15 class RawStackMap; |
| 16 class StackMap; | 16 class StackMap; |
| 17 | 17 |
| 18 | |
| 19 // BitmapBuilder is used to build a bitmap. The implementation is optimized | 18 // BitmapBuilder is used to build a bitmap. The implementation is optimized |
| 20 // for a dense set of small bit maps without a fixed upper bound (e.g: a | 19 // for a dense set of small bit maps without a fixed upper bound (e.g: a |
| 21 // pointer map description of a stack). | 20 // pointer map description of a stack). |
| 22 class BitmapBuilder : public ZoneAllocated { | 21 class BitmapBuilder : public ZoneAllocated { |
| 23 public: | 22 public: |
| 24 BitmapBuilder() | 23 BitmapBuilder() |
| 25 : length_(0), | 24 : length_(0), |
| 26 data_size_in_bytes_(kInitialSizeInBytes), | 25 data_size_in_bytes_(kInitialSizeInBytes), |
| 27 data_(Thread::Current()->zone()->Alloc<uint8_t>(kInitialSizeInBytes)) { | 26 data_(Thread::Current()->zone()->Alloc<uint8_t>(kInitialSizeInBytes)) { |
| 28 memset(data_, 0, kInitialSizeInBytes); | 27 memset(data_, 0, kInitialSizeInBytes); |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 // (up to length_) is allowed and they are assumed to be false. | 71 // (up to length_) is allowed and they are assumed to be false. |
| 73 intptr_t data_size_in_bytes_; | 72 intptr_t data_size_in_bytes_; |
| 74 uint8_t* data_; | 73 uint8_t* data_; |
| 75 | 74 |
| 76 DISALLOW_COPY_AND_ASSIGN(BitmapBuilder); | 75 DISALLOW_COPY_AND_ASSIGN(BitmapBuilder); |
| 77 }; | 76 }; |
| 78 | 77 |
| 79 } // namespace dart | 78 } // namespace dart |
| 80 | 79 |
| 81 #endif // RUNTIME_VM_BITMAP_H_ | 80 #endif // RUNTIME_VM_BITMAP_H_ |
| OLD | NEW |