Skip to content
This repository has been archived by the owner on Aug 31, 2023. It is now read-only.

Commit

Permalink
Merge pull request #51 from dhil/weekly-merge
Browse files Browse the repository at this point in the history
Weekly merge
  • Loading branch information
dhil authored Jul 22, 2023
2 parents 8516a0c + 3cae9fc commit 4deda5f
Show file tree
Hide file tree
Showing 84 changed files with 8,076 additions and 1,312 deletions.
292 changes: 144 additions & 148 deletions Cargo.lock

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ wasmtime-wast = { workspace = true, features = ['component-model'] }
wasmtime-component-util = { workspace = true }
component-macro-test = { path = "crates/misc/component-macro-test" }
component-test-util = { workspace = true }
bstr = "0.2.17"
bstr = "1.6.0"
libc = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
Expand Down Expand Up @@ -203,15 +203,15 @@ rustix = "0.38.4"
wit-bindgen = { version = "0.7.0", default-features = false }

# wasm-tools family:
wasmparser = { git = "https://github.com/effect-handlers/wasm-tools", tag = "wasmfx-tools-1.0.36" }
wat = { git = "https://github.com/effect-handlers/wasm-tools", tag = "wasmfx-tools-1.0.36" }
wast = { git = "https://github.com/effect-handlers/wasm-tools", tag = "wasmfx-tools-1.0.36" }
wasmprinter = { git = "https://github.com/effect-handlers/wasm-tools", tag = "wasmfx-tools-1.0.36" }
wasm-encoder = { git = "https://github.com/effect-handlers/wasm-tools", tag = "wasmfx-tools-1.0.36" }
wasm-smith = { git = "https://github.com/effect-handlers/wasm-tools", tag = "wasmfx-tools-1.0.36" }
wasm-mutate = { git = "https://github.com/effect-handlers/wasm-tools", tag = "wasmfx-tools-1.0.36" }
wit-parser = { git = "https://github.com/effect-handlers/wasm-tools", tag = "wasmfx-tools-1.0.36" }
wit-component = { git = "https://github.com/effect-handlers/wasm-tools", tag = "wasmfx-tools-1.0.36" }
wasmparser = { git = "https://github.com/effect-handlers/wasm-tools", tag = "wasmfx-tools-1.0.37" }
wat = { git = "https://github.com/effect-handlers/wasm-tools", tag = "wasmfx-tools-1.0.37" }
wast = { git = "https://github.com/effect-handlers/wasm-tools", tag = "wasmfx-tools-1.0.37" }
wasmprinter = { git = "https://github.com/effect-handlers/wasm-tools", tag = "wasmfx-tools-1.0.37" }
wasm-encoder = { git = "https://github.com/effect-handlers/wasm-tools", tag = "wasmfx-tools-1.0.37" }
wasm-smith = { git = "https://github.com/effect-handlers/wasm-tools", tag = "wasmfx-tools-1.0.37" }
wasm-mutate = { git = "https://github.com/effect-handlers/wasm-tools", tag = "wasmfx-tools-1.0.37" }
wit-parser = { git = "https://github.com/effect-handlers/wasm-tools", tag = "wasmfx-tools-1.0.37" }
wit-component = { git = "https://github.com/effect-handlers/wasm-tools", tag = "wasmfx-tools-1.0.37" }

# Non-Bytecode Alliance maintained dependencies:
# --------------------------
Expand Down
2 changes: 1 addition & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Unreleased.

## 11.0.0

Unreleased.
Released 2023-07-20

### Changed

Expand Down
2 changes: 1 addition & 1 deletion ci/run-wasi-crypto-example.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ pushd "$RUST_BINDINGS"
cargo build --release --target=wasm32-wasi
popd

cargo run --features wasi-crypto -- run "$RUST_BINDINGS/target/wasm32-wasi/release/wasi-crypto-guest.wasm" --wasi-modules=experimental-wasi-crypto
cargo run --features wasi-crypto -- run --wasi-modules=experimental-wasi-crypto "$RUST_BINDINGS/target/wasm32-wasi/release/wasi-crypto-guest.wasm"
2 changes: 1 addition & 1 deletion ci/run-wasi-nn-example.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ cp target/wasm32-wasi/release/wasi-nn-example.wasm $TMP_DIR
popd

# Run the example in Wasmtime (note that the example uses `fixture` as the expected location of the model/tensor files).
cargo run -- run --mapdir fixture::$TMP_DIR $TMP_DIR/wasi-nn-example.wasm --wasi-modules=experimental-wasi-nn
cargo run -- run --mapdir fixture::$TMP_DIR --wasi-modules=experimental-wasi-nn $TMP_DIR/wasi-nn-example.wasm

# Clean up the temporary directory only if it was not specified (users may want to keep the directory around).
if [[ $REMOVE_TMP_DIR -eq 1 ]]; then
Expand Down
1 change: 0 additions & 1 deletion cranelift/codegen/src/isa/aarch64/inst/unwind/systemv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ mod tests {
use crate::settings::{builder, Flags};
use crate::Context;
use gimli::write::Address;
use std::str::FromStr;
use target_lexicon::triple;

#[test]
Expand Down
1 change: 0 additions & 1 deletion cranelift/codegen/src/isa/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@ pub const ALL_ARCHITECTURES: &[&str] = &["x86_64", "aarch64", "s390x", "riscv64"
/// Look for a supported ISA with the given `name`.
/// Return a builder that can create a corresponding `TargetIsa`.
pub fn lookup_by_name(name: &str) -> Result<Builder, LookupError> {
use alloc::str::FromStr;
lookup(triple!(name))
}

Expand Down
1 change: 0 additions & 1 deletion cranelift/codegen/src/isa/riscv64/inst/unwind/systemv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ mod tests {
use crate::settings::{builder, Flags};
use crate::Context;
use gimli::write::Address;
use std::str::FromStr;
use target_lexicon::triple;

#[test]
Expand Down
1 change: 0 additions & 1 deletion cranelift/codegen/src/isa/s390x/inst/unwind/systemv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ mod tests {
use crate::settings::{builder, Flags};
use crate::Context;
use gimli::write::Address;
use std::str::FromStr;
use target_lexicon::triple;

#[test]
Expand Down
2 changes: 1 addition & 1 deletion cranelift/codegen/src/isa/x64/inst/unwind/systemv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ mod tests {
use crate::settings::{builder, Flags};
use crate::Context;
use gimli::write::Address;
use std::str::FromStr;

use target_lexicon::triple;

#[test]
Expand Down
13 changes: 12 additions & 1 deletion cranelift/codegen/src/machinst/vcode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -827,10 +827,11 @@ impl<I: VCodeInst> VCode<I> {
}

let is_forward_edge_cfi_enabled = self.abi.is_forward_edge_cfi_enabled();
let bb_padding = match flags.bb_padding_log2_minus_one() {
let mut bb_padding = match flags.bb_padding_log2_minus_one() {
0 => Vec::new(),
n => vec![0; 1 << (n - 1)],
};
let mut total_bb_padding = 0;

for (block_order_idx, &block) in final_order.iter().enumerate() {
trace!("emitting block {:?}", block);
Expand Down Expand Up @@ -1054,9 +1055,19 @@ impl<I: VCodeInst> VCode<I> {

// Insert padding, if configured, to stress the `MachBuffer`'s
// relocation and island calculations.
//
// Padding can get quite large during fuzzing though so place a
// total cap on it where when a per-function threshold is exceeded
// the padding is turned back down to zero. This avoids a small-ish
// test case generating a GB+ memory footprint in Cranelift for
// example.
if !bb_padding.is_empty() {
buffer.put_data(&bb_padding);
buffer.align_to(I::LabelUse::ALIGN);
total_bb_padding += bb_padding.len();
if total_bb_padding > (150 << 20) {
bb_padding = Vec::new();
}
}
}

Expand Down
Loading

0 comments on commit 4deda5f

Please sign in to comment.