From a3760040b2d206607b51cf8ccfdf71da3fdd2787 Mon Sep 17 00:00:00 2001 From: bjorn3 Date: Wed, 15 Aug 2018 15:28:08 +0200 Subject: [PATCH] Disable some prinln!'s --- src/abi.rs | 12 ------------ src/base.rs | 1 - src/constant.rs | 10 +++++----- src/metadata.rs | 20 -------------------- 4 files changed, 5 insertions(+), 38 deletions(-) diff --git a/src/abi.rs b/src/abi.rs index 55fcc277a9a..f230e07125c 100644 --- a/src/abi.rs +++ b/src/abi.rs @@ -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::>() - ); 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 { diff --git a/src/base.rs b/src/base.rs index adb032a3520..48a59a154b6 100644 --- a/src/base.rs +++ b/src/base.rs @@ -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); diff --git a/src/constant.rs b/src/constant.rs index d745386e758..c2542f8bc1b 100644 --- a/src/constant.rs +++ b/src/constant.rs @@ -23,9 +23,9 @@ impl ConstantCx { tcx: TyCtxt<'a, 'tcx, 'tcx>, module: &mut Module, ) { - 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; } diff --git a/src/metadata.rs b/src/metadata.rs index 29bb1c8e325..2653300c7b2 100644 --- a/src/metadata.rs +++ b/src/metadata.rs @@ -36,26 +36,6 @@ impl MetadataLoader for CraneliftMetadataLoader { _target: &::rustc_target::spec::Target, _path: &Path, ) -> Result, 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()) } }