From 7264bc0178e7e6af7cfe02e9e0c6b26ee0e6007f Mon Sep 17 00:00:00 2001 From: Ingvar Stepanyan Date: Thu, 5 Feb 2015 00:02:21 +0200 Subject: [PATCH] Fix found V8 deopt. Increases perf from 230K to 360K lines/sec on std bench on my machine. --- acorn.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/acorn.js b/acorn.js index b129ed62e6..02e8d5491f 100644 --- a/acorn.js +++ b/acorn.js @@ -1238,7 +1238,7 @@ function readWord1() { containsEsc = false; var word = "", first = true, chunkStart = tokPos; - for (;;) { + while (tokPos < inputLen) { var ch = input.charCodeAt(tokPos); if (isIdentifierChar(ch)) { ++tokPos;