5#include <private/qqmlirbuilder_p.h>
13 pool =
output->jsParserEngine.pool();
26 const auto createPragma = [&](Pragma::PragmaType
type) {
27 Pragma *
p = New<Pragma>();
34 const auto createListPragma = [&](
35 Pragma::PragmaType
type,
36 Pragma::ListPropertyAssignBehaviorValue
value) {
37 createPragma(
type)->listPropertyAssignBehavior =
value;
40 const auto createComponentPragma = [&](
41 Pragma::PragmaType
type,
42 Pragma::ComponentBehaviorValue
value) {
43 createPragma(
type)->componentBehavior =
value;
46 const auto createFunctionSignaturePragma = [&](
47 Pragma::PragmaType
type,
48 Pragma::FunctionSignatureBehaviorValue
value) {
49 createPragma(
type)->functionSignatureBehavior =
value;
52 const auto createNativeMethodPragma = [&](
53 Pragma::PragmaType
type,
54 Pragma::NativeMethodBehaviorValue
value) {
55 createPragma(
type)->nativeMethodBehavior =
value;
58 const auto createValueTypePragma = [&](
59 Pragma::PragmaType
type,
60 Pragma::ValueTypeBehaviorValues
value) {
61 createPragma(
type)->valueTypeBehavior =
value;
65 createPragma(Pragma::Singleton);
67 createPragma(Pragma::Strict);
70 createListPragma(Pragma::ListPropertyAssignBehavior, Pragma::Replace);
72 createListPragma(Pragma::ListPropertyAssignBehavior, Pragma::ReplaceIfNotDefault);
75 createComponentPragma(Pragma::ComponentBehavior, Pragma::Bound);
78 createFunctionSignaturePragma(Pragma::FunctionSignatureBehavior, Pragma::Ignored);
81 createNativeMethodPragma(Pragma::NativeMethodBehavior, Pragma::AcceptThisObject);
83 Pragma::ValueTypeBehaviorValues valueTypeBehavior = {};
85 valueTypeBehavior |= Pragma::Copy;
87 valueTypeBehavior |= Pragma::Addressable;
88 if (valueTypeBehavior)
89 createValueTypePragma(Pragma::ValueTypeBehavior, valueTypeBehavior);
122 object->flags = serializedObject->
flags();
123 object->id = serializedObject->
objectId();
132 object->bindings->append(
b);
134 functionIndices.
append(
b->value.compiledScriptIndex);
135 b->value.compiledScriptIndex = functionIndices.
size() - 1;
151 object->functionsAndExpressions->append(foe);
161 s->location = serializedSignal->
location;
167 s->parameters->append(
p);
170 object->qmlSignals->append(
s);
183 e->enumValues->append(
v);
186 object->qmlEnums->append(
e);
193 object->properties->append(
p);
198 for (
uint i = 0;
i < serializedObject->
nAliases; ++
i, ++serializedAlias) {
201 object->aliases->append(
a);
210 functionIndices.
append(*functionIdx);
211 f->index = functionIndices.
size() - 1;
212 f->location = compiledFunction->location;
213 f->nameIndex = compiledFunction->nameIndex;
214 f->returnType = compiledFunction->returnType;
216 f->formals.allocate(pool,
int(compiledFunction->nFormals));
218 for (
uint i = 0;
i < compiledFunction->nFormals; ++
i, ++formalNameIdx)
221 object->functions->append(
f);
224 object->runtimeFunctionIndices.allocate(pool, functionIndices);
230 object->inlineComponents->append(ic);
237 object->requiredPropertyExtraDatas->append(extra);
qsizetype size() const noexcept
void reserve(qsizetype size)
void append(parameter_type t)
\macro QT_RESTRICTED_CAST_FROM_ASCII
qsizetype size() const
Returns the number of characters in this string.
QString & append(QChar c)
Combined button and popup list for selecting options.
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
GLboolean GLboolean GLboolean b
GLsizei const GLfloat * v
[13]
GLboolean GLboolean GLboolean GLboolean a
[7]
GLenum GLuint GLenum GLsizei length
QT_BEGIN_NAMESPACE typedef uchar * output
QQmlJS::SourceLocation firstSourceLocation() const override
QQmlJS::SourceLocation lastSourceLocation() const override
FakeExpression(int start, int length)
QQmlIRLoader(const QV4::CompiledData::Unit *unit, QmlIR::Document *output)
const EnumValue * enumValueAt(int idx) const
const Enum * enumAt(int idx) const
bool hasAliasAsDefaultProperty() const
const RequiredPropertyExtraData * requiredPropertyExtraDataTable() const
quint32_le inheritedTypeNameIndex
const Property * propertyTable() const
qint32_le indexOfDefaultPropertyOrAlias
const Alias * aliasTable() const
quint16_le nInlineComponents
const Binding * bindingTable() const
quint16_le nRequiredPropertyExtraData
const Signal * signalAt(int idx) const
Location locationOfIdProperty
const quint32_le * functionOffsetTable() const
const InlineComponent * inlineComponentTable() const
const Object * objectAt(int idx) const
const Import * importAt(int idx) const
const Parameter * parameterAt(int idx) const
@ ListPropertyAssignReplace
@ FunctionSignaturesIgnored
@ ListPropertyAssignReplaceIfNotDefault
@ NativeMethodsAcceptThisObject
const Function * functionAt(int idx) const
const QmlUnit * qmlUnit() const
StringTableGenerator stringTable
void initializeFromBackingUnit(const CompiledData::Unit *unit)
QVector< Object * > objects
QString stringAt(int index) const
QV4::Compiler::JSUnitGenerator jsGenerator
QList< Pragma * > pragmas
QList< const QV4::CompiledData::Import * > imports
void init(QQmlJS::MemoryPool *pool, int typeNameIndex, int idIndex, const QV4::CompiledData::Location &location)