aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2017-07-04 22:23:17 +0200
committerErik Verbruggen <erik.verbruggen@qt.io>2017-07-05 09:07:50 +0000
commitd3a1a9e4fea5f6b623ebd13f43957ebbe5bfabea (patch)
treea45456e687e70def0065042fae0ed4ccec103fb4 /src/plugins
parent493edae038338320fb29a3eb252f76c2ff24b74f (diff)
Unify SimpleCallContext and CallContext
Plan is to completely remove the need for the simple call context. Change-Id: Ie5e4673a6746dc110adbf526e45188f218fd7bfc Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/qmltooling/qmldbg_debugger/qv4datacollector.cpp14
-rw-r--r--src/plugins/qmltooling/qmldbg_debugger/qv4datacollector.h4
-rw-r--r--src/plugins/qmltooling/qmldbg_nativedebugger/qqmlnativedebugservice.cpp2
3 files changed, 10 insertions, 10 deletions
diff --git a/src/plugins/qmltooling/qmldbg_debugger/qv4datacollector.cpp b/src/plugins/qmltooling/qmldbg_debugger/qv4datacollector.cpp
index e89b7a63d4..6686e61a1c 100644
--- a/src/plugins/qmltooling/qmldbg_debugger/qv4datacollector.cpp
+++ b/src/plugins/qmltooling/qmldbg_debugger/qv4datacollector.cpp
@@ -55,11 +55,11 @@
QT_BEGIN_NAMESPACE
-QV4::SimpleCallContext *QV4DataCollector::findContext(int frame)
+QV4::CallContext *QV4DataCollector::findContext(int frame)
{
QV4::ExecutionContext *ctx = engine()->currentContext;
while (ctx) {
- QV4::SimpleCallContext *cCtxt = ctx->asSimpleCallContext();
+ QV4::CallContext *cCtxt = ctx->asCallContext();
if (cCtxt && cCtxt->d()->v4Function) {
if (frame < 1)
return cCtxt;
@@ -71,7 +71,7 @@ QV4::SimpleCallContext *QV4DataCollector::findContext(int frame)
return 0;
}
-QV4::Heap::SimpleCallContext *QV4DataCollector::findScope(QV4::ExecutionContext *ctxt, int scope)
+QV4::Heap::CallContext *QV4DataCollector::findScope(QV4::ExecutionContext *ctxt, int scope)
{
if (!ctxt)
return 0;
@@ -81,7 +81,7 @@ QV4::Heap::SimpleCallContext *QV4DataCollector::findScope(QV4::ExecutionContext
for (; scope > 0 && ctx; --scope)
ctx = ctx->d()->outer;
- return (ctx && ctx->d()) ? ctx->asSimpleCallContext()->d() : 0;
+ return (ctx && ctx->d()) ? ctx->asCallContext()->d() : 0;
}
QVector<QV4::Heap::ExecutionContext::ContextType> QV4DataCollector::getScopeTypes(int frame)
@@ -89,7 +89,7 @@ QVector<QV4::Heap::ExecutionContext::ContextType> QV4DataCollector::getScopeType
QVector<QV4::Heap::ExecutionContext::ContextType> types;
QV4::Scope scope(engine());
- QV4::SimpleCallContext *sctxt = findContext(frame);
+ QV4::CallContext *sctxt = findContext(frame);
if (!sctxt || sctxt->d()->type < QV4::Heap::ExecutionContext::Type_QmlContext)
return types;
@@ -340,7 +340,7 @@ QJsonObject QV4DataCollector::buildFrame(const QV4::StackFrame &stackFrame, int
QV4::Scope scope(engine());
QV4::ScopedContext ctxt(scope, findContext(frameNr));
while (ctxt) {
- if (QV4::SimpleCallContext *cCtxt = ctxt->asSimpleCallContext()) {
+ if (QV4::CallContext *cCtxt = ctxt->asCallContext()) {
if (cCtxt->d()->activation)
break;
}
@@ -348,7 +348,7 @@ QJsonObject QV4DataCollector::buildFrame(const QV4::StackFrame &stackFrame, int
}
if (ctxt) {
- QV4::ScopedValue o(scope, ctxt->asSimpleCallContext()->d()->activation);
+ QV4::ScopedValue o(scope, ctxt->d()->activation);
frame[QLatin1String("receiver")] = toRef(collect(o));
}
diff --git a/src/plugins/qmltooling/qmldbg_debugger/qv4datacollector.h b/src/plugins/qmltooling/qmldbg_debugger/qv4datacollector.h
index de12e8d527..2c2514a1b3 100644
--- a/src/plugins/qmltooling/qmldbg_debugger/qv4datacollector.h
+++ b/src/plugins/qmltooling/qmldbg_debugger/qv4datacollector.h
@@ -58,11 +58,11 @@ public:
typedef uint Ref;
typedef QVector<uint> Refs;
- static QV4::Heap::SimpleCallContext *findScope(QV4::ExecutionContext *ctxt, int scope);
+ static QV4::Heap::CallContext *findScope(QV4::ExecutionContext *ctxt, int scope);
static int encodeScopeType(QV4::Heap::ExecutionContext::ContextType scopeType);
QVector<QV4::Heap::ExecutionContext::ContextType> getScopeTypes(int frame);
- QV4::SimpleCallContext *findContext(int frame);
+ QV4::CallContext *findContext(int frame);
QV4DataCollector(QV4::ExecutionEngine *engine);
diff --git a/src/plugins/qmltooling/qmldbg_nativedebugger/qqmlnativedebugservice.cpp b/src/plugins/qmltooling/qmldbg_nativedebugger/qqmlnativedebugservice.cpp
index 5e4a8e3eb1..13425b36c2 100644
--- a/src/plugins/qmltooling/qmldbg_nativedebugger/qqmlnativedebugservice.cpp
+++ b/src/plugins/qmltooling/qmldbg_nativedebugger/qqmlnativedebugservice.cpp
@@ -480,7 +480,7 @@ void NativeDebugger::handleVariables(QJsonObject *response, const QJsonObject &a
QJsonArray output;
QV4::Scope scope(engine);
- if (QV4::SimpleCallContext *callContext = executionContext->asSimpleCallContext()) {
+ if (QV4::CallContext *callContext = executionContext->asCallContext()) {
QV4::Value thisObject = callContext->thisObject();
collector.collect(&output, QString(), QStringLiteral("this"), thisObject);
QV4::Identifier *const *variables = callContext->variables();