Reviewers: ulan,

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

Description:
Experimental lexer: unbreak lexer_shell.

BUG=
[email protected]

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

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

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

Affected files (+4, -2 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 9176454e0c7897b2ee44c1bc4a31504e7bfcf953..f953688eee45e1e65e2ae9cb4acafc7107ef4235 100644
--- a/src/lexer/lexer-shell.cc
+++ b/src/lexer/lexer-shell.cc
@@ -492,7 +492,8 @@ int main(int argc, char* argv[]) {
       for (size_t i = 0; i < fnames.size(); i++) {
         std::pair<TimeDelta, TimeDelta> times;
         bool can_truncate = eos_test;
-        for (int truncate_by = 0; can_truncate; ++truncate_by) {
+        int truncate_by = 0;
+        do {
           times = ProcessFile(fnames[i].c_str(),
                               encoding,
                               internal_isolate,
@@ -507,7 +508,8 @@ int main(int argc, char* argv[]) {
                               &can_truncate);
           baseline_total += times.first.InMillisecondsF();
           experimental_total += times.second.InMillisecondsF();
-        }
+          ++truncate_by;
+        } while (can_truncate);
       }
       if (run_baseline) {
         printf("Baseline%s(RunTime): %.f ms\n", benchmark.c_str(),


--
--
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