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

Unified Diff: src/lexer/lexer-shell.cc

Issue 137553006: Experimental lexer: unbreak lexer_shell. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/parser
Patch Set: Created 6 years, 11 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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(),
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698