aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qv4codegen_p.h
diff options
context:
space:
mode:
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;