Commit 074f344b authored by neis's avatar neis Committed by Commit bot

[ast] Simplify a condition.

R=gsathya@chromium.org
TBR=adamk@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2688143002
Cr-Commit-Position: refs/heads/master@{#43096}
parent 79570f87
......@@ -37,9 +37,8 @@ Variable::Variable(Scope* scope, const AstRawString* name, VariableMode mode,
bool Variable::IsGlobalObjectProperty() const {
// Temporaries are never global, they must always be allocated in the
// activation frame.
return (IsDynamicVariableMode(mode()) ||
(IsDeclaredVariableMode(mode()) && !IsLexicalVariableMode(mode()))) &&
scope_ != NULL && scope_->is_script_scope();
return (IsDynamicVariableMode(mode()) || mode() == VAR) &&
scope_ != nullptr && scope_->is_script_scope();
}
} // namespace internal
......
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