diff options
author | Lars Knoll <lars.knoll@qt.io> | 2017-05-19 12:39:52 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2017-05-19 18:54:50 +0000 |
commit | 5bc38a50308665bdc185eb96dbcc9ba7948ab4e0 (patch) | |
tree | 4c4d5be3460a8c6a0550cd10c46330b5188e03d1 /src/qml/jsruntime/qv4functionobject_p.h | |
parent | cb70989c4fa2b8707ac59e25b3abe200ac7a5165 (diff) |
Get rid of the old way of defining builtin functions
The old calling convention used for builtin functions is very
inefficient. It was still being used in a few places. Clean
those up and convert them to the new and much more effiecient
calling convention.
Change-Id: I6b769c6185df7e9be1e80709330fc1ca868576c1
Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
Diffstat (limited to 'src/qml/jsruntime/qv4functionobject_p.h')
-rw-r--r-- | src/qml/jsruntime/qv4functionobject_p.h | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/src/qml/jsruntime/qv4functionobject_p.h b/src/qml/jsruntime/qv4functionobject_p.h index 354f6b2e3f..d691b869fe 100644 --- a/src/qml/jsruntime/qv4functionobject_p.h +++ b/src/qml/jsruntime/qv4functionobject_p.h @@ -192,21 +192,10 @@ struct FunctionPrototype: FunctionObject static void method_bind(const BuiltinFunction *, Scope &scope, CallData *callData); }; -struct Q_QML_EXPORT OldBuiltinFunction : FunctionObject { - V4_OBJECT2(OldBuiltinFunction, FunctionObject) - - static void construct(const Managed *, Scope &scope, CallData *); - static void call(const Managed *that, Scope &scope, CallData *callData); -}; - struct Q_QML_EXPORT BuiltinFunction : FunctionObject { V4_OBJECT2(BuiltinFunction, FunctionObject) V4_INTERNALCLASS(BuiltinFunction) - static Heap::OldBuiltinFunction *create(ExecutionContext *scope, String *name, ReturnedValue (*code)(CallContext *)) - { - return scope->engine()->memoryManager->allocObject<OldBuiltinFunction>(scope, name, code); - } static Heap::BuiltinFunction *create(ExecutionContext *scope, String *name, void (*code)(const BuiltinFunction *, Scope &, CallData *)) { return scope->engine()->memoryManager->allocObject<BuiltinFunction>(scope, name, code); |