aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2017-08-05 18:20:26 +0200
committerLars Knoll <lars.knoll@qt.io>2017-08-08 18:58:48 +0000
commit22eb1fc012ab1e9b96de293290c78087fe958a8a (patch)
treeb0d245ce36c45f68a06f3923b83725bbc762b076 /src
parent99783cd6dec326058b8db345145b1f8f71cfb6f0 (diff)
Move the function to call into the accumulator
Change-Id: Ie84f3f029111b17d62912c653edc35b4cc2de026 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/qml/compiler/qv4codegen.cpp4
-rw-r--r--src/qml/compiler/qv4instr_moth.cpp2
-rw-r--r--src/qml/compiler/qv4instr_moth_p.h1
-rw-r--r--src/qml/jsruntime/qv4vme_moth.cpp2
4 files changed, 5 insertions, 4 deletions
diff --git a/src/qml/compiler/qv4codegen.cpp b/src/qml/compiler/qv4codegen.cpp
index d044244322..d30fa40e7f 100644
--- a/src/qml/compiler/qv4codegen.cpp
+++ b/src/qml/compiler/qv4codegen.cpp
@@ -1060,11 +1060,13 @@ bool Codegen::visit(CallExpression *ast)
bytecodeGenerator->addInstruction(call);
}
} else {
+ base.loadInAccumulator();
+
Instruction::CallValue call;
- call.dest = base.stackSlot();
call.callData = calldata;
bytecodeGenerator->addInstruction(call);
}
+
_expr.setResult(Reference::fromAccumulator(this));
return false;
}
diff --git a/src/qml/compiler/qv4instr_moth.cpp b/src/qml/compiler/qv4instr_moth.cpp
index c810e17925..dc89436a02 100644
--- a/src/qml/compiler/qv4instr_moth.cpp
+++ b/src/qml/compiler/qv4instr_moth.cpp
@@ -242,7 +242,7 @@ void dumpBytecode(const char *code, int len, int nFormals)
MOTH_END_INSTR(LoadIdObject)
MOTH_BEGIN_INSTR(CallValue)
- d << instr.dest.dump(nFormals) << "(" << instr.callData.dump(nFormals) << ")";
+ d << "(" << instr.callData.dump(nFormals) << ")";
MOTH_END_INSTR(CallValue)
MOTH_BEGIN_INSTR(CallProperty)
diff --git a/src/qml/compiler/qv4instr_moth_p.h b/src/qml/compiler/qv4instr_moth_p.h
index ea06901463..5c2efd2c37 100644
--- a/src/qml/compiler/qv4instr_moth_p.h
+++ b/src/qml/compiler/qv4instr_moth_p.h
@@ -404,7 +404,6 @@ union Instr
struct instr_callValue {
MOTH_INSTR_HEADER
StackSlot callData;
- StackSlot dest;
};
struct instr_callProperty {
MOTH_INSTR_HEADER
diff --git a/src/qml/jsruntime/qv4vme_moth.cpp b/src/qml/jsruntime/qv4vme_moth.cpp
index be79cac636..847e4e39c7 100644
--- a/src/qml/jsruntime/qv4vme_moth.cpp
+++ b/src/qml/jsruntime/qv4vme_moth.cpp
@@ -616,7 +616,7 @@ QV4::ReturnedValue VME::exec(Function *function)
MOTH_BEGIN_INSTR(CallValue)
QV4::CallData *callData = reinterpret_cast<QV4::CallData *>(stack + instr.callData.stackSlot());
- STORE_ACCUMULATOR(Runtime::method_callValue(engine, STACK_VALUE(instr.dest), callData));
+ STORE_ACCUMULATOR(Runtime::method_callValue(engine, accumulator, callData));
MOTH_END_INSTR(CallValue)
MOTH_BEGIN_INSTR(CallProperty)