Remove unused debug-logs

This commit is contained in:
Sofia 2025-08-16 17:38:29 +03:00
parent 407c681cb6
commit fa95da97ae
3 changed files with 1 additions and 12 deletions

View File

@ -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

View File

@ -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

View File

@ -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();