@@ -446,6 +446,14 @@ impl Compiler {
446446 let rhs = self . visit_expr ( func, rhs) ;
447447 match ( lhs, rhs) {
448448 ( Intermediate :: Error , Intermediate :: Error ) => Intermediate :: Error ,
449+ ( Intermediate :: StackI32 , Intermediate :: StackI32 ) => {
450+ func. instructions ( ) . i32_eq ( ) ;
451+ Intermediate :: StackBool
452+ }
453+ ( Intermediate :: StackI64 , Intermediate :: StackI64 ) => {
454+ func. instructions ( ) . i64_eq ( ) ;
455+ Intermediate :: StackBool
456+ }
449457 ( Intermediate :: StackF64 , Intermediate :: StackF64 ) => {
450458 func. instructions ( ) . f64_eq ( ) ;
451459 Intermediate :: StackBool
@@ -456,6 +464,29 @@ impl Compiler {
456464 }
457465 }
458466 }
467+ Expr :: NotEquals ( lhs, rhs) => {
468+ let lhs = self . visit_expr ( func, lhs) ;
469+ let rhs = self . visit_expr ( func, rhs) ;
470+ match ( lhs, rhs) {
471+ ( Intermediate :: Error , Intermediate :: Error ) => Intermediate :: Error ,
472+ ( Intermediate :: StackI32 , Intermediate :: StackI32 ) => {
473+ func. instructions ( ) . i32_ne ( ) ;
474+ Intermediate :: StackBool
475+ }
476+ ( Intermediate :: StackI64 , Intermediate :: StackI64 ) => {
477+ func. instructions ( ) . i64_ne ( ) ;
478+ Intermediate :: StackBool
479+ }
480+ ( Intermediate :: StackF64 , Intermediate :: StackF64 ) => {
481+ func. instructions ( ) . f64_ne ( ) ;
482+ Intermediate :: StackBool
483+ }
484+ ( lhs, rhs) => {
485+ self . todo ( format ! ( "Expr::Equals({:?}, {:?})" , lhs, rhs) ) ;
486+ Intermediate :: Error
487+ }
488+ }
489+ }
459490 Expr :: Add ( lhs, rhs) => {
460491 let lhs = self . visit_expr ( func, lhs) ;
461492 let rhs = self . visit_expr ( func, rhs) ;
0 commit comments