Skip parens around operand of unary op when constant folding (352068, r=mrbkap).
git-svn-id: svn://10.0.0.236/trunk@209816 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -6368,6 +6368,8 @@ js_FoldConstants(JSContext *cx, JSParseNode *pn, JSTreeContext *tc)
|
||||
break;
|
||||
|
||||
case TOK_UNARYOP:
|
||||
while (pn1->pn_type == TOK_RP)
|
||||
pn1 = pn1->pn_kid;
|
||||
if (pn1->pn_type == TOK_NUMBER) {
|
||||
jsdouble d;
|
||||
int32 i;
|
||||
|
||||
Reference in New Issue
Block a user