summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qmlcompileddata.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/declarative/qml/qmlcompileddata.cpp')
-rw-r--r--src/declarative/qml/qmlcompileddata.cpp37
1 files changed, 18 insertions, 19 deletions
diff --git a/src/declarative/qml/qmlcompileddata.cpp b/src/declarative/qml/qmlcompileddata.cpp
index 5c47d62..0834794 100644
--- a/src/declarative/qml/qmlcompileddata.cpp
+++ b/src/declarative/qml/qmlcompileddata.cpp
@@ -43,13 +43,15 @@
#include "qmlengine.h"
#include "qmlcomponent.h"
#include "qmlcomponent_p.h"
-#include "qmlcompiledcomponent_p.h"
#include "qmlcontext.h"
#include "qmlcontext_p.h"
#include <private/qobject_p.h>
+#include <QtCore/qdebug.h>
QT_BEGIN_NAMESPACE
+DEFINE_BOOL_CONFIG_OPTION(compilerDump, QML_COMPILER_DUMP);
+
int QmlCompiledData::pack(const char *data, size_t size)
{
const char *p = packData.constData();
@@ -153,11 +155,6 @@ QmlCompiledData::QmlCompiledData()
{
}
-QmlCompiledData::QmlCompiledData(const QmlCompiledData &other)
-{
- *this = other;
-}
-
QmlCompiledData::~QmlCompiledData()
{
for (int ii = 0; ii < types.count(); ++ii) {
@@ -166,19 +163,6 @@ QmlCompiledData::~QmlCompiledData()
}
}
-QmlCompiledData &QmlCompiledData::operator=(const QmlCompiledData &other)
-{
- types = other.types;
- root = other.root;
- primitives = other.primitives;
- floatData = other.floatData;
- intData = other.intData;
- customTypeData = other.customTypeData;
- datas = other.datas;
- bytecode = other.bytecode;
- return *this;
-}
-
QObject *QmlCompiledData::TypeReference::createInstance(QmlContext *ctxt) const
{
if (type) {
@@ -207,5 +191,20 @@ const QMetaObject *QmlCompiledData::TypeReference::metaObject() const
}
}
+void QmlCompiledData::dumpInstructions()
+{
+ if (!compilerDump())
+ return;
+
+ if (!name.isEmpty())
+ qWarning() << name;
+ qWarning() << "Index\tLine\tOperation\t\tData1\tData2\t\tComments";
+ qWarning() << "-------------------------------------------------------------------------------";
+ for (int ii = 0; ii < bytecode.count(); ++ii) {
+ dump(&bytecode[ii], ii);
+ }
+ qWarning() << "-------------------------------------------------------------------------------";
+}
+
QT_END_NAMESPACE