@@ -56,6 +56,11 @@ export function compileBinaryOp(op: BinaryOperator, numeric: boolean = false): S
5656 [ BinaryOperator . MOD ] : [ Op . OP_MOD ] ,
5757 [ BinaryOperator . PLUS ] : [ Op . OP_CAT ] ,
5858 [ BinaryOperator . MINUS ] : [ Op . OP_SUB ] ,
59+ [ BinaryOperator . SHIFT_LEFT ] : [ Op . OP_LSHIFTBIN ] ,
60+ [ BinaryOperator . SHIFT_RIGHT ] : [ Op . OP_RSHIFTBIN ] ,
61+ [ BinaryOperator . BIT_AND ] : [ Op . OP_AND ] ,
62+ [ BinaryOperator . BIT_OR ] : [ Op . OP_OR ] ,
63+ [ BinaryOperator . BIT_XOR ] : [ Op . OP_XOR ] ,
5964 [ BinaryOperator . LT ] : [ Op . OP_LESSTHAN ] ,
6065 [ BinaryOperator . LE ] : [ Op . OP_LESSTHANOREQUAL ] ,
6166 [ BinaryOperator . GT ] : [ Op . OP_GREATERTHAN ] ,
@@ -64,16 +69,15 @@ export function compileBinaryOp(op: BinaryOperator, numeric: boolean = false): S
6469 [ BinaryOperator . NE ] : [ Op . OP_EQUAL , Op . OP_NOT ] ,
6570 [ BinaryOperator . AND ] : [ Op . OP_BOOLAND ] ,
6671 [ BinaryOperator . OR ] : [ Op . OP_BOOLOR ] ,
67- [ BinaryOperator . BIT_AND ] : [ Op . OP_AND ] ,
68- [ BinaryOperator . BIT_OR ] : [ Op . OP_OR ] ,
69- [ BinaryOperator . BIT_XOR ] : [ Op . OP_XOR ] ,
7072 [ BinaryOperator . SPLIT ] : [ Op . OP_SPLIT ] ,
7173 } ;
7274
7375 if ( numeric ) {
7476 mapping [ BinaryOperator . PLUS ] = [ Op . OP_ADD ] ;
7577 mapping [ BinaryOperator . EQ ] = [ Op . OP_NUMEQUAL ] ;
7678 mapping [ BinaryOperator . NE ] = [ Op . OP_NUMNOTEQUAL ] ;
79+ mapping [ BinaryOperator . SHIFT_LEFT ] = [ Op . OP_LSHIFTNUM ] ;
80+ mapping [ BinaryOperator . SHIFT_RIGHT ] = [ Op . OP_RSHIFTNUM ] ;
7781 }
7882
7983 return mapping [ op ] ;
@@ -83,6 +87,7 @@ export function compileUnaryOp(op: UnaryOperator): Op[] {
8387 const mapping = {
8488 [ UnaryOperator . NOT ] : [ Op . OP_NOT ] ,
8589 [ UnaryOperator . NEGATE ] : [ Op . OP_NEGATE ] ,
90+ [ UnaryOperator . INVERT ] : [ Op . OP_INVERT ] ,
8691 [ UnaryOperator . SIZE ] : [ Op . OP_SIZE , Op . OP_NIP ] ,
8792 [ UnaryOperator . REVERSE ] : [ Op . OP_REVERSEBYTES ] ,
8893 [ UnaryOperator . INPUT_VALUE ] : [ Op . OP_UTXOVALUE ] ,
0 commit comments