Skip to content

Commit

Permalink
Update faerie to 0.9.1
Browse files Browse the repository at this point in the history
  • Loading branch information
yurydelendik authored and sunfishcode committed Mar 27, 2019
1 parent db0abe8 commit 94ca967
Show file tree
Hide file tree
Showing 11 changed files with 16 additions and 35 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Expand Up @@ -34,8 +34,8 @@ wasmtime-wast = { path = "wasmtime-wast" }
docopt = "1.0.1"
serde = "1.0.75"
serde_derive = "1.0.75"
faerie = "0.7.1"
target-lexicon = { version = "0.2.0", default-features = false }
faerie = "0.9.1"
target-lexicon = { version = "0.3.0", default-features = false }
pretty_env_logger = "0.3.0"
file-per-thread-logger = "0.1.1"
wabt = "0.7"
Expand Down
4 changes: 2 additions & 2 deletions wasmtime-debug/Cargo.toml
Expand Up @@ -17,9 +17,9 @@ wasmparser = { version = "0.28.0" }
cranelift-codegen = "0.29.0"
cranelift-entity = "0.29.0"
cranelift-wasm = "0.29.0"
faerie = "0.7.0"
faerie = "0.9.1"
wasmtime-environ = { path = "../wasmtime-environ", default-features = false }
target-lexicon = { version = "0.2.0", default-features = false }
target-lexicon = { version = "0.3.0", default-features = false }
failure = { version = "0.1.3", default-features = false }
failure_derive = { version = "0.1.3", default-features = false }

Expand Down
2 changes: 1 addition & 1 deletion wasmtime-debug/src/lib.rs
Expand Up @@ -74,7 +74,7 @@ pub fn emit_debugsections_image(
let segment_body = (segment_body.0 as *const u8, segment_body.1 - segment_body.0);

let body = unsafe { ::std::slice::from_raw_parts(segment_body.0, segment_body.1) };
obj.declare_with("all", Decl::Function { global: false }, body.to_vec())?;
obj.declare_with("all", Decl::function(), body.to_vec())?;

emit_dwarf(&mut obj, dwarf, &resolver);

Expand Down
2 changes: 1 addition & 1 deletion wasmtime-debug/src/write_debuginfo.rs
Expand Up @@ -21,7 +21,7 @@ macro_rules! decl_section {
$artifact
.declare_with(
SectionId::$section.name(),
Decl::DebugSection,
Decl::debug_section(),
$name.0.writer.into_vec(),
)
.unwrap();
Expand Down
2 changes: 1 addition & 1 deletion wasmtime-jit/Cargo.toml
Expand Up @@ -22,7 +22,7 @@ wasmtime-debug = { path = "../wasmtime-debug", default-features = false }
region = "2.0.0"
failure = { version = "0.1.3", default-features = false }
failure_derive = { version = "0.1.3", default-features = false }
target-lexicon = { version = "0.2.0", default-features = false }
target-lexicon = { version = "0.3.0", default-features = false }
hashbrown = { version = "0.1.8", optional = true }
wasmparser = "0.29.2"

Expand Down
2 changes: 1 addition & 1 deletion wasmtime-obj/Cargo.toml
Expand Up @@ -16,4 +16,4 @@ cranelift-codegen = "0.29.0"
cranelift-entity = "0.29.0"
cranelift-wasm = "0.29.0"
wasmtime-environ = { path = "../wasmtime-environ" }
faerie = "0.7.1"
faerie = "0.9.1"
10 changes: 2 additions & 8 deletions wasmtime-obj/src/data_segment.rs
Expand Up @@ -8,14 +8,8 @@ pub fn declare_data_segment(
index: usize,
) -> Result<(), String> {
let name = format!("_memory_{}", index);
obj.declare(
name,
Decl::Data {
writable: false,
global: false,
},
)
.map_err(|err| format!("{}", err))?;
obj.declare(name, Decl::data())
.map_err(|err| format!("{}", err))?;
Ok(())
}

Expand Down
2 changes: 1 addition & 1 deletion wasmtime-obj/src/function.rs
Expand Up @@ -13,7 +13,7 @@ pub fn declare_functions(
for (i, _function_relocs) in relocations.iter().rev() {
let func_index = module.func_index(i);
let string_name = format!("_wasm_function_{}", func_index.index());
obj.declare(string_name, Decl::Function { global: true })
obj.declare(string_name, Decl::function().global())
.map_err(|err| format!("{}", err))?;
}
Ok(())
Expand Down
11 changes: 2 additions & 9 deletions wasmtime-obj/src/module.rs
Expand Up @@ -12,15 +12,8 @@ fn emit_vmcontext_init(
target_config: &TargetFrontendConfig,
) -> Result<(), String> {
let (data, table_relocs) = layout_vmcontext(module, target_config);
obj.declare_with(
"_vmcontext_init",
Decl::Data {
writable: false,
global: true,
},
data.to_vec(),
)
.map_err(|err| format!("{}", err))?;
obj.declare_with("_vmcontext_init", Decl::data().global(), data.to_vec())
.map_err(|err| format!("{}", err))?;
for reloc in table_relocs.iter() {
let target_name = format!("_table_{}", reloc.index);
obj.link(Link {
Expand Down
10 changes: 2 additions & 8 deletions wasmtime-obj/src/table.rs
Expand Up @@ -3,14 +3,8 @@ use faerie::{Artifact, Decl};
/// Declares data segment symbol
pub fn declare_table(obj: &mut Artifact, index: usize) -> Result<(), String> {
let name = format!("_table_{}", index);
obj.declare(
name,
Decl::Data {
writable: false,
global: false,
},
)
.map_err(|err| format!("{}", err))?;
obj.declare(name, Decl::data())
.map_err(|err| format!("{}", err))?;
Ok(())
}

Expand Down
2 changes: 1 addition & 1 deletion wasmtime-wast/Cargo.toml
Expand Up @@ -20,7 +20,7 @@ wasmtime-jit = { path = "../wasmtime-jit" }
wasmtime-runtime = { path = "../wasmtime-runtime" }
wasmtime-environ = { path = "../wasmtime-environ" }
wabt = "0.7"
target-lexicon = "0.2.0"
target-lexicon = "0.3.0"
failure = { version = "0.1.3", default-features = false }
failure_derive = { version = "0.1.3", default-features = false }

Expand Down

0 comments on commit 94ca967

Please sign in to comment.