Skip to content

Commit

Permalink
Update wasmparser dependency (bytecodealliance#912)
Browse files Browse the repository at this point in the history
* Update wasmparser dependency

Closes bytecodealliance#905

* Fix lightbeam compilation
  • Loading branch information
alexcrichton authored Feb 6, 2020
1 parent c860edc commit 9dffaf9
Show file tree
Hide file tree
Showing 12 changed files with 108 additions and 182 deletions.
30 changes: 15 additions & 15 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crates/api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ edition = "2018"
wasmtime-runtime = { path = "../runtime", version = "0.9.0" }
wasmtime-environ = { path = "../environ", version = "0.9.0" }
wasmtime-jit = { path = "../jit", version = "0.9.0" }
wasmparser = { version = "0.47.0", default-features = false }
wasmparser = "0.51.0"
target-lexicon = { version = "0.10.0", default-features = false }
anyhow = "1.0.19"
region = "2.0.0"
Expand Down
2 changes: 1 addition & 1 deletion crates/debug/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ edition = "2018"

[dependencies]
gimli = "0.19.0"
wasmparser = "0.47.0"
wasmparser = "0.51.0"
faerie = "0.14.0"
wasmtime-environ = { path = "../environ", version = "0.9.0" }
target-lexicon = { version = "0.10.0", default-features = false }
Expand Down
2 changes: 1 addition & 1 deletion crates/environ/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ anyhow = "1.0"
cranelift-codegen = { version = "0.56", features = ["enable-serde"] }
cranelift-entity = { version = "0.56", features = ["enable-serde"] }
cranelift-wasm = { version = "0.56", features = ["enable-serde"] }
wasmparser = "0.47.0"
wasmparser = "0.51.0"
lightbeam = { path = "../lightbeam", optional = true, version = "0.9.0" }
indexmap = "1.0.2"
rayon = "1.2.1"
Expand Down
2 changes: 1 addition & 1 deletion crates/fuzzing/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ arbitrary = { version = "0.3.2", features = ["derive"] }
binaryen = "0.8.2"
env_logger = { version = "0.7.1", optional = true }
log = "0.4.8"
wasmparser = "0.47.0"
wasmparser = "0.51.0"
wasmprinter = "0.2.0"
wasmtime = { path = "../api", version = "0.9.0" }

Expand Down
2 changes: 1 addition & 1 deletion crates/interface-types/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ edition = "2018"
[dependencies]
anyhow = "1.0.19"
walrus = "0.13"
wasmparser = { version = "0.47.0", default-features = false }
wasmparser = "0.51.0"
wasm-webidl-bindings = "0.6"
wasmtime = { path = "../api", version = "0.9.0" }
wasmtime-jit = { path = "../jit", version = "0.9.0" }
Expand Down
2 changes: 1 addition & 1 deletion crates/jit/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ wasmtime-debug = { path = "../debug", version = "0.9.0" }
region = "2.0.0"
thiserror = "1.0.4"
target-lexicon = { version = "0.10.0", default-features = false }
wasmparser = { version = "0.47.0", default-features = false }
wasmparser = "0.51.0"
more-asserts = "0.2.1"
anyhow = "1.0"
cfg-if = "0.1.9"
Expand Down
2 changes: 1 addition & 1 deletion crates/lightbeam/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ edition = "2018"
smallvec = "1.0.0"
dynasm = "0.5.2"
dynasmrt = "0.5.2"
wasmparser = "0.47.0"
wasmparser = "0.51.0"
memoffset = "0.5.3"
itertools = "0.8.2"
capstone = "0.6.0"
Expand Down
3 changes: 1 addition & 2 deletions crates/lightbeam/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ pub enum Error {

impl From<BinaryReaderError> for Error {
fn from(e: BinaryReaderError) -> Self {
let BinaryReaderError { message, offset } = e;
Error::Input(format!("At wasm offset {}: {}", offset, message))
Error::Input(format!("At wasm offset {}: {}", e.offset(), e.message()))
}
}

Expand Down
5 changes: 1 addition & 4 deletions crates/lightbeam/src/function_body.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,7 @@ where

let mut body = Vec::new();
for i in microwasm_conv {
match i {
Ok(v) => body.extend(v),
Err(e) => return Err(Error::Microwasm(e.message.to_string())),
};
body.extend(i?);
}

translate(session, reloc_sink, func_idx, body)?;
Expand Down
Loading

0 comments on commit 9dffaf9

Please sign in to comment.