From 1f5c79c59aa43e416778a2046e4121731b34bb6a Mon Sep 17 00:00:00 2001 From: Erik Verbruggen Date: Tue, 21 Nov 2017 10:00:45 +0100 Subject: V4: Collapse LoadRegExp+StoreReg into MoveRegExp LoadRegExp is nearly always followed by a store of the accumulator, so change LoadRegExp to be MoveRegExp. This saves an instruction. Change-Id: I5d47c5bf6ffd7f28247c328410872c3b229ca23c Reviewed-by: Lars Knoll --- src/qml/compiler/qv4instr_moth_p.h | 4 ++-- 1 file changed, 2 insertions(+), 2 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 e0b013eb95..06cf34481c 100644 --- a/src/qml/compiler/qv4instr_moth_p.h +++ b/src/qml/compiler/qv4instr_moth_p.h @@ -89,7 +89,7 @@ QT_BEGIN_NAMESPACE #define INSTR_LoadScopedLocal(op) INSTRUCTION(op, LoadScopedLocal, 2, scope, index) #define INSTR_StoreScopedLocal(op) INSTRUCTION(op, StoreScopedLocal, 2, scope, index) #define INSTR_LoadRuntimeString(op) INSTRUCTION(op, LoadRuntimeString, 1, stringId) -#define INSTR_LoadRegExp(op) INSTRUCTION(op, LoadRegExp, 1, regExpId) +#define INSTR_MoveRegExp(op) INSTRUCTION(op, MoveRegExp, 2, regExpId, destReg) #define INSTR_LoadClosure(op) INSTRUCTION(op, LoadClosure, 1, value) #define INSTR_LoadName(op) INSTRUCTION(op, LoadName, 1, name) #define INSTR_LoadGlobalLookup(op) INSTRUCTION(op, LoadGlobalLookup, 1, index) @@ -205,7 +205,7 @@ QT_BEGIN_NAMESPACE F(LoadScopedLocal) \ F(StoreScopedLocal) \ F(LoadRuntimeString) \ - F(LoadRegExp) \ + F(MoveRegExp) \ F(LoadClosure) \ F(LoadName) \ F(LoadGlobalLookup) \ -- cgit v1.2.3