| Index: src/data-flow.cc
|
| diff --git a/src/data-flow.cc b/src/data-flow.cc
|
| index be824460f0a1fb1b559cccc89391912c84ff784c..9c02ff48e10211ca4cc8df5c9db6cf6192463584 100644
|
| --- a/src/data-flow.cc
|
| +++ b/src/data-flow.cc
|
| @@ -33,7 +33,6 @@
|
| namespace v8 {
|
| namespace internal {
|
|
|
| -
|
| #ifdef DEBUG
|
| void BitVector::Print() {
|
| bool first = true;
|
| @@ -50,13 +49,39 @@ void BitVector::Print() {
|
| #endif
|
|
|
|
|
| +void BitVector::Iterator::Advance() {
|
| + current_++;
|
| + uint32_t val = current_value_;
|
| + while (val == 0) {
|
| + current_index_++;
|
| + if (Done()) return;
|
| + val = target_->data_[current_index_];
|
| + current_ = current_index_ << 5;
|
| + }
|
| + val = SkipZeroBytes(val);
|
| + val = SkipZeroBits(val);
|
| + current_value_ = val >> 1;
|
| +}
|
| +
|
| +
|
| bool AssignedVariablesAnalyzer::Analyze(CompilationInfo* info) {
|
| - info_ = info;
|
| Scope* scope = info->scope();
|
| - int variables = scope->num_parameters() + scope->num_stack_slots();
|
| - if (variables == 0) return true;
|
| - av_.ExpandTo(variables);
|
| - VisitStatements(info->function()->body());
|
| + int size = scope->num_parameters() + scope->num_stack_slots();
|
| + if (size == 0) return true;
|
| + AssignedVariablesAnalyzer analyzer(info, size);
|
| + return analyzer.Analyze();
|
| +}
|
| +
|
| +
|
| +AssignedVariablesAnalyzer::AssignedVariablesAnalyzer(CompilationInfo* info,
|
| + int size)
|
| + : info_(info), av_(size) {
|
| +}
|
| +
|
| +
|
| +bool AssignedVariablesAnalyzer::Analyze() {
|
| + ASSERT(av_.length() > 0);
|
| + VisitStatements(info_->function()->body());
|
| return !HasStackOverflow();
|
| }
|
|
|
| @@ -318,11 +343,6 @@ void AssignedVariablesAnalyzer::VisitConditional(Conditional* expr) {
|
| }
|
|
|
|
|
| -void AssignedVariablesAnalyzer::VisitSlot(Slot* expr) {
|
| - UNREACHABLE();
|
| -}
|
| -
|
| -
|
| void AssignedVariablesAnalyzer::VisitVariableProxy(VariableProxy* expr) {
|
| // Nothing to do.
|
| ASSERT(av_.IsEmpty());
|
|
|