]> git.lizzy.rs Git - rust.git/commitdiff
Disable some prinln!'s
authorbjorn3 <bjorn3@users.noreply.github.com>
Wed, 15 Aug 2018 13:28:08 +0000 (15:28 +0200)
committerbjorn3 <bjorn3@users.noreply.github.com>
Wed, 15 Aug 2018 13:28:08 +0000 (15:28 +0200)
src/abi.rs
src/base.rs
src/constant.rs
src/metadata.rs

index 55fcc277a9a2ef806bbed8109ab92985d988cf97..f230e07125cf81ff5b4fa0184ced7bdb99359d87 100644 (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 {
index adb032a3520ec429270e99133cde26f4f5da5943..48a59a154b6e0fd823a29e27a9272fb2c2794cae 100644 (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);
index d745386e758b91cf51249b21fda46318ae0710fb..c2542f8bc1beb4b97af13c170d6ef9c771e49dc8 100644 (file)
@@ -23,9 +23,9 @@ pub fn finalize<'a, 'tcx: 'a, B: Backend>(
         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;
         }
index 29bb1c8e32571d5fbd219999423dfb98fd856a17..2653300c7b248675fb121944fced69f540b68c0e 100644 (file)
@@ -36,26 +36,6 @@ fn get_dylib_metadata(
         _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())
     }
 }