aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4functionobject_p.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@theqtcompany.com>2015-08-28 12:58:08 +0200
committerLars Knoll <lars.knoll@theqtcompany.com>2015-09-22 08:20:09 +0000
commit2a8de9d8d85c5ce3e9c61fd8c0e957521f6a0846 (patch)
tree746957dfed49e0b13daaa7a0c4da9b5bd453d576 /src/qml/jsruntime/qv4functionobject_p.h
parentb3cdc489142e673c8cb6ac81df7d01191a30c1aa (diff)
Convert FunctionObjects to new allocation syntax
Change-Id: I269c20abdc7f9eb0d71a2d2d485d622b65405762 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/qml/jsruntime/qv4functionobject_p.h')
-rw-r--r--src/qml/jsruntime/qv4functionobject_p.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/qml/jsruntime/qv4functionobject_p.h b/src/qml/jsruntime/qv4functionobject_p.h
index 73fa12dd04..182f06f74e 100644
--- a/src/qml/jsruntime/qv4functionobject_p.h
+++ b/src/qml/jsruntime/qv4functionobject_p.h
@@ -58,7 +58,7 @@ struct Q_QML_PRIVATE_EXPORT FunctionObject : Object {
FunctionObject(ExecutionContext *scope, const QString &name = QString(), bool createProto = false);
FunctionObject(QV4::ExecutionContext *scope, const ReturnedValue name);
FunctionObject(ExecutionContext *scope, const ReturnedValue name);
- FunctionObject(InternalClass *ic, QV4::Object *prototype);
+ FunctionObject();
~FunctionObject();
unsigned int formalParameterCount() { return function ? function->nFormals : 0; }
@@ -74,7 +74,7 @@ struct FunctionCtor : FunctionObject {
};
struct FunctionPrototype : FunctionObject {
- FunctionPrototype(InternalClass *ic, QV4::Object *prototype);
+ FunctionPrototype();
};
struct Q_QML_EXPORT BuiltinFunction : FunctionObject {
@@ -115,6 +115,8 @@ struct Q_QML_EXPORT FunctionObject: Object {
};
V4_OBJECT2(FunctionObject, Object)
Q_MANAGED_TYPE(FunctionObject)
+ V4_INTERNALCLASS(functionClass)
+ V4_PROTOTYPE(functionPrototype)
V4_NEEDS_DESTROY
Heap::ExecutionContext *scope() const { return d()->scope; }
@@ -180,7 +182,7 @@ struct Q_QML_EXPORT BuiltinFunction: FunctionObject {
static Heap::BuiltinFunction *create(ExecutionContext *scope, String *name, ReturnedValue (*code)(CallContext *))
{
- return scope->engine()->memoryManager->alloc<BuiltinFunction>(scope, name, code);
+ return scope->engine()->memoryManager->allocObject<BuiltinFunction>(scope, name, code);
}
static ReturnedValue construct(const Managed *, CallData *);
@@ -210,6 +212,7 @@ Heap::IndexedBuiltinFunction::IndexedBuiltinFunction(QV4::ExecutionContext *scop
struct SimpleScriptFunction: FunctionObject {
V4_OBJECT2(SimpleScriptFunction, FunctionObject)
+ V4_INTERNALCLASS(simpleScriptFunctionClass)
static ReturnedValue construct(const Managed *, CallData *callData);
static ReturnedValue call(const Managed *that, CallData *callData);
@@ -230,7 +233,7 @@ struct BoundFunction: FunctionObject {
static Heap::BoundFunction *create(ExecutionContext *scope, FunctionObject *target, const Value &boundThis, QV4::MemberData *boundArgs)
{
- return scope->engine()->memoryManager->alloc<BoundFunction>(scope, target, boundThis, boundArgs);
+ return scope->engine()->memoryManager->allocObject<BoundFunction>(scope, target, boundThis, boundArgs);
}
Heap::FunctionObject *target() const { return d()->target; }