From 922e6f42b4fa9b9fa87246c577c13bb945bd4bc4 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Fri, 6 Apr 2018 10:20:08 +0200 Subject: Rework catch context handling Remove the need for a specialized catch context, instead use a regular block context, that also captures the catched variable. This also removes the need to do lookups by name inside a catch expression. Change-Id: I8b037add7f423922e2a76b4c0da646ca7e25813a Reviewed-by: Simon Hausmann --- src/qml/compiler/qv4compilercontext_p.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/qml/compiler/qv4compilercontext_p.h') diff --git a/src/qml/compiler/qv4compilercontext_p.h b/src/qml/compiler/qv4compilercontext_p.h index 189a623703..8c7da397a9 100644 --- a/src/qml/compiler/qv4compilercontext_p.h +++ b/src/qml/compiler/qv4compilercontext_p.h @@ -155,6 +155,8 @@ struct Context { mutable bool argumentsCanEscape = false; bool requiresExecutionContext = false; bool forceLookupByName = false; + bool isCatchBlock = false; + QString catchedVariable; enum UsesArgumentsObject { ArgumentsObjectUnknown, -- cgit v1.2.3