diff options
author | Simon Hausmann <[email protected]> | 2014-03-12 16:55:06 +0100 |
---|---|---|
committer | The Qt Project <[email protected]> | 2014-04-23 21:16:46 +0200 |
commit | a885d10a0289da85b8c966d2fa40fb10edae4fd7 (patch) | |
tree | 7c16b5abd88d436f6596d6a424126c1b1dd2aba8 /src/qml/compiler/qv4compileddata_p.h | |
parent | 937fdde5d3b26291d417f856ee05ba479a6ba730 (diff) |
Extend the QML bootstrap library by the IR builders
This is among other things needed to fix the qml import scanner to detect
dependencies from .js files correctly.
The patch also fixes the use of Q_QML_EXPORT towards Q_QML_PRIVATE_EXPORT
where appropriate and corrects the wrong include path for the double conversion
code to actually be relative to the file it is included from. This worked by
accident because of other include paths present in the build.
Change-Id: I338583dad2f76300819af8ab0dae8e5724c84430
Reviewed-by: Lars Knoll <[email protected]>
Diffstat (limited to 'src/qml/compiler/qv4compileddata_p.h')
-rw-r--r-- | src/qml/compiler/qv4compileddata_p.h | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/src/qml/compiler/qv4compileddata_p.h b/src/qml/compiler/qv4compileddata_p.h index a4dcfd9209..1fba6c0d3c 100644 --- a/src/qml/compiler/qv4compileddata_p.h +++ b/src/qml/compiler/qv4compileddata_p.h @@ -150,7 +150,6 @@ struct JSClass struct String { - quint32 hash; quint32 flags; // isArrayIndex QArrayData str; // uint16 strdata[] @@ -295,7 +294,7 @@ struct Q_QML_EXPORT TranslationData { int number; }; -struct Q_QML_EXPORT Binding +struct Q_QML_PRIVATE_EXPORT Binding { quint32 propertyNameIndex; @@ -561,26 +560,38 @@ struct QmlUnit // CompilationUnit * (for functions that need to clean up) // CompiledData::Function *compiledFunction -struct Q_QML_EXPORT CompilationUnit +struct Q_QML_PRIVATE_EXPORT CompilationUnit { +#ifdef V4_BOOTSTRAP + CompilationUnit() + : refCount(0) + , data(0) + {} + virtual ~CompilationUnit() {} +#else CompilationUnit() : refCount(0) - , engine(0) , data(0) + , engine(0) , runtimeStrings(0) , runtimeLookups(0) , runtimeRegularExpressions(0) , runtimeClasses(0) {} virtual ~CompilationUnit(); +#endif void ref() { ++refCount; } void deref() { if (!--refCount) delete this; } int refCount; - ExecutionEngine *engine; Unit *data; + // Called only when building QML, when we build the header for JS first and append QML data + virtual QV4::CompiledData::Unit *createUnitData(QmlIR::Document *irDocument); + +#ifndef V4_BOOTSTRAP + ExecutionEngine *engine; QString fileName() const { return data->stringAt(data->sourceFileIndex); } QV4::StringValue *runtimeStrings; // Array @@ -589,9 +600,6 @@ struct Q_QML_EXPORT CompilationUnit QV4::InternalClass **runtimeClasses; QVector<QV4::Function *> runtimeFunctions; - // Called only when building QML, when we build the header for JS first and append QML data - virtual QV4::CompiledData::Unit *createUnitData(QmlIR::Document *irDocument); - QV4::Function *linkToEngine(QV4::ExecutionEngine *engine); void unlink(); @@ -601,6 +609,7 @@ struct Q_QML_EXPORT CompilationUnit protected: virtual void linkBackendToEngine(QV4::ExecutionEngine *engine) = 0; +#endif // V4_BOOTSTRAP }; } |