@@ -449,27 +449,33 @@ impl<'a, 'b> FunctionCompiler<'a, 'b> {
449449}
450450
451451// Floats and Integers
452- ( _, JitValue :: Int ( a) , JitValue :: Float ( b) ) |
453- ( _, JitValue :: Float ( a) , JitValue :: Int ( b) ) =>{
454-
452+ ( _, JitValue :: Int ( a) , JitValue :: Float ( b) )
453+ |( _, JitValue :: Float ( a) , JitValue :: Int ( b) ) =>{
455454let operand_one =match a_type. unwrap ( ) {
456455JitType :: Int =>self . builder . ins ( ) . fcvt_from_sint ( types:: F64 , a) ,
457- _=> a
456+ _ => a,
458457} ;
459458
460459let operand_two =match b_type. unwrap ( ) {
461460JitType :: Int =>self . builder . ins ( ) . fcvt_from_sint ( types:: F64 , b) ,
462- _=> b
461+ _ => b,
463462} ;
464463
465- match op{
466- BinaryOperator :: Add =>JitValue :: Float ( self . builder . ins ( ) . fadd ( operand_one, operand_two) ) ,
467- BinaryOperator :: Subtract =>JitValue :: Float ( self . builder . ins ( ) . fsub ( operand_one, operand_two) ) ,
468- BinaryOperator :: Multiply =>JitValue :: Float ( self . builder . ins ( ) . fmul ( operand_one, operand_two) ) ,
469- BinaryOperator :: Divide =>JitValue :: Float ( self . builder . ins ( ) . fdiv ( operand_one, operand_two) ) ,
470- _ =>return Err ( JitCompileError :: NotSupported )
464+ match op{
465+ BinaryOperator :: Add =>{
466+ JitValue :: Float ( self . builder . ins ( ) . fadd ( operand_one, operand_two) )
467+ }
468+ BinaryOperator :: Subtract =>{
469+ JitValue :: Float ( self . builder . ins ( ) . fsub ( operand_one, operand_two) )
470+ }
471+ BinaryOperator :: Multiply =>{
472+ JitValue :: Float ( self . builder . ins ( ) . fmul ( operand_one, operand_two) )
473+ }
474+ BinaryOperator :: Divide =>{
475+ JitValue :: Float ( self . builder . ins ( ) . fdiv ( operand_one, operand_two) )
476+ }
477+ _ =>return Err ( JitCompileError :: NotSupported ) ,
471478}
472-
473479}
474480 _ =>return Err ( JitCompileError :: NotSupported ) ,
475481} ;