diff options
author | Erik Verbruggen <erik.verbruggen@qt.io> | 2018-09-04 12:19:10 +0200 |
---|---|---|
committer | Erik Verbruggen <erik.verbruggen@qt.io> | 2018-10-05 11:18:16 +0000 |
commit | 052d22e116957a170e290a49d077d3e9f290a237 (patch) | |
tree | 8d63f1b622a7c93d8b845c3d77f796f5ad18493b /src/qml/jsruntime/qv4vme_moth.cpp | |
parent | 08342d761369c3755778f6d69fa6f5907ae1aead (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/qv4vme_moth.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4vme_moth.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/qml/jsruntime/qv4vme_moth.cpp b/src/qml/jsruntime/qv4vme_moth.cpp index 7fd7be8e38..5d95c8c2ab 100644 --- a/src/qml/jsruntime/qv4vme_moth.cpp +++ b/src/qml/jsruntime/qv4vme_moth.cpp @@ -778,7 +778,11 @@ QV4::ReturnedValue VME::interpret(CppStackFrame *frame, ExecutionEngine *engine, MOTH_BEGIN_INSTR(TailCall) STORE_IP(); - acc = Runtime::method_tailCall(engine, STACK_VALUE(func), STACK_VALUE(thisObject), stack + argv, argc); + *engine->jsAlloca(1) = Primitive::fromInt32(argc); + *engine->jsAlloca(1) = Primitive::fromInt32(argv); + *engine->jsAlloca(1) = STACK_VALUE(thisObject); + *engine->jsAlloca(1) = STACK_VALUE(func); + return Runtime::method_tailCall(frame, engine); CHECK_EXCEPTION; MOTH_END_INSTR(TailCall) |