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/compiler/qv4instr_moth_p.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/qml/compiler/qv4instr_moth_p.h') diff --git a/src/qml/compiler/qv4instr_moth_p.h b/src/qml/compiler/qv4instr_moth_p.h index 2b1660ee58..2ca8f692b8 100644 --- a/src/qml/compiler/qv4instr_moth_p.h +++ b/src/qml/compiler/qv4instr_moth_p.h @@ -198,6 +198,7 @@ QT_BEGIN_NAMESPACE #define INSTR_LoadQmlImportedScripts(op) INSTRUCTION(op, LoadQmlImportedScripts, 1, result) #define INSTR_InitializeBlockDeadTemporalZone(op) INSTRUCTION(op, InitializeBlockDeadTemporalZone, 2, firstReg, count) #define INSTR_ThrowOnNullOrUndefined(op) INSTRUCTION(op, ThrowOnNullOrUndefined, 0) +#define INSTR_GetTemplateObject(op) INSTRUCTION(op, GetTemplateObject, 1, index) #define INSTR_TailCall(op) INSTRUCTION(op, TailCall, 4, func, thisObject, argc, argv) #define FOR_EACH_MOTH_INSTR_ALL(F) \ @@ -339,6 +340,7 @@ QT_BEGIN_NAMESPACE F(PopScriptContext) \ F(InitializeBlockDeadTemporalZone) \ F(ThrowOnNullOrUndefined) \ + F(GetTemplateObject) \ F(TailCall) \ F(Debug) \ -- cgit v1.2.3