Commit f447aeac authored by neis's avatar neis Committed by Commit bot

[ast] Don't assume declaration scopes are never removed.

Because they sometimes are.

R=rossberg@chromium.org
BUG=v8:5648

Review-Url: https://codereview.chromium.org/2524333002
Cr-Commit-Position: refs/heads/master@{#41262}
parent b6ab7996
......@@ -638,7 +638,7 @@ Variable* DeclarationScope::DeclareFunctionVar(const AstRawString* name) {
bool Scope::HasBeenRemoved() const {
// TODO(neis): Store this information somewhere instead of calculating it.
if (!is_block_scope() || is_declaration_scope()) return false;
if (!is_block_scope()) return false; // Shortcut.
Scope* parent = outer_scope();
if (parent == nullptr) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment