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

Unified Diff: src/lexer/experimental-scanner.h

Issue 39673002: Experimental scanner: save all token data into one vector. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/parser
Patch Set: Created 7 years, 2 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/lexer/experimental-scanner.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/lexer/experimental-scanner.h
diff --git a/src/lexer/experimental-scanner.h b/src/lexer/experimental-scanner.h
index 5b117f97b406a76dfc60b4fe8e3769191cc24b21..18d67fd7cdebfac0ab2144e0753b4879a0cfdc50 100644
--- a/src/lexer/experimental-scanner.h
+++ b/src/lexer/experimental-scanner.h
@@ -54,6 +54,11 @@ class ExperimentalScanner {
int end_pos;
};
+ struct SavedToken {
+ int beg, end;
+ Token::Value value;
+ };
+
ExperimentalScanner(const char* fname,
bool read_all_at_once,
Isolate* isolate);
@@ -68,9 +73,7 @@ class ExperimentalScanner {
private:
void FillTokens();
static const int BUFFER_SIZE = 256;
- std::vector<v8::internal::Token::Value> token_;
- std::vector<int> beg_;
- std::vector<int> end_;
+ std::vector<SavedToken> token_;
size_t current_;
size_t fetched_;
FILE* file_;
« no previous file with comments | « no previous file | src/lexer/experimental-scanner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698