![]() |
Qt 6.x
The Qt SDK
|
#include <qv4datacollector.h>
Public Types | |
typedef uint | Ref |
typedef QVector< uint > | Refs |
Public Member Functions | |
QVector< QV4::Heap::ExecutionContext::ContextType > | getScopeTypes (int frame) |
QV4::Heap::ExecutionContext * | findContext (int frame) |
QV4::CppStackFrame * | findFrame (int frame) |
QV4DataCollector (QV4::ExecutionEngine *engine) | |
Ref | addValueRef (const QV4::ScopedValue &value) |
bool | isValidRef (Ref ref) const |
QJsonObject | lookupRef (Ref ref) |
bool | collectScope (QJsonObject *dict, int frameNr, int scopeNr) |
QJsonObject | buildFrame (const QV4::StackFrame &stackFrame, int frameNr) |
QV4::ExecutionEngine * | engine () const |
void | clear () |
Static Public Member Functions | |
static QV4::Heap::ExecutionContext * | findScope (QV4::Heap::ExecutionContext *ctxt, int scope) |
static int | encodeScopeType (QV4::Heap::ExecutionContext::ContextType scopeType) |
Definition at line 19 of file qv4datacollector.h.
typedef uint QV4DataCollector::Ref |
Definition at line 22 of file qv4datacollector.h.
typedef QVector<uint> QV4DataCollector::Refs |
Definition at line 23 of file qv4datacollector.h.
QV4DataCollector::QV4DataCollector | ( | QV4::ExecutionEngine * | engine | ) |
Definition at line 77 of file qv4datacollector.cpp.
References engine(), QV4::ExecutionEngine::newArrayObject(), and QV4::PersistentValue::set().
QV4DataCollector::Ref QV4DataCollector::addValueRef | ( | const QV4::ScopedValue & | value | ) |
Definition at line 83 of file qv4datacollector.cpp.
Referenced by buildFrame(), collectScope(), and ExpressionEvalJob::handleResult().
QJsonObject QV4DataCollector::buildFrame | ( | const QV4::StackFrame & | stackFrame, |
int | frameNr | ||
) |
Definition at line 216 of file qv4datacollector.cpp.
References addValueRef(), QV4::StackFrame::column, encodeScopeType(), engine(), findContext(), frame, QV4::StackFrame::function, getScopeTypes(), i, QV4::StackFrame::line, o, QJsonArray::push_back(), qAbs(), QList< T >::size(), QV4::StackFrame::source, and toRef().
Referenced by BacktraceJob::run(), and FrameJob::run().
void QV4DataCollector::clear | ( | ) |
Definition at line 261 of file qv4datacollector.cpp.
References engine(), and QV4::PersistentValue::set().
bool QV4DataCollector::collectScope | ( | QJsonObject * | dict, |
int | frameNr, | ||
int | scopeNr | ||
) |
Definition at line 174 of file qv4datacollector.cpp.
References addValueRef(), QList< T >::append(), QString::append(), QList< T >::at(), engine(), findContext(), findScope(), i, QV4::Heap::InternalClass::keyAt(), lookupRef(), QV4::ExecutionEngine::newString(), Q_ASSERT, QList< T >::size(), and QV4::Heap::InternalClass::size.
Referenced by ScopeJob::run().
|
static |
Definition at line 60 of file qv4datacollector.cpp.
Referenced by buildFrame(), and ScopeJob::run().
|
inline |
Definition at line 42 of file qv4datacollector.h.
Referenced by QV4DataCollector(), buildFrame(), clear(), collectScope(), findFrame(), isValidRef(), lookupRef(), BacktraceJob::run(), FrameJob::run(), and ValueLookupJob::run().
QV4::Heap::ExecutionContext * QV4DataCollector::findContext | ( | int | frame | ) |
Definition at line 33 of file qv4datacollector.cpp.
References findFrame(), and frame.
Referenced by buildFrame(), and collectScope().
QT_BEGIN_NAMESPACE QV4::CppStackFrame * QV4DataCollector::findFrame | ( | int | frame | ) |
Definition at line 23 of file qv4datacollector.cpp.
References QV4::EngineBase::currentStackFrame, engine(), and frame.
Referenced by findContext(), and getScopeTypes().
|
static |
Definition at line 40 of file qv4datacollector.cpp.
Referenced by collectScope().
QVector< QV4::Heap::ExecutionContext::ContextType > QV4DataCollector::getScopeTypes | ( | int | frame | ) |
Definition at line 48 of file qv4datacollector.cpp.
References QV4::CppStackFrame::context(), findFrame(), frame, and it.
Referenced by buildFrame(), and ScopeJob::run().
bool QV4DataCollector::isValidRef | ( | QV4DataCollector::Ref | ref | ) | const |
Definition at line 167 of file qv4datacollector.cpp.
References engine(), and QV4::PersistentValue::value().
Referenced by ValueLookupJob::run().
QJsonObject QV4DataCollector::lookupRef | ( | Ref | ref | ) |
Definition at line 152 of file qv4datacollector.cpp.
References collectProperty(), engine(), QJsonObject::insert(), and QStringLiteral.
Referenced by collectScope(), ExpressionEvalJob::handleResult(), and ValueLookupJob::run().