diff options
author | Olivier De Cannière <olivier.decanniere@qt.io> | 2023-02-14 12:10:43 +0100 |
---|---|---|
committer | Olivier De Cannière <olivier.decanniere@qt.io> | 2023-02-15 09:02:08 +0100 |
commit | e5c2b236a04050bf20aaf96068e9b9b911bc70ad (patch) | |
tree | e876af7f0367849700e029d0ea4646e8c6b08981 /src/qml/jit | |
parent | 8721df3dae5c78e5406a01308c033baf9b9d6844 (diff) |
JIT: Fix isNullOrUndefined bad logic
A logic error was left over in isNullOrUndefined that didn't actually
check for null of undefined after a change of encoding.
tst_qqmllanguage::isNullOrUndefined() was added to check the bug doesn't
happen anymore. Two cases are tested. The first is intended to run on
the interpreter. It was fine before this change and should be fine
afterwards. The second one calls the same function many times for JIT
optimizations to kick in and compile the function. This should ensure
the broken '??' and '?.' operators are fixed when running on the JIT.
Amends c7722d4ed61d6a887e9f6c403ffa10b2048de2a4.
Fixes: QTBUG-111088
Pick-to: 6.5
Change-Id: I0e6d77363770e801aa586588e242220dec9d5e0a
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/qml/jit')
-rw-r--r-- | src/qml/jit/qv4baselineassembler.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/qml/jit/qv4baselineassembler.cpp b/src/qml/jit/qv4baselineassembler.cpp index b97126945e..156266a234 100644 --- a/src/qml/jit/qv4baselineassembler.cpp +++ b/src/qml/jit/qv4baselineassembler.cpp @@ -236,8 +236,7 @@ public: void isNullOrUndefined() { move(AccumulatorRegister, ScratchRegister); - move(TrustedImm64(Value::ManagedMask), ScratchRegister2); - compare64(Equal, ScratchRegister, ScratchRegister2, AccumulatorRegister); + compare64(Equal, ScratchRegister, TrustedImm32(0), AccumulatorRegister); Jump isUndef = branch32(NotEqual, TrustedImm32(0), AccumulatorRegister); // not undefined |