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

Unified Diff: src/parser.h

Issue 527233003: Parser cleanup: less member variables. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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 | « no previous file | 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 c975471eccf8ef67bb5d835860336e3bdd53b8cb..4ccc6139a51383ab5f2c521d539cfa7aa1e4c531 100644
--- a/src/parser.h
+++ b/src/parser.h
@@ -659,8 +659,12 @@ class Parser : public ParserBase<ParserTraits> {
FunctionLiteral* ParseLazy();
FunctionLiteral* ParseLazy(Utf16CharacterStream* source);
- Isolate* isolate() { return isolate_; }
+ Isolate* isolate() { return info_->isolate(); }
CompilationInfo* info() const { return info_; }
+ Handle<Script> script() const { return info_->script(); }
+ AstValueFactory* ast_value_factory() const {
+ return info_->ast_value_factory();
+ }
// Called by ParseProgram after setting up the scanner.
FunctionLiteral* DoParseProgram(CompilationInfo* info,
@@ -813,15 +817,11 @@ class Parser : public ParserBase<ParserTraits> {
// internalize strings (move them to the heap).
void Internalize();
- Isolate* isolate_;
-
- Handle<Script> script_;
Scanner scanner_;
PreParser* reusable_preparser_;
Scope* original_scope_; // for ES5 function declarations in sloppy eval
Target* target_stack_; // for break, continue statements
ParseData* cached_parse_data_;
- AstValueFactory* ast_value_factory_;
CompilationInfo* info_;
@@ -854,7 +854,7 @@ Scope* ParserTraits::NewScope(Scope* parent_scope, ScopeType scope_type) {
const AstRawString* ParserTraits::EmptyIdentifierString() {
- return parser_->ast_value_factory_->empty_string();
+ return parser_->ast_value_factory()->empty_string();
}
@@ -881,7 +881,7 @@ void ParserTraits::CheckConflictingVarDeclarations(v8::internal::Scope* scope,
AstValueFactory* ParserTraits::ast_value_factory() {
- return parser_->ast_value_factory_;
+ return parser_->ast_value_factory();
}
« no previous file with comments | « no previous file | src/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698