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

Unified Diff: test/cctest/scope-test-helper.h

Issue 2679263002: Revert of [parsing] Fix maybe-assigned for loop variables. (Closed)
Patch Set: Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/cctest/parsing/test-preparser.cc ('k') | test/cctest/test-parsing.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/scope-test-helper.h
diff --git a/test/cctest/scope-test-helper.h b/test/cctest/scope-test-helper.h
index 7433136a8b0e70d50986f97d82573e3784480c2f..de77e47b32cfbb6de996a8a2477ad265c74eeadd 100644
--- a/test/cctest/scope-test-helper.h
+++ b/test/cctest/scope-test-helper.h
@@ -32,7 +32,7 @@
}
static void CompareScopeToData(Scope* scope, const PreParsedScopeData* data,
- size_t& index, bool precise_maybe_assigned) {
+ size_t& index) {
CHECK_EQ(data->backing_store_[index++], scope->scope_type());
CHECK_EQ(data->backing_store_[index++], scope->start_position());
CHECK_EQ(data->backing_store_[index++], scope->end_position());
@@ -70,19 +70,14 @@
}
#endif
CHECK_EQ(data->backing_store_[index++], local->location());
- if (precise_maybe_assigned) {
- CHECK_EQ(data->backing_store_[index++], local->maybe_assigned());
- } else {
- STATIC_ASSERT(kMaybeAssigned > kNotAssigned);
- CHECK_GE(data->backing_store_[index++], local->maybe_assigned());
- }
+ CHECK_EQ(data->backing_store_[index++], local->maybe_assigned());
}
}
for (Scope* inner = scope->inner_scope(); inner != nullptr;
inner = inner->sibling()) {
if (!ScopeTreeIsHidden(inner)) {
- CompareScopeToData(inner, data, index, precise_maybe_assigned);
+ CompareScopeToData(inner, data, index);
}
}
}
« no previous file with comments | « test/cctest/parsing/test-preparser.cc ('k') | test/cctest/test-parsing.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698