Disable some prinln!'s

This commit is contained in:
bjorn3 2018-08-15 15:28:08 +02:00
parent 7d3f2ba49f
commit a3760040b2
4 changed files with 5 additions and 38 deletions

View file

@ -55,12 +55,6 @@ pub fn cton_sig_from_fn_ty<'a, 'tcx: 'a>(
Abi::Rust => (CallConv::Fast, sig.inputs().to_vec(), sig.output()),
Abi::C => (CallConv::SystemV, sig.inputs().to_vec(), sig.output()),
Abi::RustCall => {
println!(
"rust-call sig: {:?} inputs: {:?} output: {:?}",
sig,
sig.inputs(),
sig.output()
);
assert_eq!(sig.inputs().len(), 2);
let extra_args = match sig.inputs().last().unwrap().sty {
ty::TyTuple(ref tupled_arguments) => tupled_arguments,
@ -439,11 +433,6 @@ pub fn codegen_call<'a, 'tcx: 'a>(
}
_ => bug!("argument to function with \"rust-call\" ABI is not a tuple"),
}
println!(
"{:?} {:?}",
pack_arg.layout().ty,
args.iter().map(|a| a.layout().ty).collect::<Vec<_>>()
);
args
} else {
args.into_iter()
@ -462,7 +451,6 @@ pub fn codegen_call<'a, 'tcx: 'a>(
let ret_layout = fx.layout_of(sig.output());
let output_pass_mode = get_pass_mode(fx.tcx, sig.abi, sig.output(), true);
println!("{:?}", output_pass_mode);
let return_ptr = match output_pass_mode {
PassMode::NoPass => None,
PassMode::ByRef => match destination {

View file

@ -771,7 +771,6 @@ pub fn trans_checked_int_binop<'a, 'tcx: 'a>(
out_place
.place_field(fx, mir::Field::new(0))
.write_cvalue(fx, res);
println!("abc");
out_place
.place_field(fx, mir::Field::new(1))
.write_cvalue(fx, has_overflow);

View file

@ -23,9 +23,9 @@ impl ConstantCx {
tcx: TyCtxt<'a, 'tcx, 'tcx>,
module: &mut Module<B>,
) {
println!("todo {:?}", self.todo);
//println!("todo {:?}", self.todo);
define_all_allocs(tcx, module, &mut self);
println!("done {:?}", self.done);
//println!("done {:?}", self.done);
for data_id in self.done.drain() {
module.finalize_data(data_id);
}
@ -159,13 +159,13 @@ fn define_all_allocs<'a, 'tcx: 'a, B: Backend + 'a>(
while let Some(todo_item) = pop_set(&mut cx.todo) {
let (data_id, alloc) = match todo_item {
TodoItem::Alloc(alloc_id) => {
println!("alloc_id {}", alloc_id);
//println!("alloc_id {}", alloc_id);
let data_id = data_id_for_alloc_id(module, alloc_id);
let alloc = memory.get(alloc_id).unwrap();
(data_id, alloc)
}
TodoItem::Static(def_id) => {
println!("static {:?}", def_id);
//println!("static {:?}", def_id);
let instance = ty::Instance::mono(tcx, def_id);
let cid = GlobalId {
instance,
@ -183,7 +183,7 @@ fn define_all_allocs<'a, 'tcx: 'a, B: Backend + 'a>(
}
};
println!("data_id {}", data_id);
//("data_id {}", data_id);
if cx.done.contains(&data_id) {
continue;
}

View file

@ -36,26 +36,6 @@ impl MetadataLoader for CraneliftMetadataLoader {
_target: &::rustc_target::spec::Target,
_path: &Path,
) -> Result<owning_ref::ErasedBoxRef<[u8]>, String> {
//use goblin::Object;
//let buffer = ::std::fs::read(path).map_err(|e|format!("{:?}", e))?;
/*match Object::parse(&buffer).map_err(|e|format!("{:?}", e))? {
Object::Elf(elf) => {
println!("elf: {:#?}", &elf);
},
Object::PE(pe) => {
println!("pe: {:#?}", &pe);
},
Object::Mach(mach) => {
println!("mach: {:#?}", &mach);
},
Object::Archive(archive) => {
return Err(format!("archive: {:#?}", &archive));
},
Object::Unknown(magic) => {
return Err(format!("unknown magic: {:#x}", magic))
}
}*/
Err("dylib metadata loading is not yet supported".to_string())
}
}