Revision: 18617
Author:   [email protected]
Date:     Wed Jan 15 12:13:18 2014 UTC
Log:      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=

Review URL: https://codereview.chromium.org/130303003
http://code.google.com/p/v8/source/detail?r=18617

Modified:
 /branches/experimental/parser/src/lexer/lexer-shell.cc

=======================================
--- /branches/experimental/parser/src/lexer/lexer-shell.cc Mon Dec 2 11:45:18 2013 UTC +++ /branches/experimental/parser/src/lexer/lexer-shell.cc Wed Jan 15 12:13:18 2014 UTC
@@ -252,6 +252,12 @@
     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 @@
     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