7#include <private/qv4context_p.h>
8#include <private/qv4identifiertable_p.h>
9#include <private/qv4mm_p.h>
10#include <private/qv4stackframe_p.h>
11#include <private/qv4symbol_p.h>
12#include <private/qv4vme_moth_p.h>
14#include <QtCore/qscopeguard.h>
29 Function *moduleFunction = unit->runtimeFunctions[unit->unitData()->indexOfRootFunction];
31 const uint locals = moduleFunction->compiledFunction->nLocals;
32 const size_t requiredMemory =
sizeof(QV4::CallContext::Data) -
sizeof(
Value) +
sizeof(
Value) * locals;
36 scope->locals.size = locals;
37 scope->locals.alloc = locals;
41 scope->setupLocalTemporalDeadZone(moduleFunction->compiledFunction);
54 for (
uint i = 0;
i < unit->data->importEntryTableSize; ++
i) {
58 scope->internalClass.set(
engine, ic->d());
65 This->setPrototypeUnchecked(
nullptr);
68void Module::evaluate()
72 d()->evaluated =
true;
81 frame.init(moduleFunction,
nullptr, 0);
95 if (
d()->unit->isESModule()) {
100 return d()->unit->resolveExport(
name);
104 return &
d()->scope->locals[
entry.index];
125 return v->asReturnedValue();
199 if (exportIndex < exportedNames.size()) {
212 return exportName->toPropertyKey();
223 if (module->d()->unit->isESModule()) {
224 names = module->d()->unit->exportedNames();
241 return proto ==
nullptr;
void evaluateModuleRequests()
QVector< QV4::Function * > runtimeFunctions
static void exec(MetaTypesStackFrame *frame, ExecutionEngine *engine)
\qmltype Particle \inqmlmodule QtQuick.Particles
static struct AttrInfo attrs[]
GLsizei const GLfloat * v
[13]
QScopeGuard< typename std::decay< F >::type > qScopeGuard(F &&f)
[qScopeGuard]
#define QStringLiteral(str)
#define DEFINE_OBJECT_VTABLE(classname)
~ModuleNamespaceIterator() override=default
PropertyKey next(const Object *o, Property *pd=nullptr, PropertyAttributes *attrs=nullptr) override
QStringList exportedNames
ModuleNamespaceIterator(const QStringList &names)
qint32_le indexOfRootFunction
static constexpr ReturnedValue undefined()
Heap::String * newString(const QString &s=QString())
ReturnedValue throwReferenceError(const Value &value)
Q_QML_PRIVATE_EXPORT QString keyAt(uint index) const
Heap::InternalClass * internalClass() const
ExecutionEngine * engine() const
const Value * resolveExport(PropertyKey key) const
PropertyKey next(const Object *o, Property *pd=nullptr, PropertyAttributes *attrs=nullptr) override
bool hasProperty(PropertyKey id) const
QV4_NEARLY_ALWAYS_INLINE constexpr quint32 value() const
static constexpr VTable::SetPrototypeOf virtualSetPrototypeOf
static constexpr VTable::DefineOwnProperty virtualDefineOwnProperty
static constexpr VTable::OwnPropertyKeys virtualOwnPropertyKeys
static constexpr VTable::GetOwnProperty virtualGetOwnProperty
static constexpr VTable::PreventExtensions virtualPreventExtensions
static constexpr VTable::GetPrototypeOf virtualGetPrototypeOf
static constexpr VTable::DeleteProperty virtualDeleteProperty
static constexpr VTable::Get virtualGet
static constexpr VTable::HasProperty virtualHasProperty
static constexpr VTable::Put virtualPut
static constexpr VTable::IsExtensible virtualIsExtensible
static constexpr Value undefinedValue()