From 928a7d3e3edb278281641b6928ba046b123548ca Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Tue, 29 Oct 2013 16:06:43 +0100 Subject: Optimize some unops and binops for moth Optimize unops for ints/bools and add some special binops where one side is constant. Change-Id: I4f5639e36458560e5614371733abaafd94909ab1 Reviewed-by: Simon Hausmann --- src/qml/compiler/qv4instr_moth_p.h | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 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 8dac616a2a..562f70bddd 100644 --- a/src/qml/compiler/qv4instr_moth_p.h +++ b/src/qml/compiler/qv4instr_moth_p.h @@ -94,9 +94,11 @@ QT_BEGIN_NAMESPACE F(Jump, jump) \ F(CJump, cjump) \ F(UNot, unot) \ + F(UNotBool, unotBool) \ F(UPlus, uplus) \ F(UMinus, uminus) \ F(UCompl, ucompl) \ + F(UComplInt, ucomplInt) \ F(Increment, increment) \ F(Decrement, decrement) \ F(Binop, binop) \ @@ -104,6 +106,9 @@ QT_BEGIN_NAMESPACE F(BitAnd, bitAnd) \ F(BitOr, bitOr) \ F(BitXor, bitXor) \ + F(BitAndConst, bitAndConst) \ + F(BitOrConst, bitOrConst) \ + F(BitXorConst, bitXorConst) \ F(Mul, mul) \ F(Sub, sub) \ F(BinopContext, binopContext) \ @@ -448,6 +453,11 @@ union Instr Param source; Param result; }; + struct instr_unotBool { + MOTH_INSTR_HEADER + Param source; + Param result; + }; struct instr_uplus { MOTH_INSTR_HEADER Param source; @@ -463,6 +473,11 @@ union Instr Param source; Param result; }; + struct instr_ucomplInt { + MOTH_INSTR_HEADER + Param source; + Param result; + }; struct instr_increment { MOTH_INSTR_HEADER Param source; @@ -504,6 +519,24 @@ union Instr Param rhs; Param result; }; + struct instr_bitAndConst { + MOTH_INSTR_HEADER + Param lhs; + int rhs; + Param result; + }; + struct instr_bitOrConst { + MOTH_INSTR_HEADER + Param lhs; + int rhs; + Param result; + }; + struct instr_bitXorConst { + MOTH_INSTR_HEADER + Param lhs; + int rhs; + Param result; + }; struct instr_mul { MOTH_INSTR_HEADER Param lhs; @@ -596,9 +629,11 @@ union Instr instr_jump jump; instr_cjump cjump; instr_unot unot; + instr_unotBool unotBool; instr_uplus uplus; instr_uminus uminus; instr_ucompl ucompl; + instr_ucomplInt ucomplInt; instr_increment increment; instr_decrement decrement; instr_binop binop; @@ -606,6 +641,9 @@ union Instr instr_bitAnd bitAnd; instr_bitOr bitOr; instr_bitXor bitXor; + instr_bitAndConst bitAndConst; + instr_bitOrConst bitOrConst; + instr_bitXorConst bitXorConst; instr_mul mul; instr_sub sub; instr_binopContext binopContext; -- cgit v1.2.3