Backed out changeset fc0ec12eec19 (bug 1066827)
authorCarsten "Tomcat" Book <cbook@mozilla.com>
Tue, 28 Oct 2014 12:22:54 +0100
changeset 212630 685abe864bcd2889f020bc874afce24d813b72bd
parent 212629 dee9660370893b5b23b7f863e983358067e1cd39
child 212631 63bf295591c06df12a9129604569c45f6b539adb
push id27721
push usercbook@mozilla.com
push dateTue, 28 Oct 2014 14:55:05 +0000
treeherdermozilla-central@c0ddb1b098ec [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1066827
milestone36.0a1
backs outfc0ec12eec19631dd080b8ea9f041ef400cd8ce4
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
Backed out changeset fc0ec12eec19 (bug 1066827)
js/src/frontend/Parser.cpp
js/src/frontend/Parser.h
--- a/js/src/frontend/Parser.cpp
+++ b/js/src/frontend/Parser.cpp
@@ -2020,32 +2020,31 @@ Parser<SyntaxParseHandler>::checkFunctio
         return abortIfSyntaxParser();
     }
 
     return true;
 }
 
 template <typename ParseHandler>
 bool
-Parser<ParseHandler>::addExprAndGetNextTemplStrToken(Node nodeList, TokenKind *ttp)
+Parser<ParseHandler>::addExprAndGetNextTemplStrToken(Node nodeList, TokenKind &tt)
 {
     Node pn = expr();
     if (!pn)
         return false;
     handler.addList(nodeList, pn);
 
-    TokenKind tt;
     if (!tokenStream.getToken(&tt))
         return false;
     if (tt != TOK_RC) {
         report(ParseError, false, null(), JSMSG_TEMPLSTR_UNTERM_EXPR);
         return false;
     }
 
-    return tokenStream.getToken(ttp, TokenStream::TemplateTail);
+    return tokenStream.getToken(&tt, TokenStream::TemplateTail);
 }
 
 template <typename ParseHandler>
 bool
 Parser<ParseHandler>::taggedTemplate(Node nodeList, TokenKind tt)
 {
     Node callSiteObjNode = handler.newCallSiteObject(pos().begin, pc->blockidGen);
     if (!callSiteObjNode)
@@ -2053,17 +2052,17 @@ Parser<ParseHandler>::taggedTemplate(Nod
     handler.addList(nodeList, callSiteObjNode);
 
     while (true) {
         if (!appendToCallSiteObj(callSiteObjNode))
             return false;
         if (tt != TOK_TEMPLATE_HEAD)
             break;
 
-        if (!addExprAndGetNextTemplStrToken(nodeList, &tt))
+        if (!addExprAndGetNextTemplStrToken(nodeList, tt))
             return false;
     }
     handler.setEndPosition(nodeList, callSiteObjNode);
     return true;
 }
 
 template <typename ParseHandler>
 typename ParseHandler::Node
@@ -2071,17 +2070,17 @@ Parser<ParseHandler>::templateLiteral()
 {
     Node pn = noSubstitutionTemplate();
     if (!pn)
         return null();
     Node nodeList = handler.newList(PNK_TEMPLATE_STRING_LIST, pn);
 
     TokenKind tt;
     do {
-        if (!addExprAndGetNextTemplStrToken(nodeList, &tt))
+        if (!addExprAndGetNextTemplStrToken(nodeList, tt))
             return null();
 
         pn = noSubstitutionTemplate();
         if (!pn)
             return null();
 
         handler.addList(nodeList, pn);
     } while (tt == TOK_TEMPLATE_HEAD);
--- a/js/src/frontend/Parser.h
+++ b/js/src/frontend/Parser.h
@@ -456,17 +456,17 @@ class Parser : private JS::AutoGCRooter,
 
     JSAtom * stopStringCompression();
 
     Node stringLiteral();
     Node noSubstitutionTemplate();
     Node templateLiteral();
     bool taggedTemplate(Node nodeList, TokenKind tt);
     bool appendToCallSiteObj(Node callSiteObj);
-    bool addExprAndGetNextTemplStrToken(Node nodeList, TokenKind *ttp);
+    bool addExprAndGetNextTemplStrToken(Node nodeList, TokenKind &tt);
 
     inline Node newName(PropertyName *name);
     inline Node newYieldExpression(uint32_t begin, Node expr, bool isYieldStar = false);
 
     inline bool abortIfSyntaxParser();
 
   public: