diff options
author | Lars Knoll <lars.knoll@qt.io> | 2017-08-21 10:59:53 +0200 |
---|---|---|
committer | Erik Verbruggen <erik.verbruggen@qt.io> | 2017-08-25 12:05:59 +0000 |
commit | 4e0174a88e66b9d9471c98eeb7d8be6209ba5c98 (patch) | |
tree | 573aac0c41d77fab6dfe37d4d75e0446165d78f0 /src/qml/compiler/qv4instr_moth_p.h | |
parent | 3c201dd0d95020c4cb4c8ceaf779673d411664e7 (diff) |
Move line number information into a side table
Don't emit any Line instructions anymore, and instead store
the info in a side table in the compiled data, where it can
be looked up on demand.
Change-Id: Idcaf3bf4ee4129fd62f9e717bf1277dc6a34fe19
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
Diffstat (limited to 'src/qml/compiler/qv4instr_moth_p.h')
-rw-r--r-- | src/qml/compiler/qv4instr_moth_p.h | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/src/qml/compiler/qv4instr_moth_p.h b/src/qml/compiler/qv4instr_moth_p.h index 2ce0ff7b22..588ee7c110 100644 --- a/src/qml/compiler/qv4instr_moth_p.h +++ b/src/qml/compiler/qv4instr_moth_p.h @@ -64,7 +64,6 @@ QT_BEGIN_NAMESPACE #define MOTH_DEBUG_INSTR(F) #else #define MOTH_DEBUG_INSTR(F) \ - F(Line, line) \ F(Debug, debug) #endif @@ -236,9 +235,9 @@ inline bool operator!=(const StackSlot &l, const StackSlot &r) { return l.stackS // When making changes to the instructions, make sure to bump QV4_DATA_STRUCTURE_VERSION in qv4compileddata_p.h void dumpConstantTable(const Value *constants, uint count); -void dumpBytecode(const char *bytecode, int len, int nLocals, int nFormals); -inline void dumpBytecode(const QByteArray &bytecode, int nLocals, int nFormals) { - dumpBytecode(bytecode.constData(), bytecode.length(), nLocals, nFormals); +void dumpBytecode(const char *bytecode, int len, int nLocals, int nFormals, int startLine = 1, const QVector<int> &lineNumberMapping = QVector<int>()); +inline void dumpBytecode(const QByteArray &bytecode, int nLocals, int nFormals, int startLine = 1, const QVector<int> &lineNumberMapping = QVector<int>()) { + dumpBytecode(bytecode.constData(), bytecode.length(), nLocals, nFormals, startLine, lineNumberMapping); } union Instr @@ -256,13 +255,8 @@ union Instr }; #ifndef QT_NO_QML_DEBUGGING - struct instr_line { - MOTH_INSTR_HEADER - qint32 lineNumber; - }; struct instr_debug { MOTH_INSTR_HEADER - qint32 lineNumber; }; #endif // QT_NO_QML_DEBUGGING @@ -714,7 +708,6 @@ union Instr instr_common common; instr_ret ret; - instr_line line; instr_debug debug; instr_loadConst loadConst; instr_loadZero loadZero; |