8#include <private/qv4script_p.h>
9#include <private/qv4string_p.h>
10#include <private/qv4objectiterator_p.h>
11#include <private/qv4identifierhash_p.h>
12#include <private/qv4runtime_p.h>
13#include <private/qv4identifiertable_p.h>
15#include <private/qqmlcontext_p.h>
16#include <private/qqmlengine_p.h>
18#include <QtCore/qjsonarray.h>
19#include <QtCore/qjsonobject.h>
37 return f ?
f->context()->d() :
nullptr;
42 for (; scope > 0 &&
ctx; --scope)
55 types.append(QV4::Heap::ExecutionContext::ContextType(
it->type));
63 case QV4::Heap::ExecutionContext::Type_GlobalContext:
65 case QV4::Heap::ExecutionContext::Type_WithContext:
67 case QV4::Heap::ExecutionContext::Type_CallContext:
69 case QV4::Heap::ExecutionContext::Type_QmlContext:
71 case QV4::Heap::ExecutionContext::Type_BlockContext:
96 switch (
value->type()) {
98 Q_ASSERT(!
"empty Value encountered");
111 dict.
insert(valueKey,
s->toQString());
118 int numProperties = 0;
124 if (!
name->isValid())
128 dict.
insert(valueKey, numProperties);
138 const double val =
value->doubleValue();
183 if (ctxt->d()->type == QV4::Heap::ExecutionContext::Type_CallContext ||
184 ctxt->d()->type == QV4::Heap::ExecutionContext::Type_BlockContext) {
193 v =
static_cast<QV4::Heap::CallContext *
>(ctxt->d())->locals[
i];
199 for (
int i = 0, ei = collectedRefs.
size();
i != ei; ++
i) {
201 scopeObject->put(propName, (
v = getValue(collectedRefs.
at(
i))));
224 if (stackFrame.
column >= 0)
232 if (cCtxt->d()->activation)
235 ctxt = ctxt->d()->outer;
245 for (
int i = 0, ei = scopeTypes.
size();
i != ei; ++
i) {
268 class ExceptionStateSaver
275 : hasExceptionLoc(&
engine->hasException)
276 , hadException(
false)
277 { std::swap(*hasExceptionLoc, hadException); }
279 ~ExceptionStateSaver()
280 { std::swap(*hasExceptionLoc, hadException); }
284 ExceptionStateSaver resetExceptionState(
engine());
321 if (m_engine && m_capture) {
345 name =
it.nextPropertyNameAsString(&
v);
361 if (
value->isManaged() && !
value->isString()) {
CapturePreventer(QV4::ExecutionEngine *engine)
\inmodule QtCore\reentrant
void push_back(const QJsonValue &t)
This function is provided for STL compatibility.
\inmodule QtCore\reentrant
iterator insert(const QString &key, const QJsonValue &value)
Inserts a new item with the key key and a value of value.
qsizetype size() const noexcept
const_reference at(qsizetype i) const noexcept
void append(parameter_type t)
QQmlPropertyCapture * propertyCapture
static QQmlEnginePrivate * get(QQmlEngine *e)
The QQmlEngine class provides an environment for instantiating QML components.
\macro QT_RESTRICTED_CAST_FROM_ASCII
QString & append(QChar c)
bool collectScope(QJsonObject *dict, int frameNr, int scopeNr)
bool isValidRef(Ref ref) const
Ref addValueRef(const QV4::ScopedValue &value)
static QV4::Heap::ExecutionContext * findScope(QV4::Heap::ExecutionContext *ctxt, int scope)
static int encodeScopeType(QV4::Heap::ExecutionContext::ContextType scopeType)
QJsonObject lookupRef(Ref ref)
QV4::CppStackFrame * findFrame(int frame)
QV4DataCollector(QV4::ExecutionEngine *engine)
QV4::ExecutionEngine * engine() const
QVector< QV4::Heap::ExecutionContext::ContextType > getScopeTypes(int frame)
QV4::Heap::ExecutionContext * findContext(int frame)
QJsonObject buildFrame(const QV4::StackFrame &stackFrame, int frameNr)
ReturnedValue value() const
void set(ExecutionEngine *engine, const Value &value)
QSet< QString >::iterator it
Combined button and popup list for selecting options.
static struct AttrInfo attrs[]
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
bool qIsFinite(qfloat16 f) noexcept
bool qIsNaN(qfloat16 f) noexcept
constexpr T qAbs(const T &t)
GLsizei const GLfloat * v
[13]
GLboolean GLboolean GLboolean GLboolean a
[7]
GLsizei GLenum GLenum * types
void deduplicate(Container &container)
QLatin1StringView QLatin1String
#define QStringLiteral(str)
QJsonObject toRef(QV4DataCollector::Ref ref)
const QV4::Object * collectProperty(const QV4::ScopedValue &value, QV4::ExecutionEngine *engine, QJsonObject &dict)
ExecutionContext * context() const
CppStackFrame * currentStackFrame
Heap::String * newString(const QString &s=QString())
Heap::ArrayObject * newArrayObject(int count=0)
Q_QML_PRIVATE_EXPORT QString keyAt(uint index) const
static ReturnedValue call(ExecutionEngine *, const Value &)
QString toQStringNoThrow() const