diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2019-12-04 15:47:06 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2019-12-05 10:02:11 +0100 |
commit | cc66dd33cc44b5131c27d85daecf1b920f900f49 (patch) | |
tree | 4185a9060abc9ce04a5798dd93873ff7bb1e991c /src/qml/common | |
parent | e2af7c3b37095e601a84cc52de69a99af8e5d3a2 (diff) |
Compiler: Support >32k stack slots
Previously, the code generator would truncate the stack slots when
writing the compiled function, as that one only had a 16bit field for
them.
Also, add a debug-mode check for stack overflows to the interpreter.
Unfortunately, as it triggers a stack overflow, the test will not
reliably fail without this change.
Fixes: QTBUG-80511
Change-Id: I3019bb2de657ae4c3e1040db798a83533f854bff
Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qml/common')
-rw-r--r-- | src/qml/common/qv4compileddata_p.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/qml/common/qv4compileddata_p.h b/src/qml/common/qv4compileddata_p.h index c3ddce5884..1f5ad9bd86 100644 --- a/src/qml/common/qv4compileddata_p.h +++ b/src/qml/common/qv4compileddata_p.h @@ -75,7 +75,7 @@ QT_BEGIN_NAMESPACE // Also change the comment behind the number to describe the latest change. This has the added // benefit that if another patch changes the version too, it will result in a merge conflict, and // not get removed silently. -#define QV4_DATA_STRUCTURE_VERSION 0x24 // Collect function parameter types +#define QV4_DATA_STRUCTURE_VERSION 0x25 // Extend size of "register" count (nRegisters) class QIODevice; class QQmlTypeNameCache; @@ -303,13 +303,15 @@ struct Function quint16_le nLineNumbers; size_t lineNumberOffset() const { return localsOffset + nLocals * sizeof(quint32); } quint32_le nestedFunctionIndex; // for functions that only return a single closure, used in signal handlers + + quint32_le nRegisters; + Location location; + quint32_le nLabelInfos; + quint16_le sizeOfLocalTemporalDeadZone; quint16_le firstTemporalDeadZoneRegister; quint16_le sizeOfRegisterTemporalDeadZone; - quint16_le nRegisters; - Location location; - quint32_le nLabelInfos; size_t labelInfosOffset() const { return lineNumberOffset() + nLineNumbers * sizeof(CodeOffsetToLine); } // Keep all unaligned data at the end |