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

Unified Diff: src/parser.h

Issue 181543003: Proof of concept: API for doing only one parsing pass instead of first preparsing and then parsing. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: rebased -- this applies to r19832 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 | « src/compiler.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 799ec5860d55bbc89f69d0b61c0bfc4990a2fe52..af69f889a3cba4fefe091bfdbe6a73bf5ba780e7 100644
--- a/src/parser.h
+++ b/src/parser.h
@@ -609,14 +609,14 @@ class Parser : public ParserBase<ParserTraits> {
// Report syntax error
void ReportInvalidPreparseData(Handle<String> name, bool* ok);
- void set_pre_parse_data(ScriptDataImpl *data) {
- pre_parse_data_ = data;
- symbol_cache_.Initialize(data ? data->symbol_count() : 0, zone());
+ void set_cached_data(ScriptDataImpl** data) {
+ cached_data_ = data;
+ symbol_cache_.Initialize(data && *data ? (*data)->symbol_count() : 0,
+ zone());
}
bool inside_with() const { return scope_->inside_with(); }
Mode mode() const { return mode_; }
- ScriptDataImpl* pre_parse_data() const { return pre_parse_data_; }
Scope* DeclarationScope(VariableMode mode) {
return IsLexicalVariableMode(mode)
? scope_ : scope_->DeclarationScope();
@@ -788,6 +788,7 @@ class Parser : public ParserBase<ParserTraits> {
Scope* original_scope_; // for ES5 function declarations in sloppy eval
Target* target_stack_; // for break, continue statements
ScriptDataImpl* pre_parse_data_;
+ ScriptDataImpl** cached_data_;
Mode mode_;
« no previous file with comments | « src/compiler.cc ('k') | src/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698