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

Unified Diff: src/ast/variables.cc

Issue 2688143002: [ast] Simplify a condition. (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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast/variables.cc
diff --git a/src/ast/variables.cc b/src/ast/variables.cc
index f138727177d93fd49f0d2ceb37ce5668785738af..cd1d8f77b712eeab6058faacb19c285513453508 100644
--- a/src/ast/variables.cc
+++ b/src/ast/variables.cc
@@ -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
« 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