From 6f1e2722b9eef73a4fe19951b47c4b172642a2ba Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Tue, 15 May 2018 13:15:43 +0200 Subject: Simplify Push and PopContext instructions There's no need for a temp register to store the old context in, as PopContext can simply retrieve the old context from the current one. Change-Id: Ife9cfdff7fa8e47fc71e844a7798de88dbc79e26 Reviewed-by: Simon Hausmann --- src/qml/compiler/qv4instr_moth_p.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (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 83ff11a128..54a7f5f13e 100644 --- a/src/qml/compiler/qv4instr_moth_p.h +++ b/src/qml/compiler/qv4instr_moth_p.h @@ -114,13 +114,13 @@ QT_BEGIN_NAMESPACE #define INSTR_GetException(op) INSTRUCTION(op, GetException, 0) #define INSTR_SetException(op) INSTRUCTION(op, SetException, 0) #define INSTR_CreateCallContext(op) INSTRUCTION(op, CreateCallContext, 0) -#define INSTR_PushCatchContext(op) INSTRUCTION(op, PushCatchContext, 3, reg, index, name) -#define INSTR_PushWithContext(op) INSTRUCTION(op, PushWithContext, 1, reg) -#define INSTR_PushBlockContext(op) INSTRUCTION(op, PushBlockContext, 2, reg, index) +#define INSTR_PushCatchContext(op) INSTRUCTION(op, PushCatchContext, 2, index, name) +#define INSTR_PushWithContext(op) INSTRUCTION(op, PushWithContext, 0) +#define INSTR_PushBlockContext(op) INSTRUCTION(op, PushBlockContext, 1, index) #define INSTR_CloneBlockContext(op) INSTRUCTION(op, CloneBlockContext, 0) #define INSTR_PushScriptContext(op) INSTRUCTION(op, PushScriptContext, 1, index) #define INSTR_PopScriptContext(op) INSTRUCTION(op, PopScriptContext, 0) -#define INSTR_PopContext(op) INSTRUCTION(op, PopContext, 1, reg) +#define INSTR_PopContext(op) INSTRUCTION(op, PopContext, 0) #define INSTR_GetIterator(op) INSTRUCTION(op, GetIterator, 1, iterator) #define INSTR_IteratorNext(op) INSTRUCTION(op, IteratorNext, 1, value) #define INSTR_IteratorClose(op) INSTRUCTION(op, IteratorClose, 1, done) -- cgit v1.2.3