refactorings for binary operator
fix checking types of lhs and rhs in binary expression
emit IR for variable parameters