aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4runtimeapi_p.h
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@qt.io>2018-09-04 12:19:10 +0200
committerErik Verbruggen <erik.verbruggen@qt.io>2018-10-05 11:18:16 +0000
commit052d22e116957a170e290a49d077d3e9f290a237 (patch)
tree8d63f1b622a7c93d8b845c3d77f796f5ad18493b /src/qml/jsruntime/qv4runtimeapi_p.h
parent08342d761369c3755778f6d69fa6f5907ae1aead (diff)
ES7: Implement Tail Position Calls in the runtime
Change-Id: If1629109722496b3fd10b36b2376548440f2fee9 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4runtimeapi_p.h')
-rw-r--r--src/qml/jsruntime/qv4runtimeapi_p.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/qml/jsruntime/qv4runtimeapi_p.h b/src/qml/jsruntime/qv4runtimeapi_p.h
index 826b371c1d..d64178a72f 100644
--- a/src/qml/jsruntime/qv4runtimeapi_p.h
+++ b/src/qml/jsruntime/qv4runtimeapi_p.h
@@ -101,7 +101,7 @@ struct ExceptionCheck<void (*)(QV4::NoThrowEngine *, A, B, C)> {
F(ReturnedValue, callWithReceiver, (ExecutionEngine *engine, const Value &func, const Value *thisObject, Value *argv, int argc)) \
F(ReturnedValue, callPossiblyDirectEval, (ExecutionEngine *engine, Value *argv, int argc)) \
F(ReturnedValue, callWithSpread, (ExecutionEngine *engine, const Value &func, const Value &thisObject, Value *argv, int argc)) \
- F(ReturnedValue, tailCall, (ExecutionEngine *engine, const Value &func, const Value &thisObject, Value *argv, int argc)) \
+ F(ReturnedValue, tailCall, (CppStackFrame *frame, ExecutionEngine *engine)) \
\
/* construct */ \
F(ReturnedValue, construct, (ExecutionEngine *engine, const Value &func, const Value &newTarget, Value *argv, int argc)) \
@@ -234,6 +234,12 @@ struct Q_QML_PRIVATE_EXPORT Runtime {
FOR_EACH_RUNTIME_METHOD(RUNTIME_METHOD)
#undef RUNTIME_METHOD
+ struct StackOffsets {
+ static const int tailCall_function = -1;
+ static const int tailCall_thisObject = -2;
+ static const int tailCall_argv = -3;
+ static const int tailCall_argc = -4;
+ };
};
static_assert(std::is_standard_layout<Runtime>::value, "Runtime needs to be standard layout in order for us to be able to use offsetof");