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

Unified Diff: src/parsing/pattern-rewriter.cc

Issue 2645503002: [parsing] Clarify a comment. (Closed)
Patch Set: Created 3 years, 11 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parsing/pattern-rewriter.cc
diff --git a/src/parsing/pattern-rewriter.cc b/src/parsing/pattern-rewriter.cc
index 9847b223f2be07f39e34453d7fd2188e206d928c..ff2d66c00fcfc4fbd101a875f081504f3ea14ce8 100644
--- a/src/parsing/pattern-rewriter.cc
+++ b/src/parsing/pattern-rewriter.cc
@@ -227,9 +227,10 @@ void Parser::PatternRewriter::VisitVariableProxy(VariableProxy* pattern) {
if (var_init_scope->is_script_scope() ||
var_init_scope->is_module_scope()) {
// We have to pessimistically assume that top-level variables will be
- // assigned. This is because there may be lazily parsed top-level
- // functions, which, for efficiency, we preparse without variable
- // tracking.
+ // assigned. This is because they might be accessed by a lazily parsed
+ // top-level function, which, for efficiency, we preparse without
+ // variable tracking. In the case of a script (not a module), they
+ // might also get accessed by another script.
proxy->set_is_assigned();
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698