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

Unified Diff: src/variables.h

Issue 7992005: Block scoped const variables. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Comments, function variable mode, preparser. Created 9 years, 2 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 | « src/v8globals.h ('k') | src/variables.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/variables.h
diff --git a/src/variables.h b/src/variables.h
index c5fef9ac6ff998db981e7d48d18f7beeb7805bea..8b2d8695688de1fe5861f37add96eeda12ffcfbc 100644
--- a/src/variables.h
+++ b/src/variables.h
@@ -118,6 +118,15 @@ class Variable: public ZoneObject {
mode_ == DYNAMIC_GLOBAL ||
mode_ == DYNAMIC_LOCAL);
}
+ bool is_const_mode() const {
+ return (mode_ == CONST ||
+ mode_ == CONST_HARMONY);
+ }
+ bool binding_needs_init() const {
+ return (mode_ == LET ||
+ mode_ == CONST ||
+ mode_ == CONST_HARMONY);
+ }
bool is_global() const;
bool is_this() const { return kind_ == THIS; }
« no previous file with comments | « src/v8globals.h ('k') | src/variables.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698