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

Unified Diff: src/preparser.h

Issue 209863004: PreParser cleanup: no need to track with-ness of scopes. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: rebased Created 6 years, 9 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 | src/preparser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/preparser.h
diff --git a/src/preparser.h b/src/preparser.h
index ee8e46b96e6e00bb41ca3d926918206a40606e5e..080b7728730b576a18adcb6b5699f8dd20d5e4fb 100644
--- a/src/preparser.h
+++ b/src/preparser.h
@@ -678,18 +678,7 @@ class PreParserScope {
public:
explicit PreParserScope(PreParserScope* outer_scope, ScopeType scope_type)
: scope_type_(scope_type) {
- if (outer_scope) {
- scope_inside_with_ = outer_scope->scope_inside_with_ || is_with_scope();
- strict_mode_ = outer_scope->strict_mode();
- } else {
- scope_inside_with_ = is_with_scope();
- strict_mode_ = SLOPPY;
- }
- }
-
- bool is_with_scope() const { return scope_type_ == WITH_SCOPE; }
- bool inside_with() const {
- return scope_inside_with_;
+ strict_mode_ = outer_scope ? outer_scope->strict_mode() : SLOPPY;
}
ScopeType type() { return scope_type_; }
@@ -698,7 +687,6 @@ class PreParserScope {
private:
ScopeType scope_type_;
- bool scope_inside_with_;
StrictMode strict_mode_;
};
« no previous file with comments | « no previous file | src/preparser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698