diff options
Diffstat (limited to 'src/3rdparty/javascriptcore/JavaScriptCore/parser')
-rw-r--r-- | src/3rdparty/javascriptcore/JavaScriptCore/parser/Grammar.y | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/parser/Grammar.y b/src/3rdparty/javascriptcore/JavaScriptCore/parser/Grammar.y index 717a266..4d6e7d1 100644 --- a/src/3rdparty/javascriptcore/JavaScriptCore/parser/Grammar.y +++ b/src/3rdparty/javascriptcore/JavaScriptCore/parser/Grammar.y @@ -1987,12 +1987,9 @@ static PropertyNode* makeGetterOrSetterPropertyNode(JSGlobalData* globalData, co static ExpressionNode* makeNegateNode(JSGlobalData* globalData, ExpressionNode* n) { if (n->isNumber()) { - NumberNode* number = static_cast<NumberNode*>(n); - - if (number->value() > 0.0) { - number->setValue(-number->value()); - return number; - } + NumberNode* numberNode = static_cast<NumberNode*>(n); + numberNode->setValue(-numberNode->value()); + return numberNode; } return new (globalData) NegateNode(globalData, n); |