commit_hash stringlengths 40 40 | author stringlengths 1 57 | date timestamp[s]date 2010-07-26 04:45:09 2026-04-14 18:21:10 | message stringlengths 8 1.39M | diff stringlengths 68 51.2k | files_changed int64 1 136 | insertions int64 0 2.35k | deletions int64 0 1.9k |
|---|---|---|---|---|---|---|---|
20e71858a1e5a71a4dbdc563c41e3367f06a04f6 | Marcin Mielniczuk | 2020-04-01T06:55:51 | Sanitize file/directory symlinks in path_symlinks on Windows (#1359)
* Sanitize file/directory symlinks in path_symlinks on Windows
* Remove redundant error mappings | diff --git a/crates/wasi-common/src/sys/windows/path.rs b/crates/wasi-common/src/sys/windows/path.rs
index 24ddf7877..978ab913f 100644
--- a/crates/wasi-common/src/sys/windows/path.rs
+++ b/crates/wasi-common/src/sys/windows/path.rs
@@ -5,7 +5,7 @@ use crate::sys::entry::OsHandle;
use crate::wasi::{types, Errno, Resul... | 1 | 25 | 14 |
e64668776a5d1c3dc96bb242aad657e5224c2457 | Yury Delendik | 2020-03-31T23:33:35 | Propertly simulate DWARF information when imports present (#1452)
* Ignore complex LLVM10 expressions.
* Propery function name when imports are present | diff --git a/crates/debug/src/read_debuginfo.rs b/crates/debug/src/read_debuginfo.rs
index 014e81fd6..9416799bc 100644
--- a/crates/debug/src/read_debuginfo.rs
+++ b/crates/debug/src/read_debuginfo.rs
@@ -26,6 +26,7 @@ pub struct FunctionMetadata {
pub struct WasmFileInfo {
pub path: Option<PathBuf>,
pub cod... | 6 | 52 | 11 |
d3df27500334625f463ea0f8134ea28395a5e6a0 | Andrew Brown | 2020-03-31T19:47:43 | Remove duplication of map_reg; fixes #1245
Both cranelift-codegen and wasmtime-debug need to map Cranelift registers to Gimli registers. Previously both crates had an almost-identical `map_reg` implementation. This change:
- removes the wasmtime-debug implementation
- improves the cranelift-codegen implementation wi... | diff --git a/cranelift/codegen/src/isa/mod.rs b/cranelift/codegen/src/isa/mod.rs
index b74cf9f41..eaa1e599b 100644
--- a/cranelift/codegen/src/isa/mod.rs
+++ b/cranelift/codegen/src/isa/mod.rs
@@ -74,6 +74,12 @@ mod riscv;
#[cfg(feature = "x86")]
mod x86;
+#[cfg(all(feature = "x86", feature = "unwind"))]
+/// Expos... | 8 | 43 | 72 |
542368347480b4df5319289533bf351677bf5a8a | Andrew Brown | 2020-03-27T18:34:59 | Enable spec test for SIMD load_extend | diff --git a/build.rs b/build.rs
index 498c3ac2f..ea6e6c640 100644
--- a/build.rs
+++ b/build.rs
@@ -188,7 +188,6 @@ fn ignore(testsuite: &str, testname: &str, strategy: &str) -> bool {
("simd", "simd_i64x2_arith") => return true, // FIXME Unsupported feature: proposed SIMD operator I64x2Mul
(... | 1 | 0 | 1 |
3699e7d92553679a2f138e21075abb784bb2f4a0 | Andrew Brown | 2020-02-19T17:27:11 | Translate Wasm SIMD load_extend operations to Cranelift IR | diff --git a/cranelift/wasm/src/code_translator.rs b/cranelift/wasm/src/code_translator.rs
index ddc19a9b0..5f38d85ea 100644
--- a/cranelift/wasm/src/code_translator.rs
+++ b/cranelift/wasm/src/code_translator.rs
@@ -32,6 +32,7 @@ use crate::translation_utils::{FuncIndex, GlobalIndex, MemoryIndex, SignatureInd
use cra... | 1 | 64 | 15 |
cf1cfdcace551fca6a3fe52a8e7640ebf02b7803 | Andrew Brown | 2020-02-18T23:05:24 | Add new instructions to support SIMD load_extend | diff --git a/cranelift/codegen/meta/src/shared/instructions.rs b/cranelift/codegen/meta/src/shared/instructions.rs
index 9bc344eec..0666c2456 100644
--- a/cranelift/codegen/meta/src/shared/instructions.rs
+++ b/cranelift/codegen/meta/src/shared/instructions.rs
@@ -1147,6 +1147,123 @@ pub(crate) fn define(
.can... | 1 | 117 | 0 |
2180e9ce16052968893185bdc5515c7e69ea6ff6 | teapotd | 2020-03-31T14:22:08 | fuzzing: Enable NaN canonicalization (#1334)
* Method to enable NaN canonicalization in Config
* Use fuzz_default_config in DifferentialConfig
* Enable NaN canonicalization for fuzzing | diff --git a/crates/api/src/runtime.rs b/crates/api/src/runtime.rs
index 890848399..4f724875e 100644
--- a/crates/api/src/runtime.rs
+++ b/crates/api/src/runtime.rs
@@ -267,6 +267,22 @@ impl Config {
self
}
+ /// Configures whether Cranelift should perform a NaN-canonicalization pass.
+ ///
+ /... | 4 | 34 | 17 |
bc5568f4b3eb75ba2491608fb347974535b0fb19 | Alex Crichton | 2020-03-30T22:02:01 | Symbolize start trap traces (#1437)
Make sure we've registered the frame info early enough so traps during
instantiation give frames as well. | diff --git a/crates/api/src/instance.rs b/crates/api/src/instance.rs
index a1ff8a208..f7b6b76e0 100644
--- a/crates/api/src/instance.rs
+++ b/crates/api/src/instance.rs
@@ -123,6 +123,7 @@ impl Instance {
}
}
+ module.register_frame_info();
let config = store.engine().config();
... | 2 | 34 | 1 |
bc462404b39bf6847afa056f6e27457449eaca72 | bjorn3 | 2020-03-30T20:01:14 | [cranelift-frontend] Fix emit_zero for vectors (#1428)
* Fix emit_zero for vectors
* Add undef_vector_vars frontend test
* Remove unused import | diff --git a/cranelift/frontend/src/frontend.rs b/cranelift/frontend/src/frontend.rs
index 6234649e9..821385094 100644
--- a/cranelift/frontend/src/frontend.rs
+++ b/cranelift/frontend/src/frontend.rs
@@ -1229,6 +1229,53 @@ block0:
);
}
+ #[test]
+ fn undef_vector_vars() {
+ let mut sig = S... | 2 | 55 | 4 |
78772cf5e1d019d060d2a5427aa7058604f924e5 | Jakub Konka | 2020-03-28T16:11:32 | Generate trace logs in wiggle albeit behind a feature gate
This commit augments `wiggle` with trace log generation for the shims,
returned errno values, and returned values proper (if any, i.e.,
different than unit type `()`). What that means is that every syscall
will have auto-generated up to 3 traces, for instance,... | diff --git a/crates/wasi-common/Cargo.toml b/crates/wasi-common/Cargo.toml
index 5173face2..be3b13d0e 100644
--- a/crates/wasi-common/Cargo.toml
+++ b/crates/wasi-common/Cargo.toml
@@ -36,6 +36,11 @@ cpu-time = "1.0"
maintenance = { status = "actively-developed" }
[features]
+default = ["trace_log"]
+# This feature... | 4 | 82 | 231 |
1c339f35e7b8a38b36d99643b12a6b3708553184 | Andrew Brown | 2020-03-23T21:59:04 | Make rodata test framework more robust
Previously `test rodata` would cause failures when compiling Cranelift IR that had assertions about the current sink offset (e.g. multiple blocks, see `emit_function` in `binemit/mod.rs`). | diff --git a/cranelift/filetests/src/test_rodata.rs b/cranelift/filetests/src/test_rodata.rs
index 4254d9939..3dabc86e0 100644
--- a/cranelift/filetests/src/test_rodata.rs
+++ b/cranelift/filetests/src/test_rodata.rs
@@ -52,10 +52,7 @@ impl SubTest for TestRodata {
);
// Verify that the returned cod... | 1 | 14 | 8 |
08e5484cdb158b7795587ff7ad0cb04beef6dcd3 | Andrew Brown | 2020-03-28T01:00:16 | Enable Wasm spec tests for SIMD load_splat (#1426) | diff --git a/build.rs b/build.rs
index 95a7a3d78..498c3ac2f 100644
--- a/build.rs
+++ b/build.rs
@@ -189,7 +189,6 @@ fn ignore(testsuite: &str, testname: &str, strategy: &str) -> bool {
("simd", "simd_lane") => return true, // FIXME invalid u8 number: constant out of range: (v8x16.shuffle -1 0 1 2 3 4 5 6 ... | 1 | 0 | 1 |
27bf044ca282abf9814e5519f0ed15b84dcc32eb | Yury Delendik | 2020-03-26T17:25:26 | Fix debug asserts for dwarf transform (#1413)
* Fix debug asserts for dwarf transform
* feedback | diff --git a/crates/debug/src/transform/address_transform.rs b/crates/debug/src/transform/address_transform.rs
index bd49358ee..c89c9ea92 100644
--- a/crates/debug/src/transform/address_transform.rs
+++ b/crates/debug/src/transform/address_transform.rs
@@ -357,6 +357,7 @@ pub struct TransformRangeIter<'a> {
end_it... | 1 | 9 | 4 |
e0dff02c9e098a6dfa58750ff14971db47364acb | Alex Crichton | 2020-03-25T21:12:19 | Expand the C API slightly (#1404)
* Expand the C API slightly
Fill out missing `wasm_{memory,table}_type` APIs and don't panic on the
`wasm_externtype_as_*type_const` APIs and opt for returning a null
pointer instead.
* Update crates/c-api/src/lib.rs
Co-Authored-By: Yury Delendik <ydelendik@mozilla.com>
... | diff --git a/crates/c-api/src/lib.rs b/crates/c-api/src/lib.rs
index 2cd1c06f8..e1af9ed20 100644
--- a/crates/c-api/src/lib.rs
+++ b/crates/c-api/src/lib.rs
@@ -1172,7 +1172,10 @@ pub unsafe extern "C" fn wasm_externtype_as_functype_const(
et: *const wasm_externtype_t,
) -> *const wasm_functype_t {
if let wa... | 1 | 39 | 8 |
f3bfa2aa23d336a453f9bfc79918a59d5c17583c | Yury Delendik | 2020-03-25T21:03:38 | Ignore DWARF expressions with wasm globals (#1405) | diff --git a/crates/debug/src/transform/expression.rs b/crates/debug/src/transform/expression.rs
index e6f64ee3c..581523f4a 100644
--- a/crates/debug/src/transform/expression.rs
+++ b/crates/debug/src/transform/expression.rs
@@ -327,7 +327,11 @@ where
// WebAssembly DWARF extension
pc.read_u8(... | 1 | 5 | 1 |
bc1a11435e2643e30a104d45429b01fcdeea72f4 | Pat Hickey | 2020-03-25T19:57:44 | wiggle: emit a metadata module containing witx document (#1387)
* wiggle: emit a metadata module containing witx document
* wiggle: put metadata module behind a wiggle_metadata feature
* wasi-common: add wiggle_metadata feature and optional witx dep
* refactor according to alex's advice
* wasi-common: make... | diff --git a/Cargo.lock b/Cargo.lock
index ab6376f1b..2adc4dc33 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2705,6 +2705,7 @@ name = "wiggle-runtime"
version = "0.1.0"
dependencies = [
"thiserror",
+ "witx",
]
[[package]]
diff --git a/crates/wasi-common/Cargo.toml b/crates/wasi-common/Cargo.toml
index a978e37c... | 11 | 67 | 4 |
5c4ea5b03a527d83e099e4d89ca308b223a7df4d | Yury Delendik | 2020-03-25T18:34:21 | Increase generated DWARF version to 4 | diff --git a/crates/debug/src/transform/mod.rs b/crates/debug/src/transform/mod.rs
index 1fc6cb4cc..621a18682 100644
--- a/crates/debug/src/transform/mod.rs
+++ b/crates/debug/src/transform/mod.rs
@@ -71,8 +71,7 @@ pub fn transform_dwarf(
let out_encoding = gimli::Encoding {
format: gimli::Format::Dwarf32... | 1 | 1 | 2 |
1f6890e07066036e4d0d753f03801bd4fbb9bd91 | Jakub Konka | 2020-03-25T13:00:52 | [wasi-common] Clean up the use of mutable Entry (#1395)
* Clean up the use of mutable Entry
Until now, several syscalls including `fd_pwrite` etc. were relying on
mutating `&mut Entry` by mutating its inner file handle. This is
unnecessary in almost all cases since all methods mutating `std::fs::File`
in Rust's ... | diff --git a/crates/wasi-common/src/entry.rs b/crates/wasi-common/src/entry.rs
index f4a7264f3..8bd5072ce 100644
--- a/crates/wasi-common/src/entry.rs
+++ b/crates/wasi-common/src/entry.rs
@@ -5,7 +5,7 @@ use crate::wasi::types::{Filetype, Rights};
use crate::wasi::{Errno, Result};
use std::marker::PhantomData;
use ... | 9 | 81 | 110 |
c241f18b8152e60a70717575aa58ce638b365a8f | Alex Crichton | 2020-03-24T22:37:32 | Use `Linker` in `*.wast` testing (#1391)
* Use `Linker` in `*.wast` testing
By default `Linker` disallows shadowing previously defined items, but it
looks like the `*.wast` test suites rely on this so this commit adds a
boolean flag to `Linker` as well indicating whether duplicates are
allowed.
* Review comme... | diff --git a/crates/api/src/externals.rs b/crates/api/src/externals.rs
index beb7ac5a2..dd4eed042 100644
--- a/crates/api/src/externals.rs
+++ b/crates/api/src/externals.rs
@@ -557,23 +557,24 @@ impl Table {
/// **unsafe** usages of `Memory`. Do not do these things!
///
/// ```rust
+/// # use anyhow::Result;
/// us... | 7 | 133 | 86 |
b214804850d5b726a91df8de18da1a54b679d288 | Benjamin Brittain | 2020-03-24T20:53:48 | Disable lowering thread priority on Fuchsia (#1394) | diff --git a/crates/environ/src/cache/worker.rs b/crates/environ/src/cache/worker.rs
index f17ffa410..b3df2802b 100644
--- a/crates/environ/src/cache/worker.rs
+++ b/crates/environ/src/cache/worker.rs
@@ -219,6 +219,15 @@ impl WorkerThread {
}
}
+ #[cfg(target_os = "fuchsia")]
+ fn lower_thread_pr... | 1 | 10 | 1 |
dcabb557761f508dbdd479ce4f122e72e40d9a09 | Nathan Froyd | 2020-03-24T13:46:25 | change Module::define_function to take TrapSink instances
Experience with the `define_function` API has shown that returning
borrowed slices of `TrapSite` is not ideal: the returned slice
represents a borrow on the entire `Module`, which makes calling back
into methods taking `&mut self` a bit tricky.
To eliminate th... | diff --git a/cranelift/faerie/src/backend.rs b/cranelift/faerie/src/backend.rs
index 87df38d89..91ffc265e 100644
--- a/cranelift/faerie/src/backend.rs
+++ b/cranelift/faerie/src/backend.rs
@@ -1,38 +1,25 @@
//! Defines `FaerieBackend`.
use crate::container;
-use crate::traps::{FaerieTrapManifest, FaerieTrapSink};
... | 11 | 97 | 272 |
ee4b5353f8547b059e2463403a32eccf5dbf955d | Benjamin Brittain | 2020-03-24T13:47:31 | bump winapi version to 0.3.8 (#1388) | diff --git a/crates/jit/Cargo.toml b/crates/jit/Cargo.toml
index 5f8e53819..48503fd76 100644
--- a/crates/jit/Cargo.toml
+++ b/crates/jit/Cargo.toml
@@ -30,7 +30,7 @@ cfg-if = "0.1.9"
log = "0.4"
[target.'cfg(target_os = "windows")'.dependencies]
-winapi = { version = "0.3.7", features = ["winnt", "impl-default"] }... | 1 | 1 | 1 |
021ebb3748b20a10af7098f8a058c3d1bb6d901d | Yury Delendik | 2020-03-23T21:36:29 | Refactor address_transform.rs to use less memory (#1260)
The crates/debug/src/transform/address_transform.rs is unoptimized in terms of data structures. This PR refactors this file to remove creation of intermediate in-heap structures, thus improves overall performance of the DWARF transformation.
* Reduce amount o... | diff --git a/crates/debug/src/transform/address_transform.rs b/crates/debug/src/transform/address_transform.rs
index 86fd0b631..bd49358ee 100644
--- a/crates/debug/src/transform/address_transform.rs
+++ b/crates/debug/src/transform/address_transform.rs
@@ -2,7 +2,6 @@ use crate::WasmFileInfo;
use gimli::write;
use mo... | 4 | 233 | 89 |
2fdc7f1a8ec84a2e75badb8c2ae6fbc115804a1b | Dan Gohman | 2020-03-20T18:08:38 | [wiggle] Don't make generated structs and unions `Copy`.
Some structs and unions are large enough that making them `Copy` isn't
ideal. wasi-common only needed `Copy` in a few places that were easy to
fix. `SubscriptionClock` is 32 bytes, so it's not a bad a idea to pass
it by reference anyway. | diff --git a/crates/wasi-common/src/clock.rs b/crates/wasi-common/src/clock.rs
index fdf9dd279..9536e5034 100644
--- a/crates/wasi-common/src/clock.rs
+++ b/crates/wasi-common/src/clock.rs
@@ -5,7 +5,7 @@ use std::time::SystemTime;
pub(crate) use sys::clock::*;
-pub(crate) fn to_relative_ns_delay(clock: Subscripti... | 5 | 5 | 5 |
d54611dac85bf052a060d4548e86c74bd35bc7b8 | bjorn3 | 2020-03-23T13:56:51 | Update object to 0.18 (#1381) | diff --git a/Cargo.lock b/Cargo.lock
index 39312b8c5..b5a81b037 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -528,7 +528,6 @@ version = "0.60.0"
dependencies = [
"cranelift-codegen",
"cranelift-module",
- "goblin",
"object",
"target-lexicon",
]
@@ -1369,18 +1368,15 @@ checksum = "17b02fc0ff9a9e4b35b3342880f48e... | 5 | 20 | 41 |
1d5a678124e0f035f7614cafe43066c834a5113b | Benjamin Bouvier | 2020-03-06T14:22:53 | Fixes #1240: Add a new accessor to indicate that an opcode requires spilling all registers; | diff --git a/cranelift/codegen/meta/src/cdsl/instructions.rs b/cranelift/codegen/meta/src/cdsl/instructions.rs
index d8d9c8146..6d4b6738d 100644
--- a/cranelift/codegen/meta/src/cdsl/instructions.rs
+++ b/cranelift/codegen/meta/src/cdsl/instructions.rs
@@ -134,6 +134,8 @@ pub(crate) struct InstructionContent {
pub... | 4 | 24 | 4 |
815e340f855612cbc005f160fb39a767f3531285 | Dan Gohman | 2020-03-20T23:33:19 | Add an `is_directory()` helper method. (#1373)
This allows `ctx` to avoid depending on wasi::FileType. | diff --git a/crates/wasi-common/src/ctx.rs b/crates/wasi-common/src/ctx.rs
index f3b38ed2e..d7e5ae5fc 100644
--- a/crates/wasi-common/src/ctx.rs
+++ b/crates/wasi-common/src/ctx.rs
@@ -351,7 +351,7 @@ impl WasiCtxBuilder {
}
}
Descriptor::VirtualFile(virt) => {
- ... | 2 | 5 | 1 |
ff18c5b05cebff095bb62e880fd276008ab50b06 | Dan Gohman | 2020-03-20T23:28:27 | [wasi-common] Fix a warning about unreachable code. (#1374)
`exit` doesn't return, so code after it is unreachable. | diff --git a/crates/wasi-common/src/snapshots/wasi_snapshot_preview1.rs b/crates/wasi-common/src/snapshots/wasi_snapshot_preview1.rs
index 5838a4325..04272926d 100644
--- a/crates/wasi-common/src/snapshots/wasi_snapshot_preview1.rs
+++ b/crates/wasi-common/src/snapshots/wasi_snapshot_preview1.rs
@@ -1288,7 +1288,6 @@ i... | 1 | 0 | 1 |
73fe49cd65f955d55f092db9a7ff2a3a93e62ccc | Pat Hickey | 2020-03-20T21:14:47 | wasi-common: update trait methods to take &GuestPtr args. | diff --git a/crates/wasi-common/src/snapshots/wasi_snapshot_preview1.rs b/crates/wasi-common/src/snapshots/wasi_snapshot_preview1.rs
index 60d788df1..5838a4325 100644
--- a/crates/wasi-common/src/snapshots/wasi_snapshot_preview1.rs
+++ b/crates/wasi-common/src/snapshots/wasi_snapshot_preview1.rs
@@ -14,11 +14,14 @@ use... | 1 | 18 | 11 |
0e72edb80e4e1f1611417ea542f4e1bfb2d4a661 | Pat Hickey | 2020-03-17T01:14:58 | wiggle-generate: always pass GuestPtr by reference
with the prev approach, it would be passed by reference sometimes
(e.g. when used as an Array argument) but by value most of the time.
this was inconsistient.
theres no need to pass the owned version, all operations are &self. | diff --git a/crates/wiggle/crates/generate/src/funcs.rs b/crates/wiggle/crates/generate/src/funcs.rs
index 6433f7712..2c82ba79e 100644
--- a/crates/wiggle/crates/generate/src/funcs.rs
+++ b/crates/wiggle/crates/generate/src/funcs.rs
@@ -2,6 +2,7 @@ use proc_macro2::TokenStream;
use quote::quote;
use crate::lifetime... | 6 | 44 | 25 |
2c52b3f1de0975e797af3f21ce48906ac5ae9229 | Pat Hickey | 2020-03-17T00:41:07 | wiggle-generate: BuiltinType::USize is a u32, not a usize | diff --git a/crates/wiggle/crates/generate/src/names.rs b/crates/wiggle/crates/generate/src/names.rs
index 75dd9b986..aa67364a0 100644
--- a/crates/wiggle/crates/generate/src/names.rs
+++ b/crates/wiggle/crates/generate/src/names.rs
@@ -38,7 +38,7 @@ impl Names {
BuiltinType::F32 => quote!(f32),
... | 1 | 1 | 1 |
a7e7863c471cd61bb5299c4dffa7fecf659d70fd | Pat Hickey | 2020-03-17T00:39:32 | wiggle-runtime: isize and usize do not have same repr in guest and host | diff --git a/crates/wiggle/crates/runtime/src/guest_type.rs b/crates/wiggle/crates/runtime/src/guest_type.rs
index 1a654da17..534eed548 100644
--- a/crates/wiggle/crates/runtime/src/guest_type.rs
+++ b/crates/wiggle/crates/runtime/src/guest_type.rs
@@ -108,9 +108,9 @@ macro_rules! primitives {
primitives! {
// ... | 1 | 2 | 2 |
fc4f96a73f0c0a1c4de34038de58688522403472 | Pat Hickey | 2020-03-17T00:28:39 | wiggle-generate: teach about anonymous array types | diff --git a/crates/wiggle/crates/generate/src/names.rs b/crates/wiggle/crates/generate/src/names.rs
index d545b3784..75dd9b986 100644
--- a/crates/wiggle/crates/generate/src/names.rs
+++ b/crates/wiggle/crates/generate/src/names.rs
@@ -66,7 +66,11 @@ impl Names {
let pointee_type = self.type_ref(&... | 1 | 5 | 1 |
c50c24e6995f4f5c911fafac093fb4fa3157dfce | Marcin Mielniczuk | 2020-03-20T18:59:16 | Path symlink follow (#1284)
* Fix the tests for correctly following symlinks.
* Correctly follow symlinks in path_link. | diff --git a/crates/test-programs/wasi-tests/src/bin/path_link.rs b/crates/test-programs/wasi-tests/src/bin/path_link.rs
index 3e005012f..eff44662f 100644
--- a/crates/test-programs/wasi-tests/src/bin/path_link.rs
+++ b/crates/test-programs/wasi-tests/src/bin/path_link.rs
@@ -152,26 +152,19 @@ unsafe fn test_path_link(... | 4 | 28 | 19 |
0a30fdf85f60a4b95d560e005538215f81f1d9b9 | Alex Crichton | 2020-03-20T15:37:29 | Add a safe method `GuestPtr::copy_from_slice` (#1367)
This commit adds a safe method to wiggle pointers to copy slices of data
from the host to the guest. | diff --git a/crates/wiggle/crates/runtime/src/error.rs b/crates/wiggle/crates/runtime/src/error.rs
index 8a163dbb6..a7bb43fa7 100644
--- a/crates/wiggle/crates/runtime/src/error.rs
+++ b/crates/wiggle/crates/runtime/src/error.rs
@@ -15,6 +15,8 @@ pub enum GuestError {
PtrNotAligned(Region, u32),
#[error("Poin... | 2 | 31 | 0 |
fe0dc508ac5e5b5852cdd5db44dd94e37a7a0d83 | Jakub Konka | 2020-03-20T14:35:45 | Allow for zero-length wiggle_runtime::Regions (#1366)
Previously, we'd be very strict and disallow zero-length `wiggle_runtime::Region`s
altogether (we'd actually panic which is even worse). However, we
should allow this noting that any zero-length `Region` never
overlaps since its length is, well, zero. Additional... | diff --git a/crates/wiggle/crates/runtime/src/region.rs b/crates/wiggle/crates/runtime/src/region.rs
index e1e6084dc..58555abcd 100644
--- a/crates/wiggle/crates/runtime/src/region.rs
+++ b/crates/wiggle/crates/runtime/src/region.rs
@@ -7,12 +7,16 @@ pub struct Region {
impl Region {
pub fn new(start: u32, len:... | 1 | 16 | 1 |
39ba281bc7ffd6a04fa9b73f89dd44fed1ecf250 | Alex Crichton | 2020-03-19T14:16:40 | Update some documentation on `Memory` (#1360)
* Update some documentation on `Memory`
Merged #1357 a bit too quickly before all feedback came in!
* More words about growth | diff --git a/crates/api/src/externals.rs b/crates/api/src/externals.rs
index 3390c74ca..beb7ac5a2 100644
--- a/crates/api/src/externals.rs
+++ b/crates/api/src/externals.rs
@@ -480,7 +480,7 @@ impl Table {
/// safe when working with `Memory`.
///
/// For safety purposes you can think of a `Memory` as a glorified
-//... | 1 | 36 | 6 |
33b4750a641113be8cdcfbd91b4be662f47137a7 | Marcin Mielniczuk | 2020-03-18T19:05:29 | Fix unnecessary structure name repetitions, as reported by clippy | diff --git a/crates/wasi-common/src/entry.rs b/crates/wasi-common/src/entry.rs
index 5b07667d1..69ffddef1 100644
--- a/crates/wasi-common/src/entry.rs
+++ b/crates/wasi-common/src/entry.rs
@@ -18,43 +18,43 @@ pub(crate) enum Descriptor {
impl From<OsHandle> for Descriptor {
fn from(handle: OsHandle) -> Self {
-... | 2 | 22 | 22 |
d2666b2f3b26ebbcb81ef00a0a7198d9dd88ff1b | Alex Crichton | 2020-03-18T19:39:55 | Expand `Memory` docs and add examples (#1357)
Try to thoroughly document unsafety of `Memory` and how it can be used
safely.
cc #1272 | diff --git a/crates/api/src/externals.rs b/crates/api/src/externals.rs
index fb5efa91c..3390c74ca 100644
--- a/crates/api/src/externals.rs
+++ b/crates/api/src/externals.rs
@@ -468,6 +468,159 @@ impl Table {
/// It is intended that `Memory` is safe to share between threads. At this time
/// this is not implemented in... | 1 | 217 | 0 |
5bd03d282fe3a930105380bd33e641235f782f23 | Alex Crichton | 2020-03-18T19:15:33 | Update a number of wasmtime's dependencies (#1355)
* Run `cargo update`
* Use `cargo outdated` to guide some manual version bumps | diff --git a/Cargo.lock b/Cargo.lock
index 3bd69f374..a896d1f28 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -15,11 +15,20 @@ dependencies = [
"const-random",
]
+[[package]]
+name = "ahash"
+version = "0.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0989268a37e128d4d7a8028f1c60... | 10 | 135 | 111 |
5f4d3f5cd97311810a2d2a11165b3e09f56e8411 | Nick Fitzgerald | 2020-03-18T17:46:27 | Update `arbitrary` and `libfuzzer` dependencies | diff --git a/Cargo.lock b/Cargo.lock
index b830a78b5..739307f53 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -41,9 +41,9 @@ checksum = "7825f6833612eb2414095684fcf6c635becf3ce97fe48cf6421321e93bfbd53c"
[[package]]
name = "arbitrary"
-version = "0.4.0"
+version = "0.4.1"
source = "registry+https://github.com/rust-la... | 3 | 6 | 6 |
e1d3930ce43358efa42d09287ba8063df5c8544b | Andrew Brown | 2020-03-09T19:15:19 | Add SIMD store_complex | diff --git a/cranelift/codegen/meta/src/isa/x86/encodings.rs b/cranelift/codegen/meta/src/isa/x86/encodings.rs
index b9baa874f..7397dc5e3 100644
--- a/cranelift/codegen/meta/src/isa/x86/encodings.rs
+++ b/cranelift/codegen/meta/src/isa/x86/encodings.rs
@@ -1594,6 +1594,7 @@ fn define_simd(
let sshr_imm = shared.by... | 1 | 19 | 0 |
368094a95b3ded7586bbc77156fbe6ff9f4413d2 | Andrew Brown | 2020-03-09T19:15:02 | Add SIMD load_complex | diff --git a/cranelift/codegen/meta/src/isa/x86/encodings.rs b/cranelift/codegen/meta/src/isa/x86/encodings.rs
index 946d7bc3f..b9baa874f 100644
--- a/cranelift/codegen/meta/src/isa/x86/encodings.rs
+++ b/cranelift/codegen/meta/src/isa/x86/encodings.rs
@@ -1582,6 +1582,7 @@ fn define_simd(
let imul = shared.by_nam... | 1 | 19 | 0 |
bda9d7cfa6dba501c096e63b4e302efd21ce38e3 | Andrew Brown | 2020-03-09T19:14:35 | Add SIMD copy_to_ssa | diff --git a/cranelift/codegen/meta/src/isa/x86/encodings.rs b/cranelift/codegen/meta/src/isa/x86/encodings.rs
index e496511e7..946d7bc3f 100644
--- a/cranelift/codegen/meta/src/isa/x86/encodings.rs
+++ b/cranelift/codegen/meta/src/isa/x86/encodings.rs
@@ -1566,6 +1566,7 @@ fn define_simd(
let bxor = shared.by_nam... | 1 | 4 | 0 |
4c3c717698b88c7085061f3b0bb3bed028f45d63 | Alex Crichton | 2020-03-17T20:33:54 | Update the `filecheck` dependency (#1348)
Removes an edge towards the `synstructure` dependency in our dependency
graph which, if removed entirely, is hoped to reduce build times locally
and on CI as you switch between `cargo build` and `cargo test` because
deep dependencies like `syn` won't have their features alt... | diff --git a/Cargo.lock b/Cargo.lock
index b830a78b5..3212364f7 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -857,28 +857,6 @@ dependencies = [
"thiserror",
]
-[[package]]
-name = "failure"
-version = "0.1.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f8273f13c977665c5db7eb2b99ae... | 4 | 6 | 29 |
d452e5097f497d61f6e32d941b3e822c26d84fd3 | Alex Crichton | 2020-03-17T20:08:35 | Build wasmtime-c-api differenty in run-examples (#1346)
* Build wasmtime-c-api differenty in run-examples
This tweaks how the wasmtime-c-api crate is built slightly, changing how
we invoke Cargo. Due to historical Cargo bugs this should help minimize
the number of rebuilds due to features since the feature select... | diff --git a/crates/misc/run-examples/src/main.rs b/crates/misc/run-examples/src/main.rs
index c01a58a99..6eec10f21 100644
--- a/crates/misc/run-examples/src/main.rs
+++ b/crates/misc/run-examples/src/main.rs
@@ -13,7 +13,9 @@ fn main() {
.collect::<BTreeSet<_>>();
println!("======== Building libwasmtim... | 1 | 3 | 1 |
af709ded948faac0e4973abe206140adb8bf9f96 | Nathan Froyd | 2020-03-17T19:29:20 | bump cranelift version to 0.60.0 (#1328) | diff --git a/Cargo.lock b/Cargo.lock
index 5323dedf7..b830a78b5 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -404,7 +404,7 @@ dependencies = [
[[package]]
name = "cranelift"
-version = "0.59.0"
+version = "0.60.0"
dependencies = [
"cranelift-codegen",
"cranelift-frontend",
@@ -412,14 +412,14 @@ dependencies = [... | 22 | 95 | 95 |
210bfddfa9070643f83b8dcc747d3d2e2710b79b | Alex Crichton | 2020-03-17T19:01:11 | Fix unused imports in oracles | diff --git a/crates/fuzzing/src/oracles.rs b/crates/fuzzing/src/oracles.rs
index 4a9955e10..ebee9cc43 100644
--- a/crates/fuzzing/src/oracles.rs
+++ b/crates/fuzzing/src/oracles.rs
@@ -12,8 +12,7 @@
pub mod dummy;
-use dummy::{dummy_imports, dummy_values};
-use std::collections::{HashMap, HashSet};
+use dummy::dum... | 1 | 58 | 56 |
a2d388b5931edef0f3e95b163d590e25a8f042e4 | Andrew Brown | 2020-03-09T18:25:29 | Fix types of SIMD or, xor, and
The operands of these bitwise instructions could have different types and still be valid Wasm (i.e. `v128`). Because of this, we must tell Cranelift to cast both operands to the same type--the default type, in this case. This undoes the work merged in https://github.com/bytecodealliance/... | diff --git a/cranelift/wasm/src/code_translator.rs b/cranelift/wasm/src/code_translator.rs
index 06fc5126c..ddc19a9b0 100644
--- a/cranelift/wasm/src/code_translator.rs
+++ b/cranelift/wasm/src/code_translator.rs
@@ -864,15 +864,15 @@ pub fn translate_operator<FE: FuncEnvironment + ?Sized>(
let (arg1, arg2... | 1 | 15 | 3 |
ebaf95e50735961530628825a4bf21f6722f033d | Andrew Brown | 2020-03-09T18:16:05 | Fix types of i8x16 and i16x8 replace_lane
Because the smallest Wasm scalar type is i32, users of the `i8x16.replace_lane` and `i16x8.replace_lane` instructions will only be able to pass `i32` values as operands. These values must be reduced by dropping the upper bits (see https://github.com/WebAssembly/simd/blob/maste... | diff --git a/cranelift/wasm/src/code_translator.rs b/cranelift/wasm/src/code_translator.rs
index 2c237e740..06fc5126c 100644
--- a/cranelift/wasm/src/code_translator.rs
+++ b/cranelift/wasm/src/code_translator.rs
@@ -1249,23 +1249,20 @@ pub fn translate_operator<FE: FuncEnvironment + ?Sized>(
let vector = ... | 1 | 10 | 13 |
ffa467a0d0d184d1ff61e34f663d7dfbc75ae1aa | Andrew Brown | 2020-03-07T03:12:43 | Translate Wasm's f32x4.convert_i32x4s to Cranelift's fcvt_from_sint | diff --git a/cranelift/wasm/src/code_translator.rs b/cranelift/wasm/src/code_translator.rs
index 4e64b539e..b20d3091e 100644
--- a/cranelift/wasm/src/code_translator.rs
+++ b/cranelift/wasm/src/code_translator.rs
@@ -1467,6 +1467,10 @@ pub fn translate_operator<FE: FuncEnvironment + ?Sized>(
let a = pop1_w... | 1 | 4 | 1 |
5f47068eb131f1fa4f3886c30b2247fdf2b72967 | Alex Crichton | 2020-03-17T16:51:51 | take ttf in differential | diff --git a/crates/fuzzing/src/oracles.rs b/crates/fuzzing/src/oracles.rs
index c79bdba7c..4a9955e10 100644
--- a/crates/fuzzing/src/oracles.rs
+++ b/crates/fuzzing/src/oracles.rs
@@ -109,7 +109,11 @@ pub fn compile(wasm: &[u8], strategy: Strategy) {
/// exports. Modulo OOM, non-canonical NaNs, and usage of Wasm feat... | 2 | 8 | 4 |
b4562c62e3cf8ed6a0b65b2276a74d59a1650964 | bjorn3 | 2020-03-16T10:21:18 | Add support for hidden visibility | diff --git a/cranelift/faerie/src/backend.rs b/cranelift/faerie/src/backend.rs
index 251889397..b882120cb 100644
--- a/cranelift/faerie/src/backend.rs
+++ b/cranelift/faerie/src/backend.rs
@@ -383,8 +383,9 @@ fn translate_function_linkage(linkage: Linkage) -> faerie::Decl {
match linkage {
Linkage::Import... | 3 | 26 | 7 |
2f6172732ffb63e608ea7089a4b1207b89b0b9ca | Pat Hickey | 2020-03-13T22:30:39 | wasmtime-cli, obj, debug: upgrade to faerie 0.15
eliminating the faerie 0.14 dep | diff --git a/Cargo.lock b/Cargo.lock
index f1a8cdf26..5323dedf7 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -461,7 +461,7 @@ dependencies = [
"anyhow",
"cranelift-codegen",
"cranelift-module",
- "faerie 0.15.0",
+ "faerie",
"goblin",
"target-lexicon",
]
@@ -842,22 +842,6 @@ dependencies = [
name = "example-... | 5 | 9 | 24 |
2b87db3f55018738402058c3111ed6a965cb49c3 | Pat Hickey | 2020-03-13T18:52:40 | cranelift-faerie: upgrade to faerie 0.15.0, fix error reporting
the `FaerieProduct` exposes faerie-specific types, so we can give
the `faerie::ArtifactError` on those methods.
`ModuleError::Backend` now expects an `anyhow::Error`, so we change
a .to_string into .into() and retain better error information. | diff --git a/Cargo.lock b/Cargo.lock
index 0b76c9ea6..f1a8cdf26 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -461,7 +461,7 @@ dependencies = [
"anyhow",
"cranelift-codegen",
"cranelift-module",
- "faerie",
+ "faerie 0.15.0",
"goblin",
"target-lexicon",
]
@@ -499,6 +499,7 @@ dependencies = [
name = "cranelift... | 3 | 29 | 13 |
fdfda89d5998b94715a2ef5d4f626c3fe896026e | Pat Hickey | 2020-03-13T18:34:21 | cranelift-module: make backend error an anyhow::Error
This allows us to retain richer information from backend errors.
We already have `anyhow` as a dep in several places in the wasmtime
tree, and in cranelift-faerie. faerie is the only user of this
variant.
Existing code that puts a String into the Backend error can... | diff --git a/cranelift/module/Cargo.toml b/cranelift/module/Cargo.toml
index 765179c64..423b2fdf8 100644
--- a/cranelift/module/Cargo.toml
+++ b/cranelift/module/Cargo.toml
@@ -16,6 +16,7 @@ cranelift-entity = { path = "../entity", version = "0.59.0" }
hashbrown = { version = "0.6", optional = true }
log = { version ... | 2 | 2 | 1 |
724169d4120c6eee5d33cf097c30939a6ee3e88c | Alex Crichton | 2020-03-17T14:27:41 | Remove cdylib/staticlib wasi-common crate types (#1321)
I don't think these are used right now and can lead to increased build
times, so I'd like to propose we remove them! | diff --git a/crates/wasi-common/Cargo.toml b/crates/wasi-common/Cargo.toml
index 36c7017cb..073bb7d72 100644
--- a/crates/wasi-common/Cargo.toml
+++ b/crates/wasi-common/Cargo.toml
@@ -30,9 +30,5 @@ winx = { path = "winx", version = "0.12.0" }
winapi = "0.3"
cpu-time = "1.0"
-[lib]
-name = "wasi_common"
-crate-type... | 1 | 0 | 4 |
3accccd5f73400c78dcafc45dd0329e9fa63529d | Nick Fitzgerald | 2020-03-16T23:21:45 | fuzzing: Enable Cranelift's IR verifier for differential fuzzing | diff --git a/crates/fuzzing/src/generators.rs b/crates/fuzzing/src/generators.rs
index b096467ca..b2504fc3e 100644
--- a/crates/fuzzing/src/generators.rs
+++ b/crates/fuzzing/src/generators.rs
@@ -64,6 +64,7 @@ impl DifferentialConfig {
/// Convert this differential fuzzing config into a `wasmtime::Config`.
p... | 1 | 1 | 0 |
66aec23a0bb45a0bbe53eb7e9f722fd691af483e | Samrat Man Singh | 2020-03-14T12:56:38 | Fix typo in comment (#1324) | diff --git a/cranelift/reader/src/lexer.rs b/cranelift/reader/src/lexer.rs
index 1d2908a92..314c1bcf1 100644
--- a/cranelift/reader/src/lexer.rs
+++ b/cranelift/reader/src/lexer.rs
@@ -267,7 +267,7 @@ impl<'a> Lexer<'a> {
Some('+') => {
self.next_ch();
if !self.looking_at_... | 1 | 1 | 1 |
65e32b3660372a1173a0f80f18446ed4e80584cf | Alex Crichton | 2020-03-13T22:51:10 | Store module name on `wasmtime_environ::Module` (#1309)
* Store module name on `wasmtime_environ::Module`
This keeps all name information in one place so we dont' have to keep
extra structures around in `wasmtime::Module`.
* rustfmt | diff --git a/cranelift/wasm/src/environ/dummy.rs b/cranelift/wasm/src/environ/dummy.rs
index 6c94116e0..cf8b997c8 100644
--- a/cranelift/wasm/src/environ/dummy.rs
+++ b/cranelift/wasm/src/environ/dummy.rs
@@ -128,6 +128,9 @@ pub struct DummyEnvironment {
/// Instructs to collect debug data during translation.
... | 8 | 47 | 47 |
922b49744b7b378f609cbf467c60508f73cd8128 | Alex Crichton | 2020-03-13T22:50:00 | Remove no-longer-needed wasm-webidl-bindings dep (#1316)
Forgotten from previous interface types removal! | diff --git a/Cargo.lock b/Cargo.lock
index 7229a7389..0b76c9ea6 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -616,7 +616,7 @@ dependencies = [
"serde",
"target-lexicon",
"thiserror",
- "wasmparser 0.51.2",
+ "wasmparser",
"wat",
]
@@ -1053,12 +1053,6 @@ dependencies = [
"quick-error",
]
-[[package]]
-nam... | 2 | 9 | 61 |
5024d7bf09e484410a94e29b2f6b2a17de027a16 | Jakub Konka | 2020-03-13T19:27:34 | [wiggle] Impl different formatters for flags (#1299)
* Impl different formatters for flags
Rather than forcing only binary formatting of flags types, how about
we implement all relevant traits (`Binary`, `Octal`, `LowerHex`, and
`UpperHex`) and allow the user to pick the most relevant one for their
use case?
... | diff --git a/crates/wiggle/crates/generate/src/types/flags.rs b/crates/wiggle/crates/generate/src/types/flags.rs
index 60aa67131..b0ba9c86a 100644
--- a/crates/wiggle/crates/generate/src/types/flags.rs
+++ b/crates/wiggle/crates/generate/src/types/flags.rs
@@ -13,20 +13,17 @@ pub(super) fn define_flags(names: &Names, n... | 2 | 46 | 14 |
7ed829fe82d40896d9b20d731e4ea48ce568014f | Pat Hickey | 2020-03-12T21:42:24 | missed versions and fields in wiggle cargo.toml | diff --git a/crates/wiggle/Cargo.toml b/crates/wiggle/Cargo.toml
index c437bf494..e06f92639 100644
--- a/crates/wiggle/Cargo.toml
+++ b/crates/wiggle/Cargo.toml
@@ -4,16 +4,22 @@ version = "0.1.0"
authors = ["Pat Hickey <phickey@fastly.com>", "Jakub Konka <kubkonk@jakubkonka.com>", "Alex Crichton <alex@alexcrichton.co... | 1 | 9 | 3 |
950dc2fbc6e66314c8c780eb59d07984548fc65b | Alex Crichton | 2020-03-12T21:41:17 | Fill out API docs on `wasmtime::Module` (#1305)
* Fill out API docs on `wasmtime::Module`
Part of #1272
* Apply suggestions from code review
Co-Authored-By: Nick Fitzgerald <fitzgen@gmail.com>
Co-authored-by: Nick Fitzgerald <fitzgen@gmail.com> | diff --git a/crates/api/src/module.rs b/crates/api/src/module.rs
index 80c29d9d6..627559b4c 100644
--- a/crates/api/src/module.rs
+++ b/crates/api/src/module.rs
@@ -73,11 +73,63 @@ fn into_table_type(tt: wasmparser::TableType) -> TableType {
/// representation. Instead you'll need to create an
/// [`Instance`](crate:... | 1 | 243 | 0 |
c1ef0db027e4e782fe9e9bb611ebb49e5bb9e53d | Alex Crichton | 2020-03-12T18:29:42 | Ignore a test failing on CI (#1302)
This'll get fixed in #1298 but for now let's get CI working again | diff --git a/tests/cli_tests.rs b/tests/cli_tests.rs
index d13970504..86b3a7fda 100644
--- a/tests/cli_tests.rs
+++ b/tests/cli_tests.rs
@@ -84,6 +84,7 @@ fn run_wasmtime_simple_wat() -> Result<()> {
// Running a wat that traps.
#[test]
+#[ignore] // FIXME(#1298)
fn run_wasmtime_unreachable_wat() -> Result<()> {
... | 1 | 1 | 0 |
edb39fd4a3e59c3d70bb3fae826ca48b6ceaad64 | Pat Hickey | 2020-03-11T21:17:35 | wiggle: make paths relative to use site of macro
prior to this change, they were relative to CARGO_MANIFEST_DIR for the
wiggle-generate crate. | diff --git a/crates/wiggle/crates/generate/src/config.rs b/crates/wiggle/crates/generate/src/config.rs
index e61742193..0d4ada640 100644
--- a/crates/wiggle/crates/generate/src/config.rs
+++ b/crates/wiggle/crates/generate/src/config.rs
@@ -1,4 +1,4 @@
-use std::path::PathBuf;
+use std::path::{Path, PathBuf};
use pr... | 2 | 17 | 14 |
f76b36f73720508caa1a50ce4cf388b42855789a | Yury Delendik | 2020-03-11T15:22:51 | Write .debug_frame information (#53)
* Write .debug_frame information
* mv map_reg | diff --git a/cranelift/codegen/src/ir/framelayout.rs b/cranelift/codegen/src/ir/framelayout.rs
index 983b20927..f4cb5bb90 100644
--- a/cranelift/codegen/src/ir/framelayout.rs
+++ b/cranelift/codegen/src/ir/framelayout.rs
@@ -6,8 +6,12 @@ use std::boxed::Box;
use crate::HashMap;
+#[cfg(feature = "enable-serde")]
+u... | 16 | 403 | 112 |
2ead747f48b7b5117ef5a4877e7afe9bff4c1a10 | Nick Fitzgerald | 2020-03-11T13:02:19 | Enable bulk memory in the fuzzers (#1277) | diff --git a/crates/fuzzing/src/oracles.rs b/crates/fuzzing/src/oracles.rs
index 1b3bb05d9..3d7eb6eef 100644
--- a/crates/fuzzing/src/oracles.rs
+++ b/crates/fuzzing/src/oracles.rs
@@ -23,6 +23,7 @@ fn fuzz_default_config(strategy: Strategy) -> Config {
config
.cranelift_debug_verifier(true)
.was... | 1 | 1 | 0 |
cd484e49932d8dd8f1bd1a002e0717ad8bff07fb | Pat Hickey | 2020-03-10T21:48:57 | add a lifetime to the wiggle_runtime::GuestErrorType trait (#41)
* add a lifetime to the wiggle_runtime::GuestErrorType trait, wiggle_tests::WasiCtx struct
* wiggle-generate: make config parsing public so it can be reused in lucet | diff --git a/crates/generate/src/config.rs b/crates/generate/src/config.rs
index 9e7848e82..0941e7343 100644
--- a/crates/generate/src/config.rs
+++ b/crates/generate/src/config.rs
@@ -14,25 +14,32 @@ pub struct Config {
pub ctx: CtxConf,
}
-enum ConfigField {
+#[derive(Debug, Clone)]
+pub enum ConfigField {
... | 14 | 46 | 34 |
2139020d6dd1230868318013a352bc848c702f50 | Pat Hickey | 2020-03-10T19:33:02 | add manual interface for borrowing a GuestPtr (#40)
* add manual interface for borrowing a GuestPtr
* add manual borrow checking methods for slice and str as well
* update test to use borrow_slice | diff --git a/crates/runtime/src/borrow.rs b/crates/runtime/src/borrow.rs
index 5c3c80f42..8d5d81c01 100644
--- a/crates/runtime/src/borrow.rs
+++ b/crates/runtime/src/borrow.rs
@@ -1,5 +1,5 @@
use crate::region::Region;
-use crate::GuestError;
+use crate::{GuestError, GuestPtr, GuestType};
#[derive(Debug)]
pub str... | 2 | 43 | 6 |
67bfeea16f0d02efc6defe70436d769ade43158d | Nick Fitzgerald | 2020-03-10T16:28:00 | fuzzing: Limit the total number of API calls generated (#1265)
To avoid libfuzzer timeouts, limit the total number of API calls we generate in
the `api_calls` fuzz target. We were already limiting the number of exported
function calls we made, and this extends the limit to all API calls. | diff --git a/crates/fuzzing/src/generators/api.rs b/crates/fuzzing/src/generators/api.rs
index c26936502..e25319372 100644
--- a/crates/fuzzing/src/generators/api.rs
+++ b/crates/fuzzing/src/generators/api.rs
@@ -59,9 +59,6 @@ struct Scope {
/// The rough predicted maximum RSS of executing all of our generated API... | 1 | 8 | 12 |
674a6208d8d33878107b88ef14f77593b7bce29d | Nick Fitzgerald | 2020-03-10T14:30:11 | Implement `data.drop` and `memory.init` and get the rest of the bulk memory spec tests passing (#1264)
* Enable the already-passing `bulk-memoryoperations/imports.wast` test
* Implement support for the `memory.init` instruction and passive data
This adds support for passive data segments and the `memory.init` in... | diff --git a/build.rs b/build.rs
index f8a847abe..95a7a3d78 100644
--- a/build.rs
+++ b/build.rs
@@ -196,12 +196,6 @@ fn ignore(testsuite: &str, testname: &str, strategy: &str) -> bool {
("reference_types", "table_copy_on_imported_tables") => return false,
("reference_types", _) => return true... | 10 | 237 | 42 |
11510ec4269139cef6b3e51d27e78c82de3be7bb | Alex Crichton | 2020-03-10T14:28:31 | Disallow values to cross stores (#1016)
* Disallow values to cross stores
Lots of internals in the wasmtime-{jit,runtime} crates are highly
unsafe, so it's up to the `wasmtime` API crate to figure out how to make
it safe. One guarantee we need to provide is that values never cross
between stores. For example you... | diff --git a/crates/api/src/externals.rs b/crates/api/src/externals.rs
index 1735c10be..8e081cff4 100644
--- a/crates/api/src/externals.rs
+++ b/crates/api/src/externals.rs
@@ -110,6 +110,16 @@ impl Extern {
}
}
}
+
+ pub(crate) fn comes_from_same_store(&self, store: &Store) -> bool {
+ ... | 5 | 127 | 10 |
963bf0e2559177ffe1e6fc691144be6f70acd563 | Yury Delendik | 2020-03-09T18:44:16 | Export wasm_config_delete (and few more _delete) (#1262) | diff --git a/crates/c-api/src/lib.rs b/crates/c-api/src/lib.rs
index 52ec33af4..f9b52a62c 100644
--- a/crates/c-api/src/lib.rs
+++ b/crates/c-api/src/lib.rs
@@ -458,6 +458,11 @@ pub unsafe extern "C" fn wasm_engine_delete(engine: *mut wasm_engine_t) {
let _ = Box::from_raw(engine);
}
+#[no_mangle]
+pub unsafe e... | 1 | 20 | 0 |
ba1f10f4d4057518c08dad24776599a287b72a7f | Yury Delendik | 2020-03-09T17:25:38 | Removes panic! from the debug crate. (#1261) | diff --git a/crates/debug/src/read_debuginfo.rs b/crates/debug/src/read_debuginfo.rs
index 25b4e3fbc..014e81fd6 100644
--- a/crates/debug/src/read_debuginfo.rs
+++ b/crates/debug/src/read_debuginfo.rs
@@ -1,3 +1,4 @@
+use anyhow::{bail, Result};
use gimli::{
DebugAbbrev, DebugAddr, DebugInfo, DebugLine, DebugLine... | 9 | 96 | 96 |
061390ee1b1085a2191019d2219da730ec62485f | Jakub Konka | 2020-03-09T15:07:09 | [wasi-common]: move filetime module to yanix (#1255)
* Move filetime module to yanix
I've noticed that we could replace every occurrence of `crate::Result`
in `filetime` mods with `io::Result`, so I thought why not move it
to `yanix` and get rid off a lot of unnecessary code duplication
within `wasi-common`. Now... | diff --git a/Cargo.lock b/Cargo.lock
index 8f99fb159..0141c8afc 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2605,6 +2605,7 @@ version = "0.12.0"
dependencies = [
"bitflags",
"cfg-if",
+ "filetime",
"libc",
"log",
]
diff --git a/crates/wasi-common/src/old/snapshot_0/sys/unix/bsd/filetime.rs b/crates/wasi-comm... | 26 | 73 | 429 |
e5b9f1b78648bc886033481030e0fc680a7d71da | Jakub Konka | 2020-03-09T09:32:01 | [wasi-common]: winx now returns io::Error directly (#1243)
* Winx now returns io::Error
This commit is a spiritual follower of #1242 in the sense that it
adjusts `winx` to also return `io::Error` directly rather than
tossing a custom error type here and there.
* Adapt wasi-common to changes in winx
* Run ca... | diff --git a/crates/wasi-common/src/old/snapshot_0/sys/windows/host_impl.rs b/crates/wasi-common/src/old/snapshot_0/sys/windows/host_impl.rs
index 5fcebb052..036c5010e 100644
--- a/crates/wasi-common/src/old/snapshot_0/sys/windows/host_impl.rs
+++ b/crates/wasi-common/src/old/snapshot_0/sys/windows/host_impl.rs
@@ -12,... | 10 | 277 | 446 |
06bcac3e43c63d81e5993de604568dfa45eb80a5 | Pat Hickey | 2020-03-07T01:45:09 | Allow creation of GuestPtr<[T]> from GuestPtr<T> and length (#39)
* add GuestPtr::as_array method
* wasi test: show with type signatures we have achieved the desired api | diff --git a/crates/runtime/src/lib.rs b/crates/runtime/src/lib.rs
index a101a19a1..a7f890ca5 100644
--- a/crates/runtime/src/lib.rs
+++ b/crates/runtime/src/lib.rs
@@ -306,7 +306,7 @@ impl<'a, T: ?Sized + Pointee> GuestPtr<'a, T> {
T::read(self)
}
- /// Safely write a valud to this pointer.
+ ///... | 2 | 30 | 3 |
6e3ec6a96dc8d6f0e7458bcf20d15c7c65756a96 | Pat Hickey | 2020-03-07T00:55:05 | Minor refactors to make wiggle-generate reusable externally (#34)
* wiggle-generate: pass witx doc in explicitly
* wiggle-generate: Names takes &Config, minor refactor for reuse | diff --git a/Cargo.toml b/Cargo.toml
index 2c6400e24..1d65785e3 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -9,6 +9,7 @@ proc-macro = true
[dependencies]
wiggle-generate = { path = "crates/generate" }
+witx = "0.8.3"
syn = { version = "1.0", features = ["full"] }
[dev-dependencies]
diff --git a/crates/generate/... | 5 | 20 | 22 |
428449133943213f2edc58ec161efcbb23d0eebd | Andrew Brown | 2020-03-06T19:43:21 | Translate Wasm swizzle to Cranelift swizzle | diff --git a/cranelift/wasm/src/code_translator.rs b/cranelift/wasm/src/code_translator.rs
index e11c20a70..3cc15ea62 100644
--- a/cranelift/wasm/src/code_translator.rs
+++ b/cranelift/wasm/src/code_translator.rs
@@ -1264,6 +1264,10 @@ pub fn translate_operator<FE: FuncEnvironment + ?Sized>(
// to WASM usi... | 1 | 4 | 1 |
442edf5c843de0abbc77bf4f5d3364ecf3ba80cd | Andrew Brown | 2020-03-05T23:02:32 | Refactor SIMD legalizations to separate define* function
See https://github.com/bytecodealliance/wasmtime/issues/1168 | diff --git a/cranelift/codegen/meta/src/isa/x86/legalize.rs b/cranelift/codegen/meta/src/isa/x86/legalize.rs
index de748a0ba..4a10c64ed 100644
--- a/cranelift/codegen/meta/src/isa/x86/legalize.rs
+++ b/cranelift/codegen/meta/src/isa/x86/legalize.rs
@@ -21,71 +21,35 @@ pub(crate) fn define(shared: &mut SharedDefinitions... | 1 | 100 | 68 |
6e0401b83acb0625ff697775f29a5438f1424832 | Andrew Brown | 2020-03-05T22:35:28 | Refactor SIMD lane instructions to separate define* function | diff --git a/cranelift/codegen/meta/src/shared/instructions.rs b/cranelift/codegen/meta/src/shared/instructions.rs
index 3e74da1b0..6fd7db155 100644
--- a/cranelift/codegen/meta/src/shared/instructions.rs
+++ b/cranelift/codegen/meta/src/shared/instructions.rs
@@ -481,6 +481,82 @@ fn define_control_flow(
);
}
+... | 1 | 77 | 55 |
7d5075a649dd9cbc790bab8b186f60b69ea853a5 | Andrew Brown | 2020-02-14T21:24:13 | Rename RexRecipeKind to RecipePrefixKind | diff --git a/cranelift/codegen/meta/src/isa/x86/recipes.rs b/cranelift/codegen/meta/src/isa/x86/recipes.rs
index 0c0d04f0a..b9023838b 100644
--- a/cranelift/codegen/meta/src/isa/x86/recipes.rs
+++ b/cranelift/codegen/meta/src/isa/x86/recipes.rs
@@ -162,9 +162,9 @@ fn replace_evex_constraints(
.collect()
}
-... | 1 | 21 | 21 |
2216f90916db439019fb23885ba49998f5dc1acd | Andrew Brown | 2020-02-14T21:24:13 | Add an EVEX recipe (and associated recipe infrastructure) for encoding a binary operation | diff --git a/cranelift/codegen/meta/src/isa/x86/recipes.rs b/cranelift/codegen/meta/src/isa/x86/recipes.rs
index 4bab09c30..0c0d04f0a 100644
--- a/cranelift/codegen/meta/src/isa/x86/recipes.rs
+++ b/cranelift/codegen/meta/src/isa/x86/recipes.rs
@@ -142,6 +142,26 @@ fn replace_nonrex_constraints(
.collect()
}
... | 1 | 57 | 5 |
965714d67597b6767b4bc1c03c46e597d3ef2a7f | Andrew Brown | 2020-02-14T21:24:13 | Add encoding functions for emitting EVEX formats
Only the `reg, vvvv, rm` form is currently supported but it should not be difficult to add more forms. | diff --git a/cranelift/codegen/src/isa/x86/binemit.rs b/cranelift/codegen/src/isa/x86/binemit.rs
index 15defe69e..615af4766 100644
--- a/cranelift/codegen/src/isa/x86/binemit.rs
+++ b/cranelift/codegen/src/isa/x86/binemit.rs
@@ -10,7 +10,6 @@ use crate::ir::{
};
use crate::isa::{RegUnit, StackBase, StackBaseMask, Sta... | 1 | 156 | 1 |
079fcafcb1b2d4bbfddd26b201d9df38012dbd25 | Andrew Brown | 2020-02-14T21:24:13 | Expand x86 registers to include 32 XMM registers
The EVEX encoding format (e.g. in AVX-512) allows addressing 32 registers instead of 16. The FPR register class currently defines 16 registers, `%xmm0`-`%xmm15`; that class is kept as-is with this change. A larger class, FPR32, is added as a super-class of FPR using a l... | diff --git a/cranelift/codegen/meta/src/isa/x86/registers.rs b/cranelift/codegen/meta/src/isa/x86/registers.rs
index 5c31401a3..ca244b744 100644
--- a/cranelift/codegen/meta/src/isa/x86/registers.rs
+++ b/cranelift/codegen/meta/src/isa/x86/registers.rs
@@ -3,6 +3,11 @@ use crate::cdsl::regs::{IsaRegs, IsaRegsBuilder, R... | 2 | 57 | 33 |
1d150543102ac6188c9154c7bea425b152155453 | Andrew Brown | 2020-03-03T18:06:51 | Remove the debug crate's hard-coded dependency on register ordering | diff --git a/cranelift/codegen/src/isa/mod.rs b/cranelift/codegen/src/isa/mod.rs
index 590f59a29..b74cf9f41 100644
--- a/cranelift/codegen/src/isa/mod.rs
+++ b/cranelift/codegen/src/isa/mod.rs
@@ -64,6 +64,7 @@ use crate::timing;
use alloc::borrow::Cow;
use alloc::boxed::Box;
use core::fmt;
+use core::fmt::{Debug, F... | 10 | 133 | 82 |
3f53bcb7404d3a276e10f697e5f904057aceaed9 | Andrew Brown | 2020-02-14T21:24:13 | Remove dependency on hard-coded ordering of x86 register banks
With this change, register banks can now be re-ordered and other components (e.g. unwinding, regalloc) will no longer break. The previous behavior assumed that GPR registers always started at `RegUnit` 0. | diff --git a/cranelift/codegen/meta/src/gen_registers.rs b/cranelift/codegen/meta/src/gen_registers.rs
index fbb61beb3..bd5ac95ae 100644
--- a/cranelift/codegen/meta/src/gen_registers.rs
+++ b/cranelift/codegen/meta/src/gen_registers.rs
@@ -57,7 +57,13 @@ fn gen_regclass(isa: &TargetIsa, reg_class: &RegClass, fmt: &mut... | 3 | 27 | 6 |
518c7526d24ed061bc6c505d55f5fb275bec462b | Andrew Brown | 2020-02-14T21:24:13 | Fix incorrect register calculation in `RegBank::unit_by_name` | diff --git a/cranelift/codegen/meta/src/cdsl/regs.rs b/cranelift/codegen/meta/src/cdsl/regs.rs
index 98a5751f2..864826ee4 100644
--- a/cranelift/codegen/meta/src/cdsl/regs.rs
+++ b/cranelift/codegen/meta/src/cdsl/regs.rs
@@ -57,12 +57,12 @@ impl RegBank {
// Ultimate try: try to parse a number and use ... | 1 | 2 | 2 |
2c416484710ae64b7237597dbf6a321b5ca4662c | Andrew Brown | 2020-02-14T21:24:13 | Wire up AVX-related settings with runtime detection in cranelift-native | diff --git a/cranelift/native/src/lib.rs b/cranelift/native/src/lib.rs
index 9ad873e16..b45dab8dd 100644
--- a/cranelift/native/src/lib.rs
+++ b/cranelift/native/src/lib.rs
@@ -82,6 +82,15 @@ fn parse_x86_cpuid(isa_builder: &mut isa::Builder) -> Result<(), &'static str> {
if info.has_bmi2() {
isa_... | 1 | 9 | 0 |
baf71f5a5f96f7c8adec249222ca8c52ac69aefb | Andrew Brown | 2020-02-14T21:24:13 | Add AVX-related settings
Many more settings are possible but this subset is required in order to distinguish instructions that can use EVEX encodings. | diff --git a/cranelift/codegen/meta/src/isa/x86/settings.rs b/cranelift/codegen/meta/src/isa/x86/settings.rs
index e39384a5c..d94e02327 100644
--- a/cranelift/codegen/meta/src/isa/x86/settings.rs
+++ b/cranelift/codegen/meta/src/isa/x86/settings.rs
@@ -8,8 +8,19 @@ pub(crate) fn define(shared: &SettingGroup) -> Setting... | 1 | 23 | 1 |
92a6636b6d7428e6931f11f516ef4d18098a95f5 | Alex Crichton | 2020-03-05T16:25:04 | Add more thorough safety documentation to types | diff --git a/crates/runtime/src/guest_type.rs b/crates/runtime/src/guest_type.rs
index b23830d06..c7517bf0e 100644
--- a/crates/runtime/src/guest_type.rs
+++ b/crates/runtime/src/guest_type.rs
@@ -7,10 +7,36 @@ pub trait GuestErrorType {
fn from_error(e: GuestError, ctx: &Self::Context) -> Self;
}
+/// A trait ... | 2 | 290 | 7 |
2bb309634217268c16e5558319d9b7b78e78c61e | Nathan Froyd | 2020-03-05T15:07:01 | change interfaces to use slices instead of `Vec` | diff --git a/cranelift/faerie/src/backend.rs b/cranelift/faerie/src/backend.rs
index 2520515cd..251889397 100644
--- a/cranelift/faerie/src/backend.rs
+++ b/cranelift/faerie/src/backend.rs
@@ -152,11 +152,11 @@ impl Backend for FaerieBackend {
ctx: &cranelift_codegen::Context,
namespace: &ModuleNamesp... | 6 | 18 | 18 |
4aa8776a9bb47f5ac9c1ab2f7201ebe815ecc8e3 | Ryan Hunt | 2020-03-03T19:34:04 | Skip non-branching blocks now that we're using basic blocks
This is a rebase of [1]. In the long term, we'll want to simplify these
analysis passes. For now, this is simple and will reduce the number of
instructions processed in certain cases.
[1] https://github.com/bytecodealliance/cranelift/pull/866 | diff --git a/cranelift/codegen/src/cfg_printer.rs b/cranelift/codegen/src/cfg_printer.rs
index 364b2985f..4ceae473b 100644
--- a/cranelift/codegen/src/cfg_printer.rs
+++ b/cranelift/codegen/src/cfg_printer.rs
@@ -53,7 +53,7 @@ impl<'a> CFGPrinter<'a> {
write!(w, " {} [shape=record, label=\"{{", block)?;... | 4 | 21 | 3 |
d5c0f6bff8a2f96f8c1b55f2e079dceba95e0c1e | Yury Delendik | 2020-03-04T19:31:14 | Fix infinite loop in DWARF address transform algorithm (#1228) | diff --git a/crates/debug/src/transform/address_transform.rs b/crates/debug/src/transform/address_transform.rs
index 9a68e7dee..86fd0b631 100644
--- a/crates/debug/src/transform/address_transform.rs
+++ b/crates/debug/src/transform/address_transform.rs
@@ -303,10 +303,10 @@ impl<'a> Iterator for TransformRangeEndIter<'... | 1 | 1 | 1 |
84bcbd4650f5939d9143529b2b3986b42870e22e | Alex Crichton | 2020-03-04T18:37:10 | Fix some tests | diff --git a/crates/test/src/lib.rs b/crates/test/src/lib.rs
index 281ceb826..c946df73b 100644
--- a/crates/test/src/lib.rs
+++ b/crates/test/src/lib.rs
@@ -92,10 +92,10 @@ mod test {
use super::*;
#[test]
fn hostmemory_is_aligned() {
- let mut h = HostMemory::new();
- assert_eq!(h.buffer.a... | 1 | 4 | 4 |
8cee5475197cf917b6490be81c0f23e4baf2a33d | Alex Crichton | 2020-03-04T18:36:26 | Run rustfmt | diff --git a/crates/generate/src/types/mod.rs b/crates/generate/src/types/mod.rs
index 07c748b1d..93e7d5f89 100644
--- a/crates/generate/src/types/mod.rs
+++ b/crates/generate/src/types/mod.rs
@@ -22,12 +22,9 @@ pub fn define_datatype(names: &Names, namedtype: &witx::NamedType) -> TokenStrea
witx::Type::Un... | 6 | 26 | 23 |
8acfdbdd8aa550d1b84e0ce1e6222a6605d14e38 | Maciej Woś | 2020-03-04T04:58:11 | add more wrappers and getters (#1222) | diff --git a/crates/api/src/func.rs b/crates/api/src/func.rs
index de0255fef..9e09c7070 100644
--- a/crates/api/src/func.rs
+++ b/crates/api/src/func.rs
@@ -264,6 +264,36 @@ impl Func {
///
/// For more information about this function, see [`Func::wrap1`].
(wrap10, A1, A2, A3, A4, A5, A6, A7,... | 1 | 60 | 0 |
07f335dca6a50cd8f7bcb850d3a5681755f08261 | Ryan Hunt | 2020-03-03T19:17:30 | Rename 'an block' to 'a block'
Missed this in the automatic rename of 'Ebb' to 'Block'. | diff --git a/cranelift/codegen/src/binemit/memorysink.rs b/cranelift/codegen/src/binemit/memorysink.rs
index 60c7fe251..a9d386d2c 100644
--- a/cranelift/codegen/src/binemit/memorysink.rs
+++ b/cranelift/codegen/src/binemit/memorysink.rs
@@ -74,7 +74,7 @@ impl<'a> MemoryCodeSink<'a> {
/// A trait for receiving reloca... | 31 | 96 | 96 |
37642042503384a3553451477ca69f4e4b903068 | Jakub Konka | 2020-03-03T14:25:11 | Put context object behind a ref rather than mut ref
This commit puts context object, i.e., the implementor of the
WASI snapshot, behind a reference `&self` rather than a mutable
reference `&mut self`. As suggested by @alexcrichton, this gives
the implementor the possibility to determine how it handles its
interior mut... | diff --git a/crates/generate/src/module_trait.rs b/crates/generate/src/module_trait.rs
index 7fc1f46cd..96515499f 100644
--- a/crates/generate/src/module_trait.rs
+++ b/crates/generate/src/module_trait.rs
@@ -39,9 +39,9 @@ pub fn define_module_trait(names: &Names, m: &Module) -> TokenStream {
.unwrap_or(qu... | 13 | 74 | 78 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.