Index: test/cctest/scope-test-helper.h |
diff --git a/test/cctest/scope-test-helper.h b/test/cctest/scope-test-helper.h |
index de77e47b32cfbb6de996a8a2477ad265c74eeadd..7433136a8b0e70d50986f97d82573e3784480c2f 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) { |
+ size_t& index, bool precise_maybe_assigned) { |
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,14 +70,19 @@ |
} |
#endif |
CHECK_EQ(data->backing_store_[index++], local->location()); |
- CHECK_EQ(data->backing_store_[index++], local->maybe_assigned()); |
+ 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()); |
+ } |
} |
} |
for (Scope* inner = scope->inner_scope(); inner != nullptr; |
inner = inner->sibling()) { |
if (!ScopeTreeIsHidden(inner)) { |
- CompareScopeToData(inner, data, index); |
+ CompareScopeToData(inner, data, index, precise_maybe_assigned); |
} |
} |
} |