Backed out changeset fc0ec12eec19 (bug 1066827)

This commit is contained in:
Carsten "Tomcat" Book 2014-10-28 12:22:54 +01:00
parent 397e2ad78a
commit 2c5485c8fb
2 changed files with 5 additions and 6 deletions

View File

@ -2025,14 +2025,13 @@ Parser<SyntaxParseHandler>::checkFunctionDefinition(HandlePropertyName funName,
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) {
@ -2040,7 +2039,7 @@ Parser<ParseHandler>::addExprAndGetNextTemplStrToken(Node nodeList, TokenKind *t
return false;
}
return tokenStream.getToken(ttp, TokenStream::TemplateTail);
return tokenStream.getToken(&tt, TokenStream::TemplateTail);
}
template <typename ParseHandler>
@ -2058,7 +2057,7 @@ Parser<ParseHandler>::taggedTemplate(Node nodeList, TokenKind tt)
if (tt != TOK_TEMPLATE_HEAD)
break;
if (!addExprAndGetNextTemplStrToken(nodeList, &tt))
if (!addExprAndGetNextTemplStrToken(nodeList, tt))
return false;
}
handler.setEndPosition(nodeList, callSiteObjNode);
@ -2076,7 +2075,7 @@ Parser<ParseHandler>::templateLiteral()
TokenKind tt;
do {
if (!addExprAndGetNextTemplStrToken(nodeList, &tt))
if (!addExprAndGetNextTemplStrToken(nodeList, tt))
return null();
pn = noSubstitutionTemplate();

View File

@ -461,7 +461,7 @@ class Parser : private JS::AutoGCRooter, public StrictModeGetter
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);