From fa95da97aee56dde1d1b3a819e1d33935fe24f2d Mon Sep 17 00:00:00 2001 From: sofia Date: Sat, 16 Aug 2025 17:38:29 +0300 Subject: [PATCH] Remove unused debug-logs --- libtest.sh | 2 +- reid/src/mir/typecheck/typeinference.rs | 8 -------- reid/src/mir/typecheck/typerefs.rs | 3 --- 3 files changed, 1 insertion(+), 12 deletions(-) diff --git a/libtest.sh b/libtest.sh index 16699eb..654be8a 100755 --- a/libtest.sh +++ b/libtest.sh @@ -16,7 +16,7 @@ BINARY="$(echo $1 | cut -d'.' -f1)"".out" echo $1 -cargo run --features log_output --example cli $@ && \ +cargo run --example cli $@ && \ ./$BINARY ; echo "Return value: ""$?" ## Command from: clang -v hello.o -o test diff --git a/reid/src/mir/typecheck/typeinference.rs b/reid/src/mir/typecheck/typeinference.rs index dc0a6f2..17e9a6b 100644 --- a/reid/src/mir/typecheck/typeinference.rs +++ b/reid/src/mir/typecheck/typeinference.rs @@ -362,8 +362,6 @@ impl Expression { let mut lhs_ref = lhs.infer_types(state, type_refs)?; let mut rhs_ref = rhs.infer_types(state, type_refs)?; - dbg!(&lhs_ref, &rhs_ref); - let binops = if let (Some(lhs_ty), Some(rhs_ty)) = (lhs_ref.resolve_deep(), rhs_ref.resolve_deep()) { let mut applying_binops = Vec::new(); for (_, binop) in state.scope.binops.iter() { @@ -395,12 +393,9 @@ impl Expression { widened_rhs = widened_rhs.widen_into(&binop.hands.1); } let binop_res = type_refs.from_binop(*op, &lhs_ref, &rhs_ref); - // dbg!(&return_ty); - // dbg!(&binop_res); lhs_ref.narrow(&type_refs.from_type(&widened_lhs).unwrap()); rhs_ref.narrow(&type_refs.from_type(&widened_rhs).unwrap()); *return_ty = binop_res.as_type(); - dbg!(&lhs_ref, &rhs_ref); Ok(binop_res) } else { Err(ErrorKind::InvalidBinop( @@ -441,10 +436,7 @@ impl Expression { // Try to narrow condition type to boolean if let Some(mut cond_hints) = cond_hints { - println!("before: {}", type_refs.types); - dbg!(&cond_hints); cond_hints.narrow(&mut type_refs.from_type(&Bool).unwrap()); - println!("after: {}", type_refs.types); } // Infer LHS return type diff --git a/reid/src/mir/typecheck/typerefs.rs b/reid/src/mir/typecheck/typerefs.rs index 8863ee3..ca6fec5 100644 --- a/reid/src/mir/typecheck/typerefs.rs +++ b/reid/src/mir/typecheck/typerefs.rs @@ -386,9 +386,6 @@ impl<'outer> ScopeTypeRefs<'outer> { let hint1_typeref = self.types.retrieve_typeref(*hint1.0.borrow()).unwrap(); let hint2_typeref = self.types.retrieve_typeref(*hint2.0.borrow()).unwrap(); - dbg!(&hint1_typeref); - dbg!(&hint2_typeref); - match (&hint1_typeref, &hint2_typeref) { (TypeRefKind::Direct(ret_ty), TypeRefKind::BinOp(op, lhs, rhs)) => { let mut lhs_ref = self.from_type(&lhs).unwrap();