Eliminate runtime's direct dependeny on wasmparser.

This commit is contained in:
Dan Gohman
2018-08-03 12:43:36 -07:00
parent 753d650f1a
commit 63bc52d9fd
2 changed files with 1 additions and 4 deletions

View File

@@ -10,5 +10,4 @@ license = "Apache-2.0 WITH LLVM-exception"
[dependencies]
cranelift-codegen = "0.18.1"
cranelift-wasm = "0.18.1"
wasmparser = "0.17.2"
target-lexicon = "0.0.3"

View File

@@ -8,7 +8,6 @@
extern crate cranelift_codegen;
extern crate cranelift_wasm;
extern crate target_lexicon;
extern crate wasmparser;
pub mod compilation;
pub mod instance;
@@ -590,9 +589,8 @@ impl<'data, 'module> ModuleTranslation<'data, 'module> {
self.module.signatures[self.module.functions[func_index]].clone();
let mut trans = FuncTranslator::new();
let reader = wasmparser::BinaryReader::new(input);
trans
.translate_from_reader(reader, &mut context.func, &mut self.func_env())
.translate(input, &mut context.func, &mut self.func_env())
.map_err(|e| e.to_string())?;
let mut code_buf: Vec<u8> = Vec::new();