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

Side by Side Diff: vm/bitmap.cc

Issue 9791048: - Wire the stack frame iterator to use stack maps for traversing objects if there are stack maps in… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 8 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 | vm/bitmap_test.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 #include "vm/bitmap.h" 5 #include "vm/bitmap.h"
6 6
7 #include "platform/assert.h" 7 #include "platform/assert.h"
8 #include "vm/object.h" 8 #include "vm/object.h"
9 9
10 namespace dart { 10 namespace dart {
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 56
57 57
58 void BitmapBuilder::SetRange(intptr_t min, intptr_t max, bool value) { 58 void BitmapBuilder::SetRange(intptr_t min, intptr_t max, bool value) {
59 for (intptr_t i = min; i <= max; i++) { 59 for (intptr_t i = min; i <= max; i++) {
60 Set(i, value); 60 Set(i, value);
61 } 61 }
62 } 62 }
63 63
64 64
65 void BitmapBuilder::SetBits(const Stackmap& bitmap) { 65 void BitmapBuilder::SetBits(const Stackmap& bitmap) {
66 intptr_t min = bitmap.Minimum(); 66 intptr_t min = bitmap.MinimumBitOffset();
67 intptr_t max = bitmap.Maximum(); 67 intptr_t max = bitmap.MaximumBitOffset();
68 if (min == Stackmap::kNoMinimum || max == Stackmap::kNoMaximum) { 68 if (min == Stackmap::kNoMinimum || max == Stackmap::kNoMaximum) {
69 return; 69 return;
70 } 70 }
71 for (intptr_t i = 0; i < min; i++) { 71 for (intptr_t i = 0; i < min; i++) {
72 Set(i, false); 72 Set(i, false);
73 } 73 }
74 for (intptr_t i = min; i <= max; i++) { 74 for (intptr_t i = min; i <= max; i++) {
75 Set(i, bitmap.IsObject(i)); 75 Set(i, bitmap.IsObject(i));
76 } 76 }
77 intptr_t bound = SizeInBits(); 77 intptr_t bound = SizeInBits();
(...skipping 22 matching lines...) Expand all
100 ASSERT(bit_list_ != NULL); 100 ASSERT(bit_list_ != NULL);
101 byte_addr = &(bit_list_[byte_offset]); 101 byte_addr = &(bit_list_[byte_offset]);
102 if (value) { 102 if (value) {
103 *byte_addr |= mask; 103 *byte_addr |= mask;
104 } else { 104 } else {
105 *byte_addr &= ~mask; 105 *byte_addr &= ~mask;
106 } 106 }
107 } 107 }
108 108
109 } // namespace dart 109 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | vm/bitmap_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698