aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4functionobject.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2017-08-04 20:28:23 +0200
committerLars Knoll <lars.knoll@qt.io>2017-08-08 18:58:29 +0000
commit8f6a865929da5dc130594dbcd5ace97468f51e59 (patch)
treed905f5f6ba6b7a1ab10dc0a6189f2c2a61308efe /src/qml/jsruntime/qv4functionobject.cpp
parent50e7badd5f261bd69db9d8f03d5651e346087218 (diff)
Unify IndexedBuiltinFunction with BuiltinFunction
Now that we pass the function object to the runtime method, we can retrieve the index from there, and don't need a different calling convention for the indexed version anymore. Change-Id: I6c7d747ddb0c217b23fe9ba06435afb4ec0ee24a Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4functionobject.cpp')
-rw-r--r--src/qml/jsruntime/qv4functionobject.cpp23
1 files changed, 0 insertions, 23 deletions
diff --git a/src/qml/jsruntime/qv4functionobject.cpp b/src/qml/jsruntime/qv4functionobject.cpp
index 061971ec30..344c38ee79 100644
--- a/src/qml/jsruntime/qv4functionobject.cpp
+++ b/src/qml/jsruntime/qv4functionobject.cpp
@@ -471,29 +471,6 @@ ReturnedValue BuiltinFunction::call(const Managed *that, CallData *callData)
return f->d()->code(f, callData);
}
-
-ReturnedValue IndexedBuiltinFunction::call(const Managed *that, CallData *callData)
-{
- const IndexedBuiltinFunction *f = static_cast<const IndexedBuiltinFunction *>(that);
- ExecutionEngine *v4 = f->engine();
- if (v4->hasException)
- return Encode::undefined();
- CHECK_STACK_LIMITS(v4);
-
- Scope scope(v4);
- ExecutionContextSaver ctxSaver(scope);
-
- CallContext::Data *ctx = v4->memoryManager->allocSimpleCallContext();
- ctx->strictMode = f->scope()->strictMode; // ### needed? scope or parent context?
- ctx->callData = callData;
- v4->pushContext(ctx);
- Q_ASSERT(v4->current == ctx);
-
- ReturnedValue result = f->d()->code(static_cast<QV4::CallContext *>(v4->currentContext), f->d()->index);
- v4->memoryManager->freeSimpleCallContext();
- return result;
-}
-
DEFINE_OBJECT_VTABLE(IndexedBuiltinFunction);
DEFINE_OBJECT_VTABLE(BoundFunction);