Bug 773153: don't use operand context when looking for line end. r=njn
authorBenjamin Peterson <benjamin@python.org>
Thu, 12 Jul 2012 00:03:25 -0700
changeset 99044 341214c1b9641b726e23abbc7e91006587de6f35
parent 99043 4be97839a566d8f482f431801237afc4caac22ae
child 99045 184ba174e8a6af3415169bf22d80ddc5a64666d0
push id11799
push usergkwong@mozilla.com
push dateThu, 12 Jul 2012 07:03:46 +0000
treeherdermozilla-inbound@341214c1b964 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnjn
bugs773153
milestone16.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 773153: don't use operand context when looking for line end. r=njn
js/src/frontend/Parser.cpp
js/src/jit-test/tests/basic/bug773153.js
--- a/js/src/frontend/Parser.cpp
+++ b/js/src/frontend/Parser.cpp
@@ -1886,17 +1886,17 @@ Parser::processDirectives(ParseNode *stm
     bool gotStrictMode = false;
     for (TokenKind tt = tokenStream.getToken(TSF_OPERAND); tt == TOK_STRING; tt = tokenStream.getToken(TSF_OPERAND)) {
         ParseNode *stringNode = atomNode(PNK_STRING, JSOP_STRING);
         if (!stringNode)
             return false;
         const Token directive = tokenStream.currentToken();
         bool isDirective = IsEscapeFreeStringLiteral(directive);
         JSAtom *atom = directive.atom();
-        TokenKind next = tokenStream.peekTokenSameLine(TSF_OPERAND);
+        TokenKind next = tokenStream.peekTokenSameLine();
         if (next != TOK_EOF && next != TOK_EOL && next != TOK_SEMI && next != TOK_RC) {
             freeTree(stringNode);
             if (next == TOK_ERROR)
                 return false;
             break;
         }
         tokenStream.matchToken(TOK_SEMI);
         if (isDirective) {
new file mode 100644
--- /dev/null
+++ b/js/src/jit-test/tests/basic/bug773153.js
@@ -0,0 +1,3 @@
+function f() {
+    "" < "";
+}