Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(632)

Side by Side Diff: runtime/vm/bitmap.h

Issue 10835034: Fix an off-by-one error in the stack frame iteration. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Renaming per review comments. Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/vm/bitmap.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 24 matching lines...) Expand all
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. 44 // Replicates the bit map setting of the passed in Stackmap object.
45 void SetBits(const Stackmap& bitmap); 45 void SetBits(const Stackmap& stackmap);
46 46
47 private: 47 private:
48 static const intptr_t kInitialSizeInBytes = 16; 48 static const intptr_t kInitialSizeInBytes = 16;
49 static const intptr_t kIncrementSizeInBytes = 16; 49 static const intptr_t kIncrementSizeInBytes = 16;
50 50
51 bool InRange(intptr_t offset) const { 51 bool InRange(intptr_t offset) const {
52 return (offset >= 0) && (offset < SizeInBits()); 52 return (offset >= 0) && (offset < SizeInBits());
53 } 53 }
54 54
55 bool GetBit(intptr_t bit_offset) const; 55 bool GetBit(intptr_t bit_offset) const;
56 void SetBit(intptr_t bit_offset, bool value); 56 void SetBit(intptr_t bit_offset, bool value);
57 57
58 intptr_t size_in_bytes_; 58 intptr_t size_in_bytes_;
59 uint8_t bit_list_data_[kInitialSizeInBytes]; 59 uint8_t bit_list_data_[kInitialSizeInBytes];
60 uint8_t* bit_list_; 60 uint8_t* bit_list_;
61 61
62 DISALLOW_COPY_AND_ASSIGN(BitmapBuilder); 62 DISALLOW_COPY_AND_ASSIGN(BitmapBuilder);
63 }; 63 };
64 64
65 } // namespace dart 65 } // namespace dart
66 66
67 #endif // VM_BITMAP_H_ 67 #endif // VM_BITMAP_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/bitmap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698