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

Unified Diff: vm/parser.cc

Issue 10697055: Represent tokens as a compressed stream instead of an array. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 6 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
Index: vm/parser.cc
===================================================================
--- vm/parser.cc (revision 9303)
+++ vm/parser.cc (working copy)
@@ -196,31 +196,6 @@
}
-bool TokenStreamIterator::IsValid() const {
- return !tokens_.IsNull();
-}
-
-
-Token::Kind TokenStreamIterator::CurrentTokenKind() const {
- return tokens_.KindAt(token_position_);
-}
-
-
-Token::Kind TokenStreamIterator::LookaheadTokenKind(intptr_t num_tokens) const {
- return tokens_.KindAt(token_position_ + num_tokens);
-}
-
-
-RawObject* TokenStreamIterator::CurrentToken() const {
- return tokens_.TokenAt(token_position_);
-}
-
-
-RawString* TokenStreamIterator::CurrentLiteral() const {
- return tokens_.LiteralAt(token_position_);
-}
-
-
struct Parser::Block : public ZoneAllocated {
Block(Block* outer_block, LocalScope* local_scope, SequenceNode* seq)
: parent(outer_block), scope(local_scope), statements(seq) {
@@ -356,9 +331,6 @@
TimerScope timer(FLAG_compiler_stats, &CompilerStats::parser_timer);
Parser parser(script, library);
parser.ParseTopLevel();
- if (FLAG_compiler_stats) {
- CompilerStats::num_tokens_total += parser.tokens_iterator_.NumberOfTokens();
- }
}

Powered by Google App Engine
This is Rietveld 408576698