aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4functionobject_p.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2018-06-25 14:58:51 +0200
committerLars Knoll <lars.knoll@qt.io>2018-07-03 08:08:31 +0000
commit2aabdd187aae8a953cfcebac8f6c1ba7b19a0727 (patch)
tree832ef17f2f6433240ec4d329421d119276152792 /src/qml/jsruntime/qv4functionobject_p.h
parent12d8b8c9e4ff05707df7bda479e69d997799c486 (diff)
Unify the managed and object vtables
Allow for nullptr entries in the vtable. To nevertheless get some decent error checking if one of the methods is reimplemented, use a base class for Managed that contains a full set of the vtable entries all being nullptr's. Change-Id: Ibc53973b539f87331e8e465a6c44436a30acbefd Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4functionobject_p.h')
-rw-r--r--src/qml/jsruntime/qv4functionobject_p.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/qml/jsruntime/qv4functionobject_p.h b/src/qml/jsruntime/qv4functionobject_p.h
index b87eab2fcf..02b75216d8 100644
--- a/src/qml/jsruntime/qv4functionobject_p.h
+++ b/src/qml/jsruntime/qv4functionobject_p.h
@@ -70,8 +70,8 @@ namespace Heap {
#define FunctionObjectMembers(class, Member) \
Member(class, Pointer, ExecutionContext *, scope) \
Member(class, NoMark, Function *, function) \
- Member(class, NoMark, jsCallFunction, jsCall) \
- Member(class, NoMark, jsConstructFunction, jsConstruct)
+ Member(class, NoMark, VTable::Call, jsCall) \
+ Member(class, NoMark, VTable::CallAsConstructor, jsConstruct)
DECLARE_HEAP_OBJECT(FunctionObject, Object) {
DECLARE_MARKOBJECTS(FunctionObject);
@@ -182,7 +182,7 @@ struct Q_QML_EXPORT FunctionObject: Object {
static Heap::FunctionObject *createScriptFunction(ExecutionContext *scope, Function *function);
static Heap::FunctionObject *createConstructorFunction(ExecutionContext *scope, Function *function);
static Heap::FunctionObject *createMemberFunction(ExecutionContext *scope, Function *function);
- static Heap::FunctionObject *createBuiltinFunction(ExecutionEngine *engine, StringOrSymbol *nameOrSymbol, jsCallFunction code, int argumentCount);
+ static Heap::FunctionObject *createBuiltinFunction(ExecutionEngine *engine, StringOrSymbol *nameOrSymbol, VTable::Call code, int argumentCount);
bool strictMode() const { return d()->function ? d()->function->isStrict() : false; }
bool isBinding() const;