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 ∅ |
} |
- 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; |
}; |