Changeset 4359 for proto/charsetcompiler


Ignore:
Timestamp:
Dec 25, 2014, 8:30:38 AM (4 years ago)
Author:
cameron
Message:

Sel -> Xor optimization; implement Pablo Xor in printer, compiler

File:
1 edited

Legend:

Unmodified
Added
Removed
  • proto/charsetcompiler/pablo_expr.py

    r4075 r4359  
    158158    elif equal_exprs(T_expr, F_expr):
    159159        return T_expr
     160    elif isinstance(T_expr, Not) and equal_exprs(T_expr.operand, F_expr):
     161        return make_xor(if_expr, F_expr)
     162    elif isinstance(F_expr, Not) and equal_exprs(F_expr.operand, T_expr):
     163        return make_xor(if_expr, F_expr)
    160164    else: return Sel(if_expr, T_expr, F_expr)
    161165
Note: See TracChangeset for help on using the changeset viewer.