4#ifndef QV4EXECUTABLECOMPILATIONUNIT_P_H
5#define QV4EXECUTABLECOMPILATIONUNIT_P_H
18#include <private/qv4compileddata_p.h>
19#include <private/qv4identifierhash_p.h>
20#include <private/qqmlrefcount_p.h>
21#include <private/qintrusivelist_p.h>
22#include <private/qqmlpropertycachevector_p.h>
23#include <private/qqmltype_p.h>
24#include <private/qqmlnullablevalue_p.h>
25#include <private/qqmlmetatype_p.h>
105 if (m_finalUrl.isNull)
106 m_finalUrl =
QUrl(finalUrlString());
131 inline IdentifierHash namedObjectsPerComponent(
int componentObjectIndex);
135 int m_totalBindingsCount = 0;
136 int m_totalParserStatusCount = 0;
137 int m_totalObjectCount = 0;
140 int totalBindingsCount()
const;
141 int totalParserStatusCount()
const;
142 int totalObjectCount()
const;
158 for (
int i = 0;
i < objectCount(); ++
i) {
159 auto *
object = objectAt(
i);
160 for (
auto it =
object->inlineComponentsBegin(),
end =
object->inlineComponentsEnd();
162 if (stringAt(
it->nameIndex) == inlineComponentName)
163 return it->objectIndex;
190 if (
data->flags & CompiledData::Unit::ListPropertyAssignReplace)
191 return ListPropertyAssignBehavior::Replace;
192 if (
data->flags & CompiledData::Unit::ListPropertyAssignReplaceIfNotDefault)
193 return ListPropertyAssignBehavior::ReplaceIfNotDefault;
194 return ListPropertyAssignBehavior::Append;
199 return data->flags & CompiledData::Unit::FunctionSignaturesIgnored;
204 return data->flags & CompiledData::Unit::NativeMethodsAcceptThisObject;
209 return data->flags & CompiledData::Unit::ValueTypesCopied;
214 return data->flags & CompiledData::Unit::ValueTypesAddressable;
220 return qmlData->objectAt(
index);
226 return qmlData->importAt(
index);
229 Heap::Object *templateObjectAt(
int index)
const;
261 return data->flags & CompiledData::Unit::IsESModule;
266 return data->flags & CompiledData::Unit::IsSharedLibrary;
274 return resolveExportRecursively(exportName, &resolveSet);
281 getExportedNamesRecursively(&
names, &exportNameSet);
283 auto last = std::unique(
names.begin(),
names.end());
289 void evaluateModuleRequests();
299 bool saveToDisk(
const QUrl &unitUrl,
QString *errorString);
315 {
return data->stringTableSize; }
318 struct ResolveSetEntry
321 ResolveSetEntry(ExecutableCompilationUnit *module,
QV4::String *exportName)
322 : module(module), exportName(exportName) {}
323 ExecutableCompilationUnit *module =
nullptr;
327 ExecutableCompilationUnit();
328 ExecutableCompilationUnit(CompiledData::CompilationUnit &&compilationUnit);
329 ~ExecutableCompilationUnit();
336 Q_NEVER_INLINE IdentifierHash createNamedObjectsPerComponent(
int componentObjectIndex);
337 const CompiledData::ExportEntry *lookupNameInExportTable(
338 const CompiledData::ExportEntry *firstExportEntry,
int tableSize,
341 void getExportedNamesRecursively(
343 bool includeDefaultExport =
true)
const;
350 return createNamedObjectsPerComponent(componentObjectIndex);
\inmodule QtCore\reentrant
T value(const Key &key) const noexcept
QQmlPropertyCache::ConstPtr at(int index) const
\macro QT_RESTRICTED_CAST_FROM_ASCII
static QQmlRefPointer< ExecutableCompilationUnit > create(CompiledData::CompilationUnit &&compilationUnit)
std::unique_ptr< CompilationUnitMapper > backingFile
const CompiledObject * objectAt(int index) const
QStringList exportedNames() const
QQmlPropertyCacheVector propertyCaches
QVector< QV4::Heap::Object * > templateObjects
bool ignoresFunctionSignature() const
const CompiledData::Import * importAt(int index) const
std::unique_ptr< QString > icRootName
FunctionIterator objectFunctionsBegin(const CompiledObject *object) const
QVector< QV4::Function * > runtimeFunctions
QHash< int, IdentifierHash > namedObjectsPerComponentCache
FunctionIterator objectFunctionsEnd(const CompiledObject *object) const
bool valueTypesAreAddressable() const
ResolvedTypeReference * resolvedType(int id) const
const Value * resolveExport(QV4::String *exportName)
QQmlPropertyCache::ConstPtr rootPropertyCache() const
QVector< QQmlRefPointer< QQmlScriptData > > dependentScripts
QQmlNullableValue< QUrl > m_finalUrl
ResolvedTypeReferenceMap resolvedTypes
IdentifierHash namedObjectsPerComponent(int componentObjectIndex)
int inlineComponentId(const QString &inlineComponentName) const
QHash< QString, InlineComponentData > inlineComponentData
QVector< QV4::Heap::InternalClass * > runtimeBlocks
QQmlRefPointer< QQmlTypeNameCache > typeNameCache
ListPropertyAssignBehavior listPropertyAssignBehavior() const
QVector< BindingPropertyData > bindingPropertyDataPerObject
QQmlNullableValue< QUrl > m_url
quint32 totalStringCount() const
bool isSharedLibrary() const
ListPropertyAssignBehavior
bool nativeMethodsAcceptThisObjects() const
QIntrusiveListNode nextCompilationUnit
bool valueTypesAreCopied() const
static QQmlRefPointer< ExecutableCompilationUnit > create()
QHash< int, QWidget * > hash
[35multi]
QSet< QString >::iterator it
Combined button and popup list for selecting options.
std::function< QByteArray()> DependentTypesHasher
\qmltype Particle \inqmlmodule QtQuick.Particles
QVector< const QQmlPropertyData * > BindingPropertyData
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
QUrl url("example.com")
[constructor-url-reference]
engine evaluate("var myObject = new MyObject()")
[8]
InlineComponentData(const QQmlType &qmlType, int objectIndex, int nameIndex, int totalObjectCount, int totalBindingCount, int totalParserStatusCount)
InlineComponentData()=default
int totalParserStatusCount
const Function * functionAt(int idx) const
const CompiledFunction * operator->() const
FunctionIterator(const CompiledData::Unit *unit, const CompiledObject *object, int index)
bool operator==(const FunctionIterator &rhs) const
const CompiledData::Unit * unit
const CompiledObject * object
bool operator!=(const FunctionIterator &rhs) const
bool addToHash(QCryptographicHash *hash, QHash< quintptr, QByteArray > *checksums) const