Chromium Code Reviews| 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_BITMAP_H_ | 5 #ifndef VM_BITMAP_H_ |
| 6 #define VM_BITMAP_H_ | 6 #define VM_BITMAP_H_ |
| 7 | 7 |
| 8 #include "vm/allocation.h" | 8 #include "vm/allocation.h" |
| 9 | 9 |
| 10 namespace dart { | 10 namespace dart { |
| (...skipping 23 matching lines...) Expand all Loading... | |
| 34 | 34 |
| 35 // Return the bit offset of the highest bit set. | 35 // Return the bit offset of the highest bit set. |
| 36 intptr_t Maximum() const; | 36 intptr_t Maximum() const; |
| 37 | 37 |
| 38 // Return the bit offset of the lowest bit set. | 38 // Return the bit offset of the lowest bit set. |
| 39 intptr_t Minimum() const; | 39 intptr_t Minimum() const; |
| 40 | 40 |
| 41 // Sets min..max (inclusive) to value. | 41 // Sets min..max (inclusive) to value. |
| 42 void SetRange(intptr_t min, intptr_t max, bool value); | 42 void SetRange(intptr_t min, intptr_t max, bool value); |
| 43 | 43 |
| 44 // Replicates the bit map setting of the passed in Stackmap object. | |
| 45 void SetBits(const Stackmap& stackmap); | |
|
Kevin Millikin (Google)
2012/08/17 09:07:43
This function is unused and doesn't seem useful at
| |
| 46 | |
| 47 private: | 44 private: |
| 48 static const intptr_t kInitialSizeInBytes = 16; | 45 static const intptr_t kInitialSizeInBytes = 16; |
| 49 static const intptr_t kIncrementSizeInBytes = 16; | 46 static const intptr_t kIncrementSizeInBytes = 16; |
| 50 | 47 |
| 51 bool InRange(intptr_t offset) const { | 48 bool InRange(intptr_t offset) const { |
| 52 return (offset >= 0) && (offset < SizeInBits()); | 49 return (offset >= 0) && (offset < SizeInBits()); |
| 53 } | 50 } |
| 54 | 51 |
| 55 bool GetBit(intptr_t bit_offset) const; | 52 bool GetBit(intptr_t bit_offset) const; |
| 56 void SetBit(intptr_t bit_offset, bool value); | 53 void SetBit(intptr_t bit_offset, bool value); |
| 57 | 54 |
| 58 intptr_t size_in_bytes_; | 55 intptr_t size_in_bytes_; |
| 59 uint8_t bit_list_data_[kInitialSizeInBytes]; | 56 uint8_t bit_list_data_[kInitialSizeInBytes]; |
| 60 uint8_t* bit_list_; | 57 uint8_t* bit_list_; |
| 61 | 58 |
| 62 DISALLOW_COPY_AND_ASSIGN(BitmapBuilder); | 59 DISALLOW_COPY_AND_ASSIGN(BitmapBuilder); |
| 63 }; | 60 }; |
| 64 | 61 |
| 65 } // namespace dart | 62 } // namespace dart |
| 66 | 63 |
| 67 #endif // VM_BITMAP_H_ | 64 #endif // VM_BITMAP_H_ |
| OLD | NEW |