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

Unified Diff: src/variables.cc

Issue 10897010: Introduce some predicates over variable modes. (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 64311d925d92c16bd04a6a2316a69b1db0e7d814..0416f3a3908d321b35d2c647145e2ce7173ac4e0 100644
--- a/src/variables.cc
+++ b/src/variables.cc
@@ -41,7 +41,7 @@ const char* Variable::Mode2String(VariableMode mode) {
switch (mode) {
case VAR: return "VAR";
case CONST: return "CONST";
- case CONST_HARMONY: return "CONST";
+ case CONST_HARMONY: return "CONST_HARMONY";
case LET: return "LET";
case DYNAMIC: return "DYNAMIC";
case DYNAMIC_GLOBAL: return "DYNAMIC_GLOBAL";
@@ -84,7 +84,7 @@ Variable::Variable(Scope* scope,
bool Variable::IsGlobalObjectProperty() const {
// Temporaries are never global, they must always be allocated in the
// activation frame.
- return mode_ != TEMPORARY && mode_ != LET && mode_ != CONST_HARMONY
+ return mode_ != TEMPORARY && !IsLexicalVariableMode(mode_)
&& scope_ != NULL && scope_->is_global_scope();
}
« src/v8globals.h ('K') | « src/variables.h ('k') | src/x64/full-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698