diff options
author | Lars Knoll <lars.knoll@qt.io> | 2017-06-30 10:50:04 +0200 |
---|---|---|
committer | Erik Verbruggen <erik.verbruggen@qt.io> | 2017-06-30 11:33:46 +0000 |
commit | 12ff47eb52fdaf01589b61a3f879d2f5edf7962f (patch) | |
tree | c75afba4aa8bc400999f5e85d110fd2aaf352e29 /src/qml/compiler/qv4compileddata.cpp | |
parent | b00fe4531841f4a61e093e5c9c18a1e1faa03aff (diff) |
Dump String and Closure table with QV4_SHOW_BYTECODE
Change-Id: I085da80bf335d3fbe707f6b460381f0e828328e0
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
Diffstat (limited to 'src/qml/compiler/qv4compileddata.cpp')
-rw-r--r-- | src/qml/compiler/qv4compileddata.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/qml/compiler/qv4compileddata.cpp b/src/qml/compiler/qv4compileddata.cpp index 4000a593a7..80bb835bbb 100644 --- a/src/qml/compiler/qv4compileddata.cpp +++ b/src/qml/compiler/qv4compileddata.cpp @@ -194,14 +194,21 @@ QV4::Function *CompilationUnit::linkToEngine(ExecutionEngine *engine) constants = reinterpret_cast<const Value*>(data->constants()); #endif + linkBackendToEngine(engine); + static const bool showCode = qEnvironmentVariableIsSet("QV4_SHOW_BYTECODE"); if (showCode) { qDebug() << "=== Constant table"; Moth::dumpConstantTable(constants, data->constantTableSize); + qDebug() << "=== String table"; + for (uint i = 0; i < data->stringTableSize; ++i) + qDebug() << " " << i << ":" << runtimeStrings[i]->toQString(); + qDebug() << "=== Closure table"; + for (uint i = 0; i < data->functionTableSize; ++i) + qDebug() << " " << i << ":" << runtimeFunctions[i]->name()->toQString(); + qDebug() << "root function at index " << (data->indexOfRootFunction != -1 ? data->indexOfRootFunction : 0); } - linkBackendToEngine(engine); - if (data->indexOfRootFunction != -1) return runtimeFunctions[data->indexOfRootFunction]; else |