diff options
author | Lars Knoll <lars.knoll@digia.com> | 2013-10-29 08:17:54 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-10-29 14:06:11 +0100 |
commit | 61be39a01b4d3348161472260efef14f8a6e7896 (patch) | |
tree | a1e150e73203880ac0d82ec9a684fdcf8938b206 /src/qml/compiler/qv4isel_moth.cpp | |
parent | cfe24c1aa0f3ec168437cd22e355c28e5e7a4f09 (diff) |
Remove the LoadValue instruction
With the constant table this is exactly the same as a move.
Also renamed MoveTemp to Move, as it not only moves Temps
but also other variables.
Change-Id: I1fccc04314661954179d903519adbc39777395e5
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/compiler/qv4isel_moth.cpp')
-rw-r--r-- | src/qml/compiler/qv4isel_moth.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/qml/compiler/qv4isel_moth.cpp b/src/qml/compiler/qv4isel_moth.cpp index 295227cb97..c2fae823f5 100644 --- a/src/qml/compiler/qv4isel_moth.cpp +++ b/src/qml/compiler/qv4isel_moth.cpp @@ -423,10 +423,10 @@ void InstructionSelection::loadConst(V4IR::Const *sourceConst, V4IR::Temp *targe { assert(sourceConst); - Instruction::LoadValue load; - load.value = getParam(sourceConst); - load.result = getResultParam(targetTemp); - addInstruction(load); + Instruction::Move move; + move.source = getParam(sourceConst); + move.result = getResultParam(targetTemp); + addInstruction(move); } void InstructionSelection::loadString(const QString &str, V4IR::Temp *targetTemp) @@ -513,7 +513,7 @@ void InstructionSelection::copyValue(V4IR::Temp *sourceTemp, V4IR::Temp *targetT if (_stackSlotAllocator) _stackSlotAllocator->addHint(*sourceTemp, *targetTemp); - Instruction::MoveTemp move; + Instruction::Move move; move.source = getParam(sourceTemp); move.result = getResultParam(targetTemp); if (move.source != move.result) @@ -633,7 +633,7 @@ void InstructionSelection::prepareCallArgs(V4IR::ExprList *e, quint32 &argc, qui // We need to move all the temps into the function arg array assert(argLocation >= 0); while (e) { - Instruction::MoveTemp move; + Instruction::Move move; move.source = getParam(e->expr); move.result = Param::createTemp(argLocation); addInstruction(move); @@ -773,11 +773,11 @@ void InstructionSelection::callBuiltinDeleteName(const QString &name, V4IR::Temp void InstructionSelection::callBuiltinDeleteValue(V4IR::Temp *result) { - Instruction::LoadValue load; + Instruction::Move move; int idx = jsUnitGenerator()->registerConstant(QV4::Encode(false)); - load.value = Param::createConstant(idx); - load.result = getResultParam(result); - addInstruction(load); + move.source = Param::createConstant(idx); + move.result = getResultParam(result); + addInstruction(move); } void InstructionSelection::callBuiltinThrow(V4IR::Expr *arg) @@ -896,7 +896,7 @@ void InstructionSelection::callBuiltinDefineObjectLiteral(V4IR::Temp *result, V4 bool isData = it->expr->asConst()->value; it = it->next; - Instruction::MoveTemp move; + Instruction::Move move; move.source = getParam(it->expr); move.result = Param::createTemp(argLocation); addInstruction(move); @@ -905,7 +905,7 @@ void InstructionSelection::callBuiltinDefineObjectLiteral(V4IR::Temp *result, V4 if (!isData) { it = it->next; - Instruction::MoveTemp move; + Instruction::Move move; move.source = getParam(it->expr); move.result = Param::createTemp(argLocation); addInstruction(move); |