diff options
author | Erik Verbruggen <erik.verbruggen@qt.io> | 2017-11-21 10:10:36 +0100 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2017-11-23 15:05:25 +0000 |
commit | 458daae517b4465fafb315323e9c727f1655764d (patch) | |
tree | 623a4a9a6268f08c53cb2369268c98bda966d1c6 /src/qml/compiler/qv4codegen.cpp | |
parent | 1f5c79c59aa43e416778a2046e4121731b34bb6a (diff) |
V4: Change CallValue to have the value on the stack
We used to store the value-to-be-called in the accumulator. So the
generated bytecode looked like:
LoadReg r1
CallValue()
The first thing done in CallValue is to store the accumulator. So by not
loading the accumulator, we can actually remove the subsequent store,
which results in less interpreter instructions and one less store in
CallValue.
Change-Id: Icc7c8a5449bf369b9226d66bc6055cb705ef660e
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/qml/compiler/qv4codegen.cpp')
-rw-r--r-- | src/qml/compiler/qv4codegen.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/compiler/qv4codegen.cpp b/src/qml/compiler/qv4codegen.cpp index 68bda2dcd3..6abcf82f44 100644 --- a/src/qml/compiler/qv4codegen.cpp +++ b/src/qml/compiler/qv4codegen.cpp @@ -1315,9 +1315,9 @@ bool Codegen::visit(CallExpression *ast) bytecodeGenerator->addInstruction(call); } } else { - base.loadInAccumulator(); - + Q_ASSERT(base.isStackSlot()); Instruction::CallValue call; + call.name = base.stackSlot(); call.argc = calldata.argc; call.argv = calldata.argv; bytecodeGenerator->addInstruction(call); |