Files
sdk/runtime/vm/bit_vector.cc
T
kmillikin@google.com e4030da968 Compute assigned variables and dominance frontiers.
During basic block discovery, compute assigned variables in each
block.  After computing immediate dominators, compute dominance
frontiers.  Both of these will be used for SSA construction.

R=fschneider@google.com,srdjan@google.com
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//10377104

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7685 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-16 13:28:02 +00:00

37 lines
859 B
C++

// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
#include "vm/bit_vector.h"
#include "vm/os.h"
namespace dart {
void BitVector::Iterator::Advance() {
++bit_index_;
// Skip zero words.
if (current_word_ == 0) {
do {
++word_index_;
if (Done()) return;
current_word_ = target_->data_[word_index_];
} while (current_word_ == 0);
bit_index_ = word_index_ * kBitsPerWord;
}
// Skip zero bytes.
while ((current_word_ & 0xff) == 0) {
current_word_ >>= 8;
bit_index_ += 8;
}
// Skip zero bits.
while ((current_word_ & 0x1) == 0) {
current_word_ >>= 1;
++bit_index_;
}
current_word_ = current_word_ >> 1;
}
} // namespace dart