aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/compiler')
-rw-r--r--src/qml/compiler/qv4codegen.cpp12
-rw-r--r--src/qml/compiler/qv4compileddata_p.h8
-rw-r--r--src/qml/compiler/qv4instr_moth.cpp1
-rw-r--r--src/qml/compiler/qv4instr_moth_p.h2
4 files changed, 15 insertions, 8 deletions
diff --git a/src/qml/compiler/qv4codegen.cpp b/src/qml/compiler/qv4codegen.cpp
index 448fbff27b..1149c9ff1e 100644
--- a/src/qml/compiler/qv4codegen.cpp
+++ b/src/qml/compiler/qv4codegen.cpp
@@ -293,8 +293,8 @@ Codegen::Reference Codegen::unop(UnaryOperation op, const Reference &expr)
}
case UPlus: {
expr.loadInAccumulator();
- Instruction::UPlus uplus;
- bytecodeGenerator->addInstruction(uplus);
+ Instruction::UPlus uplus = {};
+ bytecodeGenerator->addTracingInstruction(uplus);
return Reference::fromAccumulator(this);
}
case Not: {
@@ -313,8 +313,8 @@ Codegen::Reference Codegen::unop(UnaryOperation op, const Reference &expr)
if (!_expr.accept(nx) || requiresReturnValue) {
Reference e = expr.asLValue();
e.loadInAccumulator();
- Instruction::UPlus uplus;
- bytecodeGenerator->addInstruction(uplus);
+ Instruction::UPlus uplus = {};
+ bytecodeGenerator->addTracingInstruction(uplus);
Reference originalValue = Reference::fromStackSlot(this).storeRetainAccumulator();
Instruction::Increment inc = {};
bytecodeGenerator->addTracingInstruction(inc);
@@ -339,8 +339,8 @@ Codegen::Reference Codegen::unop(UnaryOperation op, const Reference &expr)
if (!_expr.accept(nx) || requiresReturnValue) {
Reference e = expr.asLValue();
e.loadInAccumulator();
- Instruction::UPlus uplus;
- bytecodeGenerator->addInstruction(uplus);
+ Instruction::UPlus uplus = {};
+ bytecodeGenerator->addTracingInstruction(uplus);
Reference originalValue = Reference::fromStackSlot(this).storeRetainAccumulator();
Instruction::Decrement dec = {};
bytecodeGenerator->addTracingInstruction(dec);
diff --git a/src/qml/compiler/qv4compileddata_p.h b/src/qml/compiler/qv4compileddata_p.h
index 1aaba13241..726b82fea9 100644
--- a/src/qml/compiler/qv4compileddata_p.h
+++ b/src/qml/compiler/qv4compileddata_p.h
@@ -73,7 +73,13 @@
QT_BEGIN_NAMESPACE
// Bump this whenever the compiler data structures change in an incompatible way.
-#define QV4_DATA_STRUCTURE_VERSION 0x1b
+//
+// IMPORTANT:
+//
+// Also change the comment behind the number to describe the latest change. This has the added
+// benefit that if another patch changes the version too, it will result in a merge conflict, and
+// not get removed silently.
+#define QV4_DATA_STRUCTURE_VERSION 0x1c // Add trace slot to UPlus
class QIODevice;
class QQmlPropertyData;
diff --git a/src/qml/compiler/qv4instr_moth.cpp b/src/qml/compiler/qv4instr_moth.cpp
index c0b1be1492..f528e1f9d3 100644
--- a/src/qml/compiler/qv4instr_moth.cpp
+++ b/src/qml/compiler/qv4instr_moth.cpp
@@ -615,6 +615,7 @@ void dumpBytecode(const char *code, int len, int nLocals, int nFormals, int /*st
MOTH_END_INSTR(UNot)
MOTH_BEGIN_INSTR(UPlus)
+ d << TRACE_SLOT;
MOTH_END_INSTR(UPlus)
MOTH_BEGIN_INSTR(UMinus)
diff --git a/src/qml/compiler/qv4instr_moth_p.h b/src/qml/compiler/qv4instr_moth_p.h
index 3996143843..f853c1f1ab 100644
--- a/src/qml/compiler/qv4instr_moth_p.h
+++ b/src/qml/compiler/qv4instr_moth_p.h
@@ -171,7 +171,7 @@ QT_BEGIN_NAMESPACE
#define INSTR_CmpIn(op) INSTRUCTION(op, CmpIn, 1, lhs)
#define INSTR_CmpInstanceOf(op) INSTRUCTION(op, CmpInstanceOf, 1, lhs)
#define INSTR_UNot(op) INSTRUCTION(op, UNot, 0)
-#define INSTR_UPlus(op) INSTRUCTION(op, UPlus, 0)
+#define INSTR_UPlus(op) INSTRUCTION(op, UPlus, 1, traceSlot)
#define INSTR_UMinus(op) INSTRUCTION(op, UMinus, 1, traceSlot)
#define INSTR_UCompl(op) INSTRUCTION(op, UCompl, 0)
#define INSTR_Increment(op) INSTRUCTION(op, Increment, 1, traceSlot)