aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qv4codegen_p.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2017-08-03 17:07:29 +0200
committerLars Knoll <lars.knoll@qt.io>2017-08-04 07:08:13 +0000
commitb46b2e28b39443f6250c0d751a593b35af1c8c1e (patch)
treec15f6db0d87ad48c405cbff62f72e624c8f1d81e /src/qml/compiler/qv4codegen_p.h
parent59f219d2df059d5fb1baf8751f830bb17816a307 (diff)
Keep order of arguments on the stack
Don't reverse the arguments order when copying them. In addition, copy the this object as well, so we don't need to access the context anymore to access it. Change-Id: I38055c55387c4253cb53dd12fa69126840fa1270 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
Diffstat (limited to 'src/qml/compiler/qv4codegen_p.h')
-rw-r--r--src/qml/compiler/qv4codegen_p.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/qml/compiler/qv4codegen_p.h b/src/qml/compiler/qv4codegen_p.h
index 56bed33c19..f55ef026a8 100644
--- a/src/qml/compiler/qv4codegen_p.h
+++ b/src/qml/compiler/qv4codegen_p.h
@@ -219,7 +219,7 @@ public:
}
static Reference fromArgument(Codegen *cg, int index) {
Reference r(cg, StackSlot);
- r.theStackSlot = Moth::StackSlot::createArgument(index);
+ r.theStackSlot = Moth::StackSlot::createArgument(cg->currentContext()->arguments.size(), index);
r.stackSlotIsLocalOrArgument = true;
return r;
}
@@ -614,6 +614,8 @@ public:
QQmlRefPointer<QV4::CompiledData::CompilationUnit> generateCompilationUnit(bool generateUnitData = true);
static QQmlRefPointer<QV4::CompiledData::CompilationUnit> createUnitForLoading();
+ Context *currentContext() const { return _context; }
+
protected:
friend class ScanFunctions;
friend struct ControlFlow;