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

Side by Side Diff: runtime/vm/bit_vector.cc

Issue 14215006: Re-apply r20377. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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
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/bit_vector.h" 5 #include "vm/bit_vector.h"
6 6
7 #include "vm/os.h" 7 #include "vm/os.h"
8 8
9 namespace dart { 9 namespace dart {
10 10
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 for (intptr_t i = 0; i < data_length_; i++) { 81 for (intptr_t i = 0; i < data_length_; i++) {
82 const uword before = data_[i]; 82 const uword before = data_[i];
83 const uword after = data_[i] | (gen->data_[i] & ~kill->data_[i]); 83 const uword after = data_[i] | (gen->data_[i] & ~kill->data_[i]);
84 if (before != after) changed = true; 84 if (before != after) changed = true;
85 data_[i] = after; 85 data_[i] = after;
86 } 86 }
87 return changed; 87 return changed;
88 } 88 }
89 89
90 90
91 void BitVector::Intersect(const BitVector& other) { 91 void BitVector::Intersect(const BitVector* other) {
92 ASSERT(other.length() == length()); 92 ASSERT(other->length() == length());
93 for (int i = 0; i < data_length_; i++) { 93 for (int i = 0; i < data_length_; i++) {
94 data_[i] = data_[i] & other.data_[i]; 94 data_[i] = data_[i] & other->data_[i];
95 } 95 }
96 } 96 }
97 97
98 98
99 void BitVector::Print() const { 99 void BitVector::Print() const {
100 OS::Print("["); 100 OS::Print("[");
101 for (intptr_t i = 0; i < length_; i++) { 101 for (intptr_t i = 0; i < length_; i++) {
102 OS::Print(Contains(i) ? "1" : "0"); 102 OS::Print(Contains(i) ? "1" : "0");
103 } 103 }
104 OS::Print("]"); 104 OS::Print("]");
105 } 105 }
106 106
107 } // namespace dart 107 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/bit_vector.h ('k') | runtime/vm/bit_vector_test.cc » ('j') | runtime/vm/flow_graph.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698