diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2017-01-26 11:46:56 +0100 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2017-01-26 11:46:56 +0100 |
commit | 9225ac7348c9023093b6ef8d4519087c7dddeaa2 (patch) | |
tree | 4660e25bd5cfd4a2a40b0ad97ea689c4acb22a8c /src/qml/jsruntime/qv4object_p.h | |
parent | 9d8fe2ac121162c15be6728495be2235b728325a (diff) | |
parent | 0076c44d3993f377ad6417d3bb08109b608dfbd2 (diff) |
Merge remote-tracking branch 'origin/dev' into wip/pointerhandler
Change-Id: I7962fd2282792c43af69784c8e98fb050fd928a7
Diffstat (limited to 'src/qml/jsruntime/qv4object_p.h')
-rw-r--r-- | src/qml/jsruntime/qv4object_p.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/qml/jsruntime/qv4object_p.h b/src/qml/jsruntime/qv4object_p.h index 6c679deb10..4a78690f47 100644 --- a/src/qml/jsruntime/qv4object_p.h +++ b/src/qml/jsruntime/qv4object_p.h @@ -63,17 +63,17 @@ QT_BEGIN_NAMESPACE namespace QV4 { +struct BuiltinFunction; + namespace Heap { struct Object : Base { void init() { Base::init(); } void destroy() { Base::destroy(); } - const Value *propertyData(uint index) const { if (index < inlineMemberSize) return reinterpret_cast<const Value *>(this) + inlineMemberOffset + index; return memberData->data + index - inlineMemberSize; } - Value *propertyData(uint index) { if (index < inlineMemberSize) return reinterpret_cast<Value *>(this) + inlineMemberOffset + index; return memberData->data + index - inlineMemberSize; } + const Value *propertyData(uint index) const { return memberData->data + index; } + Value *propertyData(uint index) { return memberData->data + index; } - uint inlineMemberOffset; - uint inlineMemberSize; InternalClass *internalClass; Pointer<Object> prototype; Pointer<MemberData> memberData; @@ -238,9 +238,15 @@ struct Q_QML_EXPORT Object: Managed { } void defineDefaultProperty(const QString &name, const Value &value); void defineDefaultProperty(const QString &name, ReturnedValue (*code)(CallContext *), int argumentCount = 0); + void defineDefaultProperty(const QString &name, void (*code)(const BuiltinFunction *, Scope &, CallData *), int argumentCount = 0); void defineDefaultProperty(String *name, ReturnedValue (*code)(CallContext *), int argumentCount = 0); + void defineDefaultProperty(String *name, void (*code)(const BuiltinFunction *, Scope &, CallData *), int argumentCount = 0); void defineAccessorProperty(const QString &name, ReturnedValue (*getter)(CallContext *), ReturnedValue (*setter)(CallContext *)); void defineAccessorProperty(String *name, ReturnedValue (*getter)(CallContext *), ReturnedValue (*setter)(CallContext *)); + void defineAccessorProperty(const QString &name, void (*getter)(const BuiltinFunction *, Scope &, CallData *), + void (*setter)(const BuiltinFunction *, Scope &, CallData *)); + void defineAccessorProperty(String *name, void (*getter)(const BuiltinFunction *, Scope &, CallData *), + void (*setter)(const BuiltinFunction *, Scope &, CallData *)); /* Fixed: Writable: false, Enumerable: false, Configurable: false */ void defineReadonlyProperty(const QString &name, const Value &value); void defineReadonlyProperty(String *name, const Value &value); |