From 412eb94de4cae754130ae855236420ebd5c42482 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Sun, 3 Nov 2013 15:23:05 +0100 Subject: Simplify & speed up function calling Get rid of the SimpleCallContext, instead simply use the CallContext data structure, but don't initialize the unused variables. Change-Id: I11b311986da180c62c815b516a2c55844156d0ab Reviewed-by: Simon Hausmann --- src/qml/jsruntime/qv4functionobject_p.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/qml/jsruntime/qv4functionobject_p.h') diff --git a/src/qml/jsruntime/qv4functionobject_p.h b/src/qml/jsruntime/qv4functionobject_p.h index 3f526947a0..2fc36d862f 100644 --- a/src/qml/jsruntime/qv4functionobject_p.h +++ b/src/qml/jsruntime/qv4functionobject_p.h @@ -164,17 +164,17 @@ struct FunctionPrototype: FunctionObject FunctionPrototype(InternalClass *ic); void init(ExecutionEngine *engine, ObjectRef ctor); - static ReturnedValue method_toString(SimpleCallContext *ctx); - static ReturnedValue method_apply(SimpleCallContext *ctx); - static ReturnedValue method_call(SimpleCallContext *ctx); - static ReturnedValue method_bind(SimpleCallContext *ctx); + static ReturnedValue method_toString(CallContext *ctx); + static ReturnedValue method_apply(CallContext *ctx); + static ReturnedValue method_call(CallContext *ctx); + static ReturnedValue method_bind(CallContext *ctx); }; struct BuiltinFunction: FunctionObject { Q_MANAGED - ReturnedValue (*code)(SimpleCallContext *); + ReturnedValue (*code)(CallContext *); - BuiltinFunction(ExecutionContext *scope, const StringRef name, ReturnedValue (*code)(SimpleCallContext *)); + BuiltinFunction(ExecutionContext *scope, const StringRef name, ReturnedValue (*code)(CallContext *)); static ReturnedValue construct(Managed *, CallData *); static ReturnedValue call(Managed *that, CallData *callData); @@ -184,10 +184,10 @@ struct IndexedBuiltinFunction: FunctionObject { Q_MANAGED - ReturnedValue (*code)(SimpleCallContext *ctx, uint index); + ReturnedValue (*code)(CallContext *ctx, uint index); uint index; - IndexedBuiltinFunction(ExecutionContext *scope, uint index, ReturnedValue (*code)(SimpleCallContext *ctx, uint index)) + IndexedBuiltinFunction(ExecutionContext *scope, uint index, ReturnedValue (*code)(CallContext *ctx, uint index)) : FunctionObject(scope) , code(code) , index(index) -- cgit v1.2.3