aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qv4codegen.cpp
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@me.com>2013-09-26 14:49:44 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-30 11:28:55 +0200
commit7c3f891c454971ed0150e66c2261e6e5c36664a3 (patch)
tree067a59085a30ddf7ade38dd1cad078033a886486 /src/qml/compiler/qv4codegen.cpp
parent9194779ef37187b1b38d73099747459f9f5e745c (diff)
V4: remove inplace operations
Inplace operations are expanded when building the IR, so the neither the IR, nor the instruction selection backends or runtime need to handle them. Change-Id: Id01f9544e137dd52364cf2ed2c10931c31ddfff3 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/qml/compiler/qv4codegen.cpp')
-rw-r--r--src/qml/compiler/qv4codegen.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/qml/compiler/qv4codegen.cpp b/src/qml/compiler/qv4codegen.cpp
index 74aa0892f9..0f60bdc9f3 100644
--- a/src/qml/compiler/qv4codegen.cpp
+++ b/src/qml/compiler/qv4codegen.cpp
@@ -655,24 +655,23 @@ void Codegen::move(V4IR::Expr *target, V4IR::Expr *source, V4IR::AluOp op)
{
assert(target->isLValue());
- // TODO: verify the rest of the function for when op == OpInvalid
if (op != V4IR::OpInvalid) {
- move(target, binop(op, target, source), V4IR::OpInvalid);
+ move(target, binop(op, target, source));
return;
}
- if (!source->asTemp() && !source->asConst() && (op != V4IR::OpInvalid || ! target->asTemp())) {
+ if (!source->asTemp() && !source->asConst() && !target->asTemp()) {
unsigned t = _block->newTemp();
_block->MOVE(_block->TEMP(t), source);
source = _block->TEMP(t);
}
- if (source->asConst() && (!target->asTemp() || op != V4IR::OpInvalid)) {
+ if (source->asConst() && !target->asTemp()) {
unsigned t = _block->newTemp();
_block->MOVE(_block->TEMP(t), source);
source = _block->TEMP(t);
}
- _block->MOVE(target, source, op);
+ _block->MOVE(target, source);
}
void Codegen::cjump(V4IR::Expr *cond, V4IR::BasicBlock *iftrue, V4IR::BasicBlock *iffalse)