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

Unified Diff: src/parser.h

Issue 7904008: Introduce with scope and rework variable resolution. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Latest version. Created 9 years, 3 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/mips/full-codegen-mips.cc ('k') | src/parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parser.h
diff --git a/src/parser.h b/src/parser.h
index 3312f2f56a85de7c66c0d7db34768157eeb8752a..2f604a35076204569a5fff6d11e0ac1fa018f748 100644
--- a/src/parser.h
+++ b/src/parser.h
@@ -43,6 +43,7 @@ class ParserLog;
class PositionStack;
class Target;
class LexicalScope;
+class SaveScope;
template <typename T> class ZoneListWrapper;
@@ -473,7 +474,7 @@ class Parser {
void ReportInvalidPreparseData(Handle<String> name, bool* ok);
void ReportMessage(const char* message, Vector<const char*> args);
- bool inside_with() const { return with_nesting_level_ > 0; }
+ bool inside_with() const { return top_scope_->inside_with(); }
JavaScriptScanner& scanner() { return scanner_; }
Mode mode() const { return mode_; }
ScriptDataImpl* pre_data() const { return pre_data_; }
@@ -674,7 +675,7 @@ class Parser {
return &empty;
}
- Scope* NewScope(Scope* parent, Scope::Type type, bool inside_with);
+ Scope* NewScope(Scope* parent, Scope::Type type);
Handle<String> LookupSymbol(int symbol_id);
@@ -719,7 +720,6 @@ class Parser {
JavaScriptScanner scanner_;
Scope* top_scope_;
- int with_nesting_level_;
LexicalScope* lexical_scope_;
Mode mode_;
@@ -739,6 +739,7 @@ class Parser {
bool harmony_block_scoping_;
friend class LexicalScope;
+ friend class SaveScope;
};
« no previous file with comments | « src/mips/full-codegen-mips.cc ('k') | src/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698