aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jit/qv4baselinejit.cpp
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@qt.io>2019-01-10 13:42:42 +0100
committerErik Verbruggen <erik.verbruggen@qt.io>2019-02-01 14:07:23 +0000
commitad8e47f5181fd8240645282abbc671812a9f4fa8 (patch)
treecdd5da6824bca8e84e860d5f91d3e812bdf16e9a /src/qml/jit/qv4baselinejit.cpp
parent3254ac322be96ad0ee5efd3d0728be03d8be34da (diff)
V4: Change ByteCodeHandler::startInstruction to return an enum
If ProcessInstruction is returned, the generate_* function and endInstruction will be called. If SkipInstruction is returned, they won't be called. This can be used by subclasses that can detect dead code, to suppress handling that code. Change-Id: I3b4a8eebb5701f287c8199bd40bc63fe04a35007 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Diffstat (limited to 'src/qml/jit/qv4baselinejit.cpp')
-rw-r--r--src/qml/jit/qv4baselinejit.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/qml/jit/qv4baselinejit.cpp b/src/qml/jit/qv4baselinejit.cpp
index 8de0259509..b0734d0a2d 100644
--- a/src/qml/jit/qv4baselinejit.cpp
+++ b/src/qml/jit/qv4baselinejit.cpp
@@ -1023,10 +1023,11 @@ void BaselineJIT::generate_GetTemplateObject(int index)
as->checkException();
}
-void BaselineJIT::startInstruction(Instr::Type /*instr*/)
+ByteCodeHandler::Verdict BaselineJIT::startInstruction(Instr::Type /*instr*/)
{
if (labels.contains(currentInstructionOffset()))
as->addLabel(currentInstructionOffset());
+ return ProcessInstruction;
}
void BaselineJIT::endInstruction(Instr::Type instr)