aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2022-11-10 14:50:18 +0100
committerUlf Hermann <ulf.hermann@qt.io>2022-11-11 12:07:42 +0100
commit259aec7cb4c031e14771d8eabbdea7866f03d698 (patch)
treedbc1262ac958b784ed8dff00a2ce2e762713ba8f /src
parent17318c4805d089f10c25f8165dae7d1f908bd311 (diff)
QmlCompiler: Ignore InitializeDeadTemporalZone instruction
We don't discern between empty and undefined values in the compiler. Fixes: QTBUG-104192 Change-Id: Ida06386433ef9e8f9a7cba4bec99ba8e77edc324 Reviewed-by: Sami Shalayel <sami.shalayel@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/qmlcompiler/qqmljscodegenerator.cpp2
-rw-r--r--src/qmlcompiler/qqmljstypepropagator.cpp3
2 files changed, 3 insertions, 2 deletions
diff --git a/src/qmlcompiler/qqmljscodegenerator.cpp b/src/qmlcompiler/qqmljscodegenerator.cpp
index d0297a1abb..e360644b08 100644
--- a/src/qmlcompiler/qqmljscodegenerator.cpp
+++ b/src/qmlcompiler/qqmljscodegenerator.cpp
@@ -2321,7 +2321,7 @@ void QQmlJSCodeGenerator::generate_InitializeBlockDeadTemporalZone(int firstReg,
{
Q_UNUSED(firstReg)
Q_UNUSED(count)
- BYTECODE_UNIMPLEMENTED();
+ // Ignore. We reject uninitialized values anyway.
}
void QQmlJSCodeGenerator::generate_ThrowOnNullOrUndefined()
diff --git a/src/qmlcompiler/qqmljstypepropagator.cpp b/src/qmlcompiler/qqmljstypepropagator.cpp
index 8878364aba..423530d274 100644
--- a/src/qmlcompiler/qqmljstypepropagator.cpp
+++ b/src/qmlcompiler/qqmljstypepropagator.cpp
@@ -2107,7 +2107,7 @@ void QQmlJSTypePropagator::generate_InitializeBlockDeadTemporalZone(int firstReg
{
Q_UNUSED(firstReg)
Q_UNUSED(count)
- INSTR_PROLOGUE_NOT_IMPLEMENTED();
+ // Ignore. We reject uninitialized values anyway.
}
void QQmlJSTypePropagator::generate_ThrowOnNullOrUndefined()
@@ -2238,6 +2238,7 @@ void QQmlJSTypePropagator::endInstruction(QV4::Moth::Instr::Type instr)
case QV4::Moth::Instr::Type::SetUnwindHandler:
case QV4::Moth::Instr::Type::PushCatchContext:
case QV4::Moth::Instr::Type::UnwindDispatch:
+ case QV4::Moth::Instr::Type::InitializeBlockDeadTemporalZone:
if (m_state.changedRegisterIndex() == Accumulator && !m_error->isValid()) {
setError(u"Instruction is not expected to populate the accumulator"_s);
return;