diff options
author | Lars Knoll <lars.knoll@digia.com> | 2013-10-29 16:06:43 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-10-30 08:29:49 +0100 |
commit | 928a7d3e3edb278281641b6928ba046b123548ca (patch) | |
tree | ffa4f10322b224b71cd512f959b14db5c0c63ac0 /src/qml/compiler/qv4instr_moth_p.h | |
parent | 53a6d572e5ded9f559a7287e42a65328b4e8ba1b (diff) |
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 <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/compiler/qv4instr_moth_p.h')
-rw-r--r-- | src/qml/compiler/qv4instr_moth_p.h | 38 |
1 files changed, 38 insertions, 0 deletions
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; |