summaryrefslogtreecommitdiff
path: root/src/qml/compiler/qv4isel_moth.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2017-06-13 12:34:46 +0200
committerErik Verbruggen <erik.verbruggen@qt.io>2017-06-19 13:36:13 +0000
commitf79f6a02cb15be486b9c7a4fa58ca0aa380b4cc5 (patch)
treeafc9db5ad8441d164e9f0f9d66be6d1992956c0f /src/qml/compiler/qv4isel_moth.cpp
parent5e9551ec5b1a782882f93310f8f07be51bb17bf7 (diff)
downloadqtdeclarative-f79f6a02cb15be486b9c7a4fa58ca0aa380b4cc5.tar.gz
Add bytecode dumper
Change-Id: Ifd63cf604e66f46329472f82a46d37194a1b39eb Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
Diffstat (limited to 'src/qml/compiler/qv4isel_moth.cpp')
-rw-r--r--src/qml/compiler/qv4isel_moth.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/qml/compiler/qv4isel_moth.cpp b/src/qml/compiler/qv4isel_moth.cpp
index 3041be79a7..7d62d71e98 100644
--- a/src/qml/compiler/qv4isel_moth.cpp
+++ b/src/qml/compiler/qv4isel_moth.cpp
@@ -281,6 +281,9 @@ void InstructionSelection::run(int functionIndex)
patchJumpAddresses();
_function->code = squeezeCode();
+ static const bool showCode = qEnvironmentVariableIsSet("QV4_SHOW_BYTECODE");
+ if (showCode)
+ QV4::Moth::dumpBytecode(_function->code);
qSwap(_currentStatement, cs);
qSwap(_removableJumps, removableJumps);