Use of 'MMBIN' opcodes extended to shift operators

Plus, this commit removes useless 'tm' parameters in 'op_*' macros.
This commit is contained in:
Roberto Ierusalimschy
2019-08-28 09:58:03 -03:00
parent df13f25948
commit 46b84580d6
5 changed files with 60 additions and 87 deletions

View File

@@ -806,8 +806,7 @@ assert(a+3 == "add" and 3-a == "sub" and a*3 == "mul" and
-a == "unm" and #a == "len" and a&3 == "band")
assert(a + 30000 == "add" and a - 3.0 == "sub" and a * 3.0 == "mul" and
-a == "unm" and #a == "len" and a & 3 == "band")
assert(a|3 == "bor" and 3~a == "bxor" and a<<3 == "shift" and
a>>1 == "shift")
assert(a|3 == "bor" and 3~a == "bxor" and a<<3 == "shl" and a>>1 == "shr")
assert (a==b and a.op == "eq")
assert (a>=b and a.op == "order")
assert (a>b and a.op == "order")