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

Unified Diff: src/parser.h

Issue 87783004: DO NOT COMMIT: Trying to use ExperimentalScanner instead of Scanner; doesn't work. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/parser
Patch Set: This doesn't work either Created 7 years, 1 month 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 11936541d24e852a4318ffe889b0bb6b55136084..06418de1f5f4df425ff4d9a4d3d385e3fcfadd8e 100644
--- a/src/parser.h
+++ b/src/parser.h
@@ -104,7 +104,7 @@ class ScriptDataImpl : public ScriptData {
int GetSymbolIdentifier();
bool SanityCheck();
- Scanner::Location MessageLocation();
+ ScannerBase::Location MessageLocation();
const char* BuildMessage();
Vector<const char*> BuildArgs();
@@ -414,6 +414,8 @@ class Parser : public ParserBase {
~Parser() {
delete reusable_preparser_;
reusable_preparser_ = NULL;
+ delete scanner_;
+ scanner_ = NULL;
}
// Parses the source code represented by the compilation info and sets its
@@ -523,7 +525,7 @@ class Parser : public ParserBase {
FunctionLiteral* ParseProgram();
FunctionLiteral* ParseLazy();
- FunctionLiteral* ParseLazy(Utf16CharacterStream* source);
+ FunctionLiteral* ParseLazy(Handle<String> source);
Isolate* isolate() { return isolate_; }
Zone* zone() const { return zone_; }
@@ -538,13 +540,13 @@ class Parser : public ParserBase {
void ReportInvalidPreparseData(Handle<String> name, bool* ok);
void ReportMessage(const char* message, Vector<const char*> args);
void ReportMessage(const char* message, Vector<Handle<String> > args);
- void ReportMessageAt(Scanner::Location location, const char* type) {
+ void ReportMessageAt(ScannerBase::Location location, const char* type) {
ReportMessageAt(location, type, Vector<const char*>::empty());
}
- void ReportMessageAt(Scanner::Location loc,
+ void ReportMessageAt(ScannerBase::Location loc,
const char* message,
Vector<const char*> args);
- void ReportMessageAt(Scanner::Location loc,
+ void ReportMessageAt(ScannerBase::Location loc,
const char* message,
Vector<Handle<String> > args);
@@ -554,7 +556,7 @@ class Parser : public ParserBase {
}
bool inside_with() const { return top_scope_->inside_with(); }
- Scanner& scanner() { return scanner_; }
+ ScannerBase& scanner() { return *scanner_; }
Mode mode() const { return mode_; }
ScriptDataImpl* pre_parse_data() const { return pre_parse_data_; }
bool is_extended_mode() {
@@ -763,7 +765,6 @@ class Parser : public ParserBase {
ZoneList<Handle<String> > symbol_cache_;
Handle<Script> script_;
- Scanner scanner_;
PreParser* reusable_preparser_;
Scope* top_scope_;
Scope* original_scope_; // for ES5 function declarations in sloppy eval
« 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