diff options
Diffstat (limited to 'src/qml/compiler')
-rw-r--r-- | src/qml/compiler/compiler.pri | 14 | ||||
-rw-r--r-- | src/qml/compiler/qv4compileddata_p.h | 14 | ||||
-rw-r--r-- | src/qml/compiler/qv4instr_moth_p.h | 5 | ||||
-rw-r--r-- | src/qml/compiler/qv4isel_moth_p.h | 2 |
4 files changed, 23 insertions, 12 deletions
diff --git a/src/qml/compiler/compiler.pri b/src/qml/compiler/compiler.pri index e49f5c40a5..a63de67b4c 100644 --- a/src/qml/compiler/compiler.pri +++ b/src/qml/compiler/compiler.pri @@ -25,8 +25,6 @@ SOURCES += \ HEADERS += \ $$PWD/qqmltypecompiler_p.h \ - $$PWD/qv4isel_moth_p.h \ - $$PWD/qv4instr_moth_p.h \ $$PWD/qqmlpropertycachecreator_p.h \ $$PWD/qqmlpropertyvalidator_p.h \ $$PWD/qv4compilationunitmapper_p.h @@ -34,8 +32,6 @@ HEADERS += \ SOURCES += \ $$PWD/qqmltypecompiler.cpp \ - $$PWD/qv4instr_moth.cpp \ - $$PWD/qv4isel_moth.cpp \ $$PWD/qqmlpropertycachecreator.cpp \ $$PWD/qqmlpropertyvalidator.cpp \ $$PWD/qv4compilationunitmapper.cpp @@ -43,4 +39,14 @@ SOURCES += \ unix: SOURCES += $$PWD/qv4compilationunitmapper_unix.cpp else: SOURCES += $$PWD/qv4compilationunitmapper_win.cpp +qtConfig(qml-interpreter) { + HEADERS += \ + $$PWD/qv4instr_moth_p.h \ + $$PWD/qv4isel_moth_p.h + SOURCES += \ + $$PWD/qv4instr_moth.cpp \ + $$PWD/qv4isel_moth.cpp +} + + } diff --git a/src/qml/compiler/qv4compileddata_p.h b/src/qml/compiler/qv4compileddata_p.h index ae8677138e..fe18024070 100644 --- a/src/qml/compiler/qv4compileddata_p.h +++ b/src/qml/compiler/qv4compileddata_p.h @@ -71,7 +71,7 @@ QT_BEGIN_NAMESPACE // Bump this whenever the compiler data structures change in an incompatible way. -#define QV4_DATA_STRUCTURE_VERSION 0x04 +#define QV4_DATA_STRUCTURE_VERSION 0x05 class QIODevice; class QQmlPropertyCache; @@ -202,6 +202,8 @@ struct String } }; +// Function is aligned on an 8-byte boundary to make sure there are no bus errors or penalties +// for unaligned access. The ordering of the fields is also from largest to smallest. struct Function { enum Flags : unsigned int { @@ -212,6 +214,11 @@ struct Function HasCatchOrWith = 0x10 }; + // Absolute offset into file where the code for this function is located. Only used when the function + // is serialized. + LEUInt64 codeOffset; + LEUInt64 codeSize; + LEUInt32 nameIndex; LEUInt32 nFormals; LEUInt32 formalsOffset; @@ -229,11 +236,6 @@ struct Function LEUInt32 dependingScopePropertiesOffset; // Array of int pairs (property index and notify index) // Qml Extensions End - // Absolute offset into file where the code for this function is located. Only used when the function - // is serialized. - LEUInt64 codeOffset; - LEUInt64 codeSize; - // quint32 formalsIndex[nFormals] // quint32 localsIndex[nLocals] // quint32 offsetForInnerFunctions[nInnerFunctions] diff --git a/src/qml/compiler/qv4instr_moth_p.h b/src/qml/compiler/qv4instr_moth_p.h index beb43376ee..b83bcdb83b 100644 --- a/src/qml/compiler/qv4instr_moth_p.h +++ b/src/qml/compiler/qv4instr_moth_p.h @@ -50,12 +50,13 @@ // // We mean it. // - -#include <QtCore/qglobal.h> +#include <private/qv4global_p.h> #include <private/qv4value_p.h> #include <private/qv4function_p.h> #include <private/qv4runtime_p.h> +QT_REQUIRE_CONFIG(qml_interpreter); + QT_BEGIN_NAMESPACE #ifdef QT_NO_QML_DEBUGGER diff --git a/src/qml/compiler/qv4isel_moth_p.h b/src/qml/compiler/qv4isel_moth_p.h index 9699555670..afe5fe342e 100644 --- a/src/qml/compiler/qv4isel_moth_p.h +++ b/src/qml/compiler/qv4isel_moth_p.h @@ -59,6 +59,8 @@ #include <private/qv4value_p.h> #include "qv4instr_moth_p.h" +QT_REQUIRE_CONFIG(qml_interpreter); + QT_BEGIN_NAMESPACE namespace QV4 { |