forked from M-Labs/nac3
WIP10 - Debug statements again
This commit is contained in:
parent
6793563a7c
commit
89d52b310c
|
@ -761,6 +761,8 @@ fn polymorphic_print<'ctx>(
|
|||
ctx.module.add_function(fn_name, fn_t, None)
|
||||
});
|
||||
|
||||
println!("printf({fmt}, [{}])", args.iter().map(|arg| arg.to_string()).join(", "));
|
||||
|
||||
let fmt = ctx.gen_string(generator, fmt);
|
||||
let fmt = unsafe { fmt.get_field_at_index_unchecked(0) }.into_pointer_value();
|
||||
|
||||
|
@ -780,7 +782,7 @@ fn polymorphic_print<'ctx>(
|
|||
let suffix = suffix.unwrap_or_default();
|
||||
|
||||
let mut fmt = String::new();
|
||||
let mut args = Vec::<BasicValueEnum<'ctx>>::new();
|
||||
let mut args = Vec::new();
|
||||
|
||||
let flush = |ctx: &mut CodeGenContext<'ctx, '_>,
|
||||
generator: &mut dyn CodeGenerator,
|
||||
|
|
Loading…
Reference in New Issue