From b1f07986c30978ed6636457e8d3f4a65c5db38a3 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Mon, 15 Oct 2018 10:22:47 +0200 Subject: Create proper template objects for tagged templates If a tagged template gets evaluated multiple times, the underlying template object is shared. Change-Id: Ie2f476fbc93d5991322ce1087c42719a8d8333ae Reviewed-by: Simon Hausmann --- src/qml/jit/qv4baselinejit.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/qml/jit/qv4baselinejit.cpp') diff --git a/src/qml/jit/qv4baselinejit.cpp b/src/qml/jit/qv4baselinejit.cpp index 6bc1ca6e45..098bbfc6c6 100644 --- a/src/qml/jit/qv4baselinejit.cpp +++ b/src/qml/jit/qv4baselinejit.cpp @@ -992,6 +992,15 @@ void BaselineJIT::generate_ThrowOnNullOrUndefined() as->checkException(); } +void BaselineJIT::generate_GetTemplateObject(int index) +{ + STORE_ACC(); + as->prepareCallWithArgCount(2); + as->passInt32AsArg(index, 1); + as->passFunctionAsArg(0); + BASELINEJIT_GENERATE_RUNTIME_CALL(RuntimeHelpers::getTemplateObject, CallResultDestination::InAccumulator); + as->checkException(); +} void BaselineJIT::startInstruction(Instr::Type /*instr*/) { -- cgit v1.2.3