diff options
Diffstat (limited to 'src/qml/jsruntime/qv4runtime.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4runtime.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4runtime.cpp b/src/qml/jsruntime/qv4runtime.cpp index 7b1a38ff06..470629bd1f 100644 --- a/src/qml/jsruntime/qv4runtime.cpp +++ b/src/qml/jsruntime/qv4runtime.cpp @@ -1061,8 +1061,6 @@ ReturnedValue Runtime::method_loadSuperConstructor(ExecutionEngine *engine, cons return c->asReturnedValue(); } - - #endif // V4_BOOTSTRAP uint RuntimeHelpers::equalHelper(const Value &x, const Value &y) @@ -1538,6 +1536,15 @@ ReturnedValue Runtime::method_constructWithSpread(ExecutionEngine *engine, const return static_cast<const FunctionObject &>(function).callAsConstructor(arguments.argv, arguments.argc, &newTarget); } +ReturnedValue Runtime::method_tailCall(ExecutionEngine *engine, const Value &function, const Value &thisObject, Value *argv, int argc) +{ + //### unwinding the stack, etc, is done in a subsequent patch + if (!function.isFunctionObject()) + return engine->throwTypeError(); + + return static_cast<const FunctionObject &>(function).call(&thisObject, argv, argc); +} + void Runtime::method_throwException(ExecutionEngine *engine, const Value &value) { if (!value.isEmpty()) |