aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jit
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2018-06-03 22:03:02 +0200
committerLars Knoll <lars.knoll@qt.io>2018-06-04 13:02:25 +0000
commit9a0a074452c6534f25a878047398eea77a8c7e0e (patch)
treee429e3a85658b067c485ad1e089d5f0e01e18e30 /src/qml/jit
parent3e351e6208b6b83a46909c9ac65eb8a5c878d707 (diff)
Fix remaining test failures with the ** operator
Change-Id: I98da5b552747d6d0b363d83ecb4c408c66a2667b Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/jit')
-rw-r--r--src/qml/jit/qv4baselinejit.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/qml/jit/qv4baselinejit.cpp b/src/qml/jit/qv4baselinejit.cpp
index 764e75937e..cd07ac4d58 100644
--- a/src/qml/jit/qv4baselinejit.cpp
+++ b/src/qml/jit/qv4baselinejit.cpp
@@ -967,7 +967,9 @@ static ReturnedValue expHelper(const Value &base, const Value &exp)
{
double b = base.toNumber();
double e = exp.toNumber();
- return QV4::Encode(pow(b,e));
+ if (qIsInf(e) && (b == 1 || b == -1))
+ return Encode(qSNaN());
+ return Encode(pow(b,e));
}
void BaselineJIT::generate_Exp(int lhs) {