diff options
| author | Lars Knoll <lars.knoll@digia.com> | 2013-11-15 16:36:13 +0100 |
|---|---|---|
| committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-12-04 09:45:33 +0100 |
| commit | 0fa9cf218bdd3054585f23abfb2b707e26ce987a (patch) | |
| tree | 346592c0d570d138278c659dbbbbda23ec1d148d /src/qml/jsruntime/qv4debugging.cpp | |
| parent | 608a9600142878574a509964941413bb15c91201 (diff) | |
Use an internalClass to represent formals and locals in CallContexts
formals and locals in a CallContext where so far accessed through a
linear search in ExecutionContext::getProperty. Fix this by
introducing an internalClass for the Function used by the call
context.
Change-Id: I1141efa12b19d6de4a354bfd6e769c5ffcb8898b
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4debugging.cpp')
| -rw-r--r-- | src/qml/jsruntime/qv4debugging.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4debugging.cpp b/src/qml/jsruntime/qv4debugging.cpp index 95b4100651..1673428c0b 100644 --- a/src/qml/jsruntime/qv4debugging.cpp +++ b/src/qml/jsruntime/qv4debugging.cpp @@ -299,9 +299,10 @@ void Debugger::collectArgumentsInContext(Collector *collector, int frameNr, int Scope scope(engine); ScopedValue v(scope); - for (unsigned i = 0, ei = ctxt->formalCount(); i != ei; ++i) { + int nFormals = ctxt->formalCount(); + for (unsigned i = 0, ei = nFormals; i != ei; ++i) { QString qName; - if (String *name = ctxt->formals()[i]) + if (String *name = ctxt->formals()[nFormals - i - 1]) qName = name->toQString(); v = ctxt->argument(i); collector->collect(qName, v); |
