Reviewers: dcarney, ulan,

Message:
Committed patchset #1 manually as r18617 (presubmit successful).

Description:
Experimental parser: make lexer_shell fair.

It should also retrieve the literal tokens in the time measurement mode, since
the experimental scanner delays literal token creation.

[email protected],[email protected]
BUG=

Committed: https://code.google.com/p/v8/source/detail?r=18617

Please review this at https://codereview.chromium.org/130303003/

SVN Base: https://v8.googlecode.com/svn/branches/experimental/parser

Affected files (+12, -0 lines):
  M src/lexer/lexer-shell.cc


Index: src/lexer/lexer-shell.cc
diff --git a/src/lexer/lexer-shell.cc b/src/lexer/lexer-shell.cc
index 5cc6e8b7294af2d3f03db67b21fc0b847bee1dd0..0c90926f687edfd4c46b4b719f66061fd56f0e6a 100644
--- a/src/lexer/lexer-shell.cc
+++ b/src/lexer/lexer-shell.cc
@@ -252,6 +252,12 @@ TimeDelta RunBaselineScanner(const char* fname,
     token = scanner.scanner_->Next();
     if (dump_tokens) {
       tokens->push_back(GetTokenWithLocation(scanner.scanner_, token));
+    } else if (HasLiteral(token)) {
+      if (scanner.scanner_->is_literal_ascii()) {
+        scanner.scanner_->literal_ascii_string();
+      } else {
+        scanner.scanner_->literal_utf16_string();
+      }
     }
   } while (token != Token::EOS);
   return timer.Elapsed();
@@ -279,6 +285,12 @@ TimeDelta RunExperimentalScanner(Handle<String> source,
     token = scanner.Next();
     if (dump_tokens) {
       tokens->push_back(GetTokenWithLocation(&scanner, token));
+    } else if (HasLiteral(token)) {
+      if (scanner.is_literal_ascii()) {
+        scanner.literal_ascii_string();
+      } else {
+        scanner.literal_utf16_string();
+      }
     }
   } while (token != Token::EOS);
   return timer.Elapsed();


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to