#include <private/qdeclarativeglobal_p.h>
#include <private/qdeclarativepool_p.h>
#include <private/qfieldlist_p.h>
+#include <private/qdeclarativepropertycache_p.h>
+#include <private/qfastmetabuilder_p.h>
QT_BEGIN_HEADER
// Used by compiler
QDeclarativeCompilerTypes::BindingReference *bindingReference;
+ int signalExpressionContextStack;
// Used in Property::ValueList lists
Value *nextValue;
int type;
// The metaobject index of this property, or -1 if unknown.
int index;
+ // The core data in the case of a regular property.
+ // XXX This has to be a value now as the synthCache may change during
+ // compilation which invalidates pointers. We should fix this.
+ QDeclarativePropertyCache::Data core;
// Returns true if this is an empty property - both value and values
// are unset.
// Content in value and values are mutually exclusive.
Object *value;
// The property name
- QString name() const { return _name?*_name:QString(); }
- void setName(const QString &n) { _name = pool()->NewString(n); }
+ QStringRef name() const { return _name; }
+ void setName(const QString &n) { _name = QStringRef(pool()->NewString(n)); }
// True if this property was accessed as the default property.
bool isDefault;
// True if the setting of this property will be deferred. Set by the
private:
friend class Object;
- QString *_name;
+ QStringRef _name;
};
class Object : public QDeclarativePool::Class
Property *getDefaultProperty();
// name ptr must be guarenteed to remain valid
- Property *getProperty(const QString *name, bool create=true);
+ Property *getProperty(const QStringRef &name, bool create=true);
Property *getProperty(const QString &name, bool create=true);
Property *defaultProperty;
QByteArray name;
QDeclarativeParser::Property *defaultValue;
LocationSpan location;
+
+ // Used by the compiler
+ QByteArray resolvedCustomTypeName;
+ QFastMetaBuilder::StringRef typeRef;
+ QFastMetaBuilder::StringRef nameRef;
+ QFastMetaBuilder::StringRef changedSignatureRef;
};
struct DynamicSignal {
DynamicSignal();
QByteArray name;
QList<QByteArray> parameterTypes;
QList<QByteArray> parameterNames;
+
+ int parameterTypesLength() const;
+ int parameterNamesLength() const;
+
+ // Used by the compiler
+ QFastMetaBuilder::StringRef signatureRef;
+ QFastMetaBuilder::StringRef parameterNamesRef;
};
struct DynamicSlot {
DynamicSlot();
QString body;
QList<QByteArray> parameterNames;
LocationSpan location;
+
+ int parameterNamesLength() const;
+
+ // Used by the compiler
+ QFastMetaBuilder::StringRef signatureRef;
+ QFastMetaBuilder::StringRef parameterNamesRef;
};
// The list of dynamic properties
// Used by compiler
QDeclarativeCompilerTypes::ComponentCompileState *componentCompileState;
+
+ // Used by ComponentCompileState::AliasingObjectsList
+ Object *nextAliasingObject;
+ // Used by ComponentComppileState::IdList
+ Object *nextIdObject;
};
}