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

Unified Diff: src/variables.h

Issue 8423005: Remove some unnecessary binding initialization checks. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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
« src/v8globals.h ('K') | « 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 e23e00bd38081da8a1805955230859e52644615f..732deb54aae272fd7d92c35357ba415207e0bac2 100644
--- a/src/variables.h
+++ b/src/variables.h
@@ -77,7 +77,8 @@ class Variable: public ZoneObject {
Handle<String> name,
VariableMode mode,
bool is_valid_lhs,
- Kind kind);
+ Kind kind,
+ InitializationFlag initialization_flag_);
Jakob Kummerow 2011/10/31 12:44:34 nit: no trailing underscore
Steven 2011/10/31 14:28:29 Done.
// Printing support
static const char* Mode2String(VariableMode mode);
@@ -123,9 +124,7 @@ class Variable: public ZoneObject {
mode_ == CONST_HARMONY);
}
bool binding_needs_init() const {
- return (mode_ == LET ||
- mode_ == CONST ||
- mode_ == CONST_HARMONY);
+ return initialization_flag_ == NEEDS_INITIALIZATION;
}
bool is_global() const;
@@ -148,6 +147,9 @@ class Variable: public ZoneObject {
Location location() const { return location_; }
int index() const { return index_; }
+ InitializationFlag initialization_flag() const {
+ return initialization_flag_;
+ }
void AllocateTo(Location location, int index) {
location_ = location;
@@ -174,6 +176,7 @@ class Variable: public ZoneObject {
// Usage info.
bool is_accessed_from_inner_scope_; // set by variable resolver
bool is_used_;
+ InitializationFlag initialization_flag_;
};
« src/v8globals.h ('K') | « src/v8globals.h ('k') | src/variables.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698