From f79f6a02cb15be486b9c7a4fa58ca0aa380b4cc5 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Tue, 13 Jun 2017 12:34:46 +0200 Subject: Add bytecode dumper Change-Id: Ifd63cf604e66f46329472f82a46d37194a1b39eb Reviewed-by: Erik Verbruggen --- src/qml/compiler/qv4isel_moth.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/qml/compiler/qv4isel_moth.cpp') 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); -- cgit v1.2.3