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

Unified Diff: src/variables.cc

Issue 10872084: Allocate block-scoped global bindings to global context. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 4 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
Index: src/variables.cc
diff --git a/src/variables.cc b/src/variables.cc
index 32ad5bc5dd4d09329ed1bd702106d3e0ee6dbcf9..64311d925d92c16bd04a6a2316a69b1db0e7d814 100644
--- a/src/variables.cc
+++ b/src/variables.cc
@@ -81,10 +81,11 @@ Variable::Variable(Scope* scope,
}
-bool Variable::is_global() const {
+bool Variable::IsGlobalObjectProperty() const {
// Temporaries are never global, they must always be allocated in the
// activation frame.
- return mode_ != TEMPORARY && scope_ != NULL && scope_->is_global_scope();
+ return mode_ != TEMPORARY && mode_ != LET && mode_ != CONST_HARMONY
+ && scope_ != NULL && scope_->is_global_scope();
}
« src/parser.cc ('K') | « src/variables.h ('k') | test/cctest/test-decls.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698