Fixes #404: Use log.rs and a file-per-thread logger instead of the dbg! macro;

This commit is contained in:
Benjamin Bouvier
2018-07-20 19:14:04 +02:00
committed by Dan Gohman
parent 60c2cad06e
commit a044f58cea
27 changed files with 123 additions and 221 deletions

View File

@@ -17,6 +17,7 @@ hashmap_core = { version = "0.1.9", optional = true }
failure = { version = "0.1.1", default-features = false, features = ["derive"] }
failure_derive = { version = "0.1.1", default-features = false }
target-lexicon = { version = "0.0.3", default-features = false }
log = { version = "0.4.3", default-features = false, features = ["release_max_level_warn"] }
[dev-dependencies]
wabt = "0.4"

View File

@@ -67,7 +67,7 @@ impl FuncTranslator {
environ: &mut FE,
) -> WasmResult<()> {
let _tt = timing::wasm_translate_function();
dbg!(
info!(
"translate({} bytes, {}{})",
reader.bytes_remaining(),
func.name,
@@ -265,7 +265,7 @@ mod tests {
trans
.translate(&BODY, &mut ctx.func, &mut runtime.func_env())
.unwrap();
dbg!("{}", ctx.func.display(None));
debug!("{}", ctx.func.display(None));
ctx.verify(runtime.func_env().flags()).unwrap();
}
@@ -296,7 +296,7 @@ mod tests {
trans
.translate(&BODY, &mut ctx.func, &mut runtime.func_env())
.unwrap();
dbg!("{}", ctx.func.display(None));
debug!("{}", ctx.func.display(None));
ctx.verify(runtime.func_env().flags()).unwrap();
}
@@ -335,7 +335,7 @@ mod tests {
trans
.translate(&BODY, &mut ctx.func, &mut runtime.func_env())
.unwrap();
dbg!("{}", ctx.func.display(None));
debug!("{}", ctx.func.display(None));
ctx.verify(runtime.func_env().flags()).unwrap();
}
}

View File

@@ -24,7 +24,6 @@
#![cfg_attr(not(feature = "std"), no_std)]
#![cfg_attr(not(feature = "std"), feature(alloc))]
#[macro_use(dbg)]
extern crate cranelift_codegen;
#[macro_use]
extern crate cranelift_entity;
@@ -36,6 +35,9 @@ extern crate failure;
#[macro_use]
extern crate failure_derive;
#[macro_use]
extern crate log;
mod code_translator;
mod environ;
mod func_translator;