aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qv4bytecodegenerator.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2017-06-29 14:45:20 +0200
committerErik Verbruggen <erik.verbruggen@qt.io>2017-06-30 07:50:57 +0000
commit6f1b4931d75993227def93c06935a933e8692f0b (patch)
tree00b67bf86d766a704d3f6be2213a5c0d1d3ff067 /src/qml/compiler/qv4bytecodegenerator.cpp
parent30a50e5387839c30a381992ded185a862858f791 (diff)
Don't use IR::Function for temp allocation anymore
Change-Id: Id9ab6f3e9f5ae1c1bedb0b34bf1fac6abfe0bbfc Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
Diffstat (limited to 'src/qml/compiler/qv4bytecodegenerator.cpp')
-rw-r--r--src/qml/compiler/qv4bytecodegenerator.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/qml/compiler/qv4bytecodegenerator.cpp b/src/qml/compiler/qv4bytecodegenerator.cpp
index 8d5ed671da..1bbd0fdd78 100644
--- a/src/qml/compiler/qv4bytecodegenerator.cpp
+++ b/src/qml/compiler/qv4bytecodegenerator.cpp
@@ -57,18 +57,18 @@ void BytecodeGenerator::setLocation(const QQmlJS::AST::SourceLocation &loc)
unsigned BytecodeGenerator::newTemp()
{
- int t = function->currentTemp++;
- if (function->tempCount < function->currentTemp)
- function->tempCount = function->currentTemp;
+ int t = currentTemp++;
+ if (tempCount < currentTemp)
+ tempCount = currentTemp;
return t;
}
unsigned BytecodeGenerator::newTempArray(int n)
{
- int t = function->currentTemp;
- function->currentTemp += n;
- if (function->tempCount < function->currentTemp)
- function->tempCount = function->currentTemp;
+ int t = currentTemp;
+ currentTemp += n;
+ if (tempCount < currentTemp)
+ tempCount = currentTemp;
return t;
}
@@ -78,7 +78,7 @@ QByteArray BytecodeGenerator::finalize()
Instruction::InitStackFrame init;
init.instructionType = Instr::InitStackFrame;
- init.value = quint32(function->tempCount);
+ init.value = quint32(tempCount);
code.append(reinterpret_cast<const char *>(&init), InstrMeta<Instr::InitStackFrame>::Size);
// content