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
d5fb4825240cdbd0b630477ccdbde0b830e1d92e
m4b
2019-11-06T05:33:30
build: update everything to target-lexicon 0.9;
diff --git a/cranelift/Cargo.toml b/cranelift/Cargo.toml index 5df578aa2..fb3606c09 100644 --- a/cranelift/Cargo.toml +++ b/cranelift/Cargo.toml @@ -39,7 +39,7 @@ serde = "1.0.8" term = "0.6.1" capstone = { version = "0.6.0", optional = true } wabt = { version = "0.9.1", optional = true } -target-lexicon = "0.8.1" +...
10
12
12
16441ed70a7cea55085bc8202c18f9dbbcde8e9a
Daniel
2019-11-06T04:12:34
SimpleJIT - Add a Drop impl to PtrLen (#1001) * Implement SimpleJIT deallocation for non-windows targets. * Remove custom Drop from feature(selinux-fix). * Fix typo in unprotect error message. * Drop SimpleJIT memory by default and add free_memory method instead. * Move free_memory to a handle returned by ...
diff --git a/cranelift/simplejit/src/backend.rs b/cranelift/simplejit/src/backend.rs index 68d603af3..919a4ffe3 100644 --- a/cranelift/simplejit/src/backend.rs +++ b/cranelift/simplejit/src/backend.rs @@ -118,9 +118,7 @@ pub struct SimpleJITBackend { isa: Box<dyn TargetIsa>, symbols: HashMap<String, *const u8...
2
89
18
1417215532046af54ed82a594398f3bfd3d8074c
Andrew Brown
2019-10-25T18:22:25
Translate WASM integer less-than to CLIF
diff --git a/cranelift/wasm/src/code_translator.rs b/cranelift/wasm/src/code_translator.rs index ccc5591a0..cab540533 100644 --- a/cranelift/wasm/src/code_translator.rs +++ b/cranelift/wasm/src/code_translator.rs @@ -1173,31 +1173,31 @@ pub fn translate_operator<FE: FuncEnvironment + ?Sized>( Operator::I8x16Gt...
1
13
13
ce67ea5d5817efd8caac819f1e22c5c4c8db733f
Andrew Brown
2019-10-25T17:56:40
Factor out common translations for SIMD comparisons
diff --git a/cranelift/wasm/src/code_translator.rs b/cranelift/wasm/src/code_translator.rs index fae0efe9e..ccc5591a0 100644 --- a/cranelift/wasm/src/code_translator.rs +++ b/cranelift/wasm/src/code_translator.rs @@ -1165,57 +1165,26 @@ pub fn translate_operator<FE: FuncEnvironment + ?Sized>( state.push1(b...
1
23
42
7715c5e07a8e1f72b2ff24299746e86436db8377
Andrew Brown
2019-10-25T17:51:16
Translate WASM integer greater-than to CLIF
diff --git a/cranelift/wasm/src/code_translator.rs b/cranelift/wasm/src/code_translator.rs index f5729b59b..fae0efe9e 100644 --- a/cranelift/wasm/src/code_translator.rs +++ b/cranelift/wasm/src/code_translator.rs @@ -1186,27 +1186,48 @@ pub fn translate_operator<FE: FuncEnvironment + ?Sized>( .icmp...
1
30
9
f053595748753e1b11789fe120ee12dd0492a630
Andrew Brown
2019-10-25T00:13:29
Translate WASM iTxN.gt_s to CLIF
diff --git a/cranelift/wasm/src/code_translator.rs b/cranelift/wasm/src/code_translator.rs index df1912e23..f5729b59b 100644 --- a/cranelift/wasm/src/code_translator.rs +++ b/cranelift/wasm/src/code_translator.rs @@ -1176,9 +1176,18 @@ pub fn translate_operator<FE: FuncEnvironment + ?Sized>( let bitcast_b ...
1
10
3
6f35273055fec0b2f0be82697519b5a44c2f7098
Andrew Brown
2019-10-25T00:05:56
Add hexadecimal parsing for uimm8 This is to make it more clear in signed contexts that the uimm8 (e.g. 255) is in fact being used for its bits (e.g. 0xff).
diff --git a/cranelift/reader/src/parser.rs b/cranelift/reader/src/parser.rs index 24f8b5a2e..01b10cac9 100644 --- a/cranelift/reader/src/parser.rs +++ b/cranelift/reader/src/parser.rs @@ -665,9 +665,15 @@ impl<'a> Parser<'a> { if let Some(Token::Integer(text)) = self.token() { self.consume(); ...
1
21
3
3a94e8d46aa129fe474753f039bf640724f8390c
Andrew Brown
2019-10-23T22:42:26
Translate WASM iTxN.ne to CLIF
diff --git a/cranelift/wasm/src/code_translator.rs b/cranelift/wasm/src/code_translator.rs index 77d35373a..df1912e23 100644 --- a/cranelift/wasm/src/code_translator.rs +++ b/cranelift/wasm/src/code_translator.rs @@ -1170,8 +1170,13 @@ pub fn translate_operator<FE: FuncEnvironment + ?Sized>( let bitcast_b ...
1
7
4
f8c3dfeb17e8a15b1a046802e7c7db53b83c3d28
Andrew Brown
2019-10-23T22:05:36
Translate WASM iTxN.eq to CLIF
diff --git a/cranelift/wasm/src/code_translator.rs b/cranelift/wasm/src/code_translator.rs index 6fda78be2..77d35373a 100644 --- a/cranelift/wasm/src/code_translator.rs +++ b/cranelift/wasm/src/code_translator.rs @@ -1164,8 +1164,13 @@ pub fn translate_operator<FE: FuncEnvironment + ?Sized>( let bool_resul...
1
7
4
3757b8b1c2c802d5a76d69b57425b881483e84b6
Dan Gohman
2019-11-05T23:31:39
Update local dependency versions too (#173) * Bump crate versions. * Update dependency version numbers too. This is a follow-up to f96b6c9e72ae50fcddd488be47a2d4b5ac7b926b to update the version numbers in the local dependencies too.
diff --git a/Cargo.toml b/Cargo.toml index 0ec0c8e20..9c3f181cd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,7 +20,7 @@ readme = "README.md" wasm_tests = [] [dependencies] -wasi-common-cbindgen = { path = "wasi-common-cbindgen", version = "0.4.0" } +wasi-common-cbindgen = { path = "wasi-common-cbindgen", version...
1
3
3
ab0c933eff514c38cae15a7ee67844c8b9c34395
Dan Gohman
2019-11-05T23:13:13
Bump crate versions. (#171)
diff --git a/Cargo.toml b/Cargo.toml index 8383a9df1..0ec0c8e20 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasi-common" -version = "0.4.0" +version = "0.5.0" authors = [ "Adam C. Foltzer <acfoltzer@fastly.com>", "Frank Denis <github@pureftpd.org>", diff --git a/wasi-common-c...
4
4
4
c0c7851cb6294206ed959665644f1b0162b99827
Josh Triplett
2019-11-05T04:45:42
Fix fuzz build (#458) Update to binaryen 0.8.1, as 0.5.0 doesn't build on current systems. Update to match API changes in wasmtime and wasmparser.
diff --git a/fuzz/Cargo.toml b/fuzz/Cargo.toml index 8aa197050..43fc9228e 100644 --- a/fuzz/Cargo.toml +++ b/fuzz/Cargo.toml @@ -16,7 +16,7 @@ cranelift-wasm = { version = "0.47", features = ["enable-serde"] } cranelift-native = { version = "0.47" } libfuzzer-sys = { git = "https://github.com/rust-fuzz/libfuzzer-sys....
3
6
6
bd60aa8b5eb741c2fcde1ce150f803464b668f03
Josh Triplett
2019-11-05T04:44:38
wasmtime-wast: Fix copy-pasted doc comment (#453) wasmtime-wast's main module had the same comment as wasmtime-jit's main module; fix it to have its own doc comment.
diff --git a/wasmtime-wast/src/lib.rs b/wasmtime-wast/src/lib.rs index b8831c02c..182be4a1d 100644 --- a/wasmtime-wast/src/lib.rs +++ b/wasmtime-wast/src/lib.rs @@ -1,4 +1,4 @@ -//! JIT-style runtime for WebAssembly using Cranelift. +//! Implementation of the WAST text format for wasmtime. #![deny(missing_docs, triv...
1
1
1
f4ac1299b2001b575cfc99f5544a4a96355a6bff
Jakub Konka
2019-11-03T20:10:14
Fix path_rename_trailing_slashes test case on Win This commit adds a utility routine `strip_trailing_slashes_and_concatenate` which is common for `path_rename` and `path_symlink` on Windows, and checks if the resolved `PathGet` indeed contains a trailing slash(es) before striping them off. Secondly, this commit fixes ...
diff --git a/build.rs b/build.rs index e9d3cda36..fc7db99b8 100644 --- a/build.rs +++ b/build.rs @@ -198,7 +198,6 @@ mod wasm_tests { "symlink_loop" => true, "truncation_rights" => true, "fd_readdir" => true, - "path_renam...
2
30
8
e1b0f1f9904aa5d77ef597c2e17e66dbfac12ecb
Oliver Scherer
2019-11-04T11:11:59
Use less vague language
diff --git a/cranelift/frontend/src/variable.rs b/cranelift/frontend/src/variable.rs index f83c5ad6a..9a40b9dfe 100644 --- a/cranelift/frontend/src/variable.rs +++ b/cranelift/frontend/src/variable.rs @@ -3,10 +3,10 @@ //! Frontends can use any indexing scheme they see fit and //! generate the appropriate `Variable` ...
1
4
4
9903c75f82637f0990ef2222c80ee76d0dcb16b5
Oliver Scherer @ Cosmian
2019-10-22T12:53:10
Update variable.rs
diff --git a/cranelift/frontend/src/variable.rs b/cranelift/frontend/src/variable.rs index e96fe7d94..f83c5ad6a 100644 --- a/cranelift/frontend/src/variable.rs +++ b/cranelift/frontend/src/variable.rs @@ -1,7 +1,12 @@ //! A basic `Variable` implementation. -//! +//! //! Frontends can use any indexing scheme they see...
1
6
1
d8fa5dcb293dd2bcda6eb7c33d378196502051ca
Oliver Scherer @ Cosmian
2019-10-22T11:32:29
Update outdated documentation
diff --git a/cranelift/frontend/src/variable.rs b/cranelift/frontend/src/variable.rs index 9e7c26024..e96fe7d94 100644 --- a/cranelift/frontend/src/variable.rs +++ b/cranelift/frontend/src/variable.rs @@ -1,9 +1,7 @@ //! A basic `Variable` implementation. -//! -//! `FunctionBuilderContext`, `FunctionBuilder`, and rela...
1
3
5
74757fdd65ef6f8950e94bd2e7a8a7ed46530e46
Jakub Konka
2019-11-02T13:33:54
Sync wasmtime and remove wasm32 deprecated module (#165) Since `wasmtime` now uses `wasi` and `wasi32` modules, we can now safely remove the `wasm32` module. This commit also updates `wasmtime` to the latest upstream.
diff --git a/Cargo.toml b/Cargo.toml index 79354c361..970cd8f58 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -40,11 +40,11 @@ cpu-time = "1.0" [dev-dependencies] -wasmtime-runtime = { git = "https://github.com/cranestation/wasmtime", rev = "875eea6" } -wasmtime-environ = { git = "https://github.com/cranestation/was...
2
5
12
95578a42cea28d2018bd1cd59f13b97f35246d66
Dan Gohman
2019-11-02T00:08:48
Remove `RIGHTS_SHARED_MEMORY_BASE`. This came from CloudABI, but WASI doesn't include POSIX-style shared-memory objects.
diff --git a/src/wasi.rs b/src/wasi.rs index 5379c6726..8dccc6755 100644 --- a/src/wasi.rs +++ b/src/wasi.rs @@ -197,15 +197,6 @@ pub(crate) const RIGHTS_REGULAR_FILE_BASE: __wasi_rights_t = __WASI_RIGHT_FD_DAT | __WASI_RIGHT_POLL_FD_READWRITE; pub(crate) const RIGHTS_REGULAR_FILE_INHERITING: __wasi_rights_t = 0;...
1
0
9
86829d244724c028a3569a6f2b0d130f70cad603
Dan Gohman
2019-10-31T15:35:02
Handle overflow in Linux's `dirent_from_host`.
diff --git a/src/sys/unix/linux/mod.rs b/src/sys/unix/linux/mod.rs index eb0acaf70..bef8b85ad 100644 --- a/src/sys/unix/linux/mod.rs +++ b/src/sys/unix/linux/mod.rs @@ -28,6 +28,7 @@ pub(crate) mod fdentry_impl { pub(crate) mod host_impl { use super::super::host_impl::dirent_filetype_from_host; use crate::{w...
1
3
2
b42e550d5a36113157094dcacfd2e6cc2b03fceb
Jakub Konka
2019-11-01T19:47:48
Replace wasm32 with wasi and wasi32 This commit syncs `wasmtime-wasi` crate with the latest refactoring applied to `wasi-common` crate. Namely, `wasm32` is replaced with two modules: `wasi` and `wasi32`. This change can be tracked via CraneStation/wasi-common#151.
diff --git a/Cargo.toml b/Cargo.toml index 45bfa332b..4cb330162 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -25,7 +25,7 @@ wasmtime-obj = { path = "wasmtime-obj" } wasmtime-wast = { path = "wasmtime-wast" } wasmtime-wasi = { path = "wasmtime-wasi" } wasmtime-wasi-c = { path = "wasmtime-wasi-c", optional = true } -wa...
4
201
201
37ce4ba2ad60346c268dbc7b311753cc6dbda38c
Jakub Konka
2019-11-01T20:04:28
Fix rights in fd_pwrite; cleanup redundant borrows This commit fixes incorrect rights check in `fd_pwrite`. Until now, we were erroneously checking whether the `Descriptor` has `__WASI_RIGHT_FD_READ` rights instead of `__WASI_RIGHT_FD_WRITE`. Additionally, this commit removes redundant borrows from `wasi_ctx.get_fd_e...
diff --git a/src/hostcalls_impl/fs.rs b/src/hostcalls_impl/fs.rs index ad40d5180..6b07a1a20 100644 --- a/src/hostcalls_impl/fs.rs +++ b/src/hostcalls_impl/fs.rs @@ -108,7 +108,7 @@ pub(crate) unsafe fn fd_pwrite( let fd = wasi_ctx .get_fd_entry(fd)? - .as_descriptor(wasi::__WASI_RIGHT_FD_READ, 0)...
2
18
19
96f5a6b56141a55e606903afb0e5c3bd4089890b
Andrew Brown
2019-10-31T16:17:27
Fix documentation link issues
diff --git a/cranelift/codegen/meta/src/cdsl/ast.rs b/cranelift/codegen/meta/src/cdsl/ast.rs index e2e661de8..e4eb202be 100644 --- a/cranelift/codegen/meta/src/cdsl/ast.rs +++ b/cranelift/codegen/meta/src/cdsl/ast.rs @@ -390,10 +390,12 @@ impl VarPool { } } -/// Contains constants created in the AST that must b...
2
10
8
f19456640cce8d370ce181c5a433db6942293ae3
Andrew Brown
2019-10-31T00:54:04
Add documentation for top-level items in cranelift-codegen/meta
diff --git a/cranelift/codegen/meta/src/cdsl/mod.rs b/cranelift/codegen/meta/src/cdsl/mod.rs index 370b442ae..698b64dff 100644 --- a/cranelift/codegen/meta/src/cdsl/mod.rs +++ b/cranelift/codegen/meta/src/cdsl/mod.rs @@ -39,6 +39,7 @@ macro_rules! predicate { }; } +/// A macro that joins boolean settings into a...
10
12
0
e45c2831942fc071e624bda8f827d0593d49ac2d
Andrew Brown
2019-10-31T00:53:31
Enable documentation of private items in cranelift-codegen/meta; fixes #832
diff --git a/cranelift/codegen/meta/Cargo.toml b/cranelift/codegen/meta/Cargo.toml index c11a7333d..23507c787 100644 --- a/cranelift/codegen/meta/Cargo.toml +++ b/cranelift/codegen/meta/Cargo.toml @@ -15,3 +15,6 @@ cranelift-entity = { path = "../../cranelift-entity", version = "0.46.1" } [badges] maintenance = { sta...
1
3
0
8c2d9fd32f9bc44d412bb32741161f32e578e40b
Benjamin Bouvier
2019-10-29T17:20:42
Tweak comments in regalloc code.
diff --git a/cranelift/codegen/src/regalloc/affinity.rs b/cranelift/codegen/src/regalloc/affinity.rs index b7fa3090c..efcc4dabf 100644 --- a/cranelift/codegen/src/regalloc/affinity.rs +++ b/cranelift/codegen/src/regalloc/affinity.rs @@ -92,10 +92,8 @@ impl Affinity { // to change anything. ...
2
4
9
d6b3ca28b487f35234b3c3b1f95761a8ca3dabca
Josh Triplett
2019-10-30T15:02:16
Add and use a From impl from CodegenError to ModuleError This will also improve reporting of the chain of errors.
diff --git a/cranelift/module/src/module.rs b/cranelift/module/src/module.rs index 6b682101c..34964a7b6 100644 --- a/cranelift/module/src/module.rs +++ b/cranelift/module/src/module.rs @@ -141,7 +141,7 @@ pub enum ModuleError { InvalidImportDefinition(String), /// Wraps a `cranelift-codegen` error #[erro...
1
2
4
7e725cf880dd5151e746083729a3c749453b0491
Josh Triplett
2019-10-30T14:30:20
Migrate from failure to thiserror The failure crate invents its own traits that don't use std::error::Error (because failure predates certain features added to Error); this prevents using ? on an error from failure in a function using Error. The thiserror crate integrates with the standard Error trait instead.
diff --git a/cranelift/codegen/Cargo.toml b/cranelift/codegen/Cargo.toml index fc7a9023a..5149c68ee 100644 --- a/cranelift/codegen/Cargo.toml +++ b/cranelift/codegen/Cargo.toml @@ -16,13 +16,12 @@ edition = "2018" cranelift-codegen-shared = { path = "./shared", version = "0.46.1" } cranelift-entity = { path = "../cra...
9
37
53
3b7a00f4742b6a427b64d79a17c7d4f6938bc004
Peter Huene
2019-10-30T20:05:18
Fix unused function warnings on Windows. Unfortunately the helpers added in #154 were only used from non-Windows implementations, which caused compiler warnings on Windows. This commit moves the helper to be unix-specific and removes the tiny wrapper around calling `str_to_cstring` on `PathGet.path`.
diff --git a/src/helpers.rs b/src/helpers.rs index 34044b47f..4d99b9609 100644 --- a/src/helpers.rs +++ b/src/helpers.rs @@ -1,6 +1,5 @@ use crate::{Error, Result}; use std::convert::TryInto; -use std::ffi::CString; use std::time::{SystemTime, UNIX_EPOCH}; pub(crate) fn systemtime_to_timestamp(st: SystemTime) -> ...
6
22
28
d8b840d2f5ea565dbf378faf938e6886dfef2466
Benjamin Bouvier
2019-10-29T15:57:11
[meta] Remove the OperandKindBuilder; And replace it by constructors in OperandKind. There's a single optional parameter function `set_doc` that remains, and didn't justify the whole OperandKindBuilder concept to exist.
diff --git a/cranelift/codegen/meta/src/cdsl/formats.rs b/cranelift/codegen/meta/src/cdsl/formats.rs index 0978d61fa..e713a8bcc 100644 --- a/cranelift/codegen/meta/src/cdsl/formats.rs +++ b/cranelift/codegen/meta/src/cdsl/formats.rs @@ -49,6 +49,7 @@ pub(crate) struct InstructionFormat { pub(crate) struct FormatStruct...
5
78
134
d5e990220e97242bd5a54c1b7914aaf0b7a198af
Benjamin Bouvier
2019-10-29T14:46:06
[meta] Remove OperandKind::name field and explicitly pass rust_field_name/rust_type; (fixes #1177)
diff --git a/cranelift/codegen/meta/src/cdsl/ast.rs b/cranelift/codegen/meta/src/cdsl/ast.rs index 47dd457e2..e2e661de8 100644 --- a/cranelift/codegen/meta/src/cdsl/ast.rs +++ b/cranelift/codegen/meta/src/cdsl/ast.rs @@ -151,12 +151,12 @@ pub(crate) enum Literal { /// corresponding to a Rust enum type. An `Enumera...
9
120
167
0eb2dfc4a39f4441ca1b6e12a58c53425f95e6cb
Benjamin Bouvier
2019-10-29T14:41:13
[meta] Rename OperandKind::default_member to format_field_name;
diff --git a/cranelift/codegen/meta/src/cdsl/encodings.rs b/cranelift/codegen/meta/src/cdsl/encodings.rs index af6dd296b..730e9e75d 100644 --- a/cranelift/codegen/meta/src/cdsl/encodings.rs +++ b/cranelift/codegen/meta/src/cdsl/encodings.rs @@ -95,8 +95,8 @@ impl EncodingBuilder { &inst.inst.fo...
5
24
24
4f5b0689f3df1727a54d7d48957aa0118c89d83c
Benjamin Bouvier
2019-10-29T14:24:52
[meta] Remove OperandKind::imm_name method;
diff --git a/cranelift/codegen/meta/src/cdsl/instructions.rs b/cranelift/codegen/meta/src/cdsl/instructions.rs index a804efca7..32d6a7d66 100644 --- a/cranelift/codegen/meta/src/cdsl/instructions.rs +++ b/cranelift/codegen/meta/src/cdsl/instructions.rs @@ -555,7 +555,7 @@ fn verify_format(inst_name: &str, operands_in: ...
2
7
16
ae3ea47dbd836e6d1cc5c27d4a02989816c8b9fc
Benjamin Bouvier
2019-10-29T14:18:45
[meta] Delegate finding the default value to OperandKind instead of its builder. This applies both to the default_member value (which is now determined at runtime, instead of pre-computed) and the rust_type value (which is determined in the Operand's ctor, instead of the builder).
diff --git a/cranelift/codegen/meta/src/cdsl/encodings.rs b/cranelift/codegen/meta/src/cdsl/encodings.rs index f79d3b943..af6dd296b 100644 --- a/cranelift/codegen/meta/src/cdsl/encodings.rs +++ b/cranelift/codegen/meta/src/cdsl/encodings.rs @@ -95,7 +95,7 @@ impl EncodingBuilder { &inst.inst.fo...
3
67
61
4632d35196381b2ff56517f74aea1e996e57b12a
Benjamin Bouvier
2019-10-29T13:44:25
[meta] Remove the OperandBuilder, replace it with Operand ctors;
diff --git a/cranelift/codegen/meta/src/cdsl/instructions.rs b/cranelift/codegen/meta/src/cdsl/instructions.rs index a00d20a38..a804efca7 100644 --- a/cranelift/codegen/meta/src/cdsl/instructions.rs +++ b/cranelift/codegen/meta/src/cdsl/instructions.rs @@ -1292,7 +1292,7 @@ impl Into<InstSpec> for BoundInstruction { m...
4
263
310
2bebc40c1634b15327d23dd77fed93c5224d9282
Benjamin Bouvier
2019-10-29T10:50:34
[meta] Move the doc() default values in the Operand/OperandKind;
diff --git a/cranelift/codegen/meta/src/cdsl/operands.rs b/cranelift/codegen/meta/src/cdsl/operands.rs index 9f821a7a6..57968326c 100644 --- a/cranelift/codegen/meta/src/cdsl/operands.rs +++ b/cranelift/codegen/meta/src/cdsl/operands.rs @@ -19,11 +19,21 @@ use crate::cdsl::typevar::TypeVar; #[derive(Clone, Debug)] pu...
2
28
26
0b8a579943b781c9d9ab1e49edce6d7a7ed6eee6
Benjamin Bouvier
2019-10-29T13:31:56
Fixes #851: Document instructions' input operands in InstBuilder;
diff --git a/cranelift/codegen/meta/src/gen_inst.rs b/cranelift/codegen/meta/src/gen_inst.rs index 85f806347..7abca6a18 100644 --- a/cranelift/codegen/meta/src/gen_inst.rs +++ b/cranelift/codegen/meta/src/gen_inst.rs @@ -895,11 +895,18 @@ fn gen_inst_builder(inst: &Instruction, format: &InstructionFormat, fmt: &mut Fo ...
1
46
1
fcf0ad1d5d8368cac7fd5fda56967181708658c4
Josh Triplett
2019-10-30T14:35:55
Log function definition unconditionally Don't log inside the `.map_err` call, which resulted in only logging function definitions on codegen errors.
diff --git a/cranelift/module/src/module.rs b/cranelift/module/src/module.rs index 808dd8816..f45db2e79 100644 --- a/cranelift/module/src/module.rs +++ b/cranelift/module/src/module.rs @@ -547,14 +547,14 @@ where func: FuncId, ctx: &mut Context, ) -> ModuleResult<binemit::CodeOffset> { - l...
1
8
8
689771caf3a28f3ff67e7cccc185e8d6afbb1d22
bjorn3
2019-10-29T19:36:03
Don't force enable basic-blocks feature Fixes #1179
diff --git a/cranelift/faerie/Cargo.toml b/cranelift/faerie/Cargo.toml index c5b471da1..db77e2e0e 100644 --- a/cranelift/faerie/Cargo.toml +++ b/cranelift/faerie/Cargo.toml @@ -10,13 +10,18 @@ readme = "README.md" edition = "2018" [dependencies] -cranelift-codegen = { path = "../cranelift-codegen", version = "0.46....
3
19
4
0302f1a16437fe6c4c6e7a6c08521db7a7732840
Dan Gohman
2019-10-29T21:14:39
Make `path_get` return `ENOTDIR` when the base isn't a directory. Return `ENOTDIR` instead of `ENOTCAPABLE` when `*at` functions are given a non-directory as their base. This is in accordance with POSIX: https://pubs.opengroup.org/onlinepubs/9699919799/functions/open.html Currently wasi-libc contains some code to de...
diff --git a/src/hostcalls_impl/fs.rs b/src/hostcalls_impl/fs.rs index 435d0dfff..8eae1f25a 100644 --- a/src/hostcalls_impl/fs.rs +++ b/src/hostcalls_impl/fs.rs @@ -468,10 +468,8 @@ pub(crate) unsafe fn path_create_directory( trace!(" | (path_ptr,path_len)='{}'", path); let rights = host::__WASI_RIGHT_P...
2
54
51
7e5c33a29ee8730cec36345402f95e5b3b1b9f3e
lzutao
2019-10-30T08:06:54
Use array::iter
diff --git a/cranelift/codegen/build.rs b/cranelift/codegen/build.rs index ef89d48ff..f2afc404e 100644 --- a/cranelift/codegen/build.rs +++ b/cranelift/codegen/build.rs @@ -28,7 +28,7 @@ fn main() { // Configure isa targets cfg. let isa_targets = meta::isa::Isa::all() - .into_iter() + .iter() ...
1
1
1
aecec187d7407c98884187e22814678fbef7e32f
Dan Gohman
2019-10-30T00:11:43
Check for overflow when incrementing the `preopen_fd` counter. (#157) If someone somehow defines more preopens than can fit in the `__wasi_fd_t` index space, we should detect it instead of silently wrapping around.
diff --git a/src/ctx.rs b/src/ctx.rs index 3f4d9d5cf..b86bfa2bd 100644 --- a/src/ctx.rs +++ b/src/ctx.rs @@ -135,7 +135,7 @@ impl WasiCtxBuilder { let mut fe = FdEntry::from(dir)?; fe.preopen_path = Some(guest_path); self.fds.insert(preopen_fd, fe); - preopen_fd += 1; +...
1
1
1
de71dbec0d0001ee270b94d683a04ba291712620
Peter Huene
2019-10-29T23:30:22
Implement a helper for converting &str to CString. (#154) This commit implements a simple helper for converting `&str` to `CString` and mapping to the appropriate WASI error. It also adds a `path_cstring` helper method in `PathGet` where the conversion was used the most. Fixes #104.
diff --git a/src/helpers.rs b/src/helpers.rs index 4d99b9609..34044b47f 100644 --- a/src/helpers.rs +++ b/src/helpers.rs @@ -1,5 +1,6 @@ use crate::{Error, Result}; use std::convert::TryInto; +use std::ffi::CString; use std::time::{SystemTime, UNIX_EPOCH}; pub(crate) fn systemtime_to_timestamp(st: SystemTime) -> ...
6
28
18
9a5c53b3ed11cc3f9d58417695d72c8c7df5a1c2
Dan Gohman
2019-10-29T22:46:11
Make wasi-common's `Error` messages prettier. (#156) Instead of returning the debug formatting, which includes the enum names, like `Io(...)`, just run the formatting function of the inner error objects, which is nicer for command-line use.
diff --git a/src/error.rs b/src/error.rs index 723e8a0d8..335f3d592 100644 --- a/src/error.rs +++ b/src/error.rs @@ -6,7 +6,7 @@ use std::convert::Infallible; use std::fmt; use std::num::TryFromIntError; -#[derive(Clone, Copy, Debug, Fail)] +#[derive(Clone, Copy, Debug, Fail, Eq, PartialEq)] #[repr(u16)] pub enum...
1
8
3
c2ba74b118da0743b6189d5927e8475c3be30511
Yury Delendik
2019-10-29T22:25:54
[wasmtime-api] run examples as tests (#466) * [wasmtime-api] run example as tests * Update wasmtime-api/tests/examples.rs Co-Authored-By: Nick Fitzgerald <fitzgen@gmail.com> * disable multi example test on windows
diff --git a/wasmtime-api/tests/examples.rs b/wasmtime-api/tests/examples.rs new file mode 100644 index 000000000..3f6468f9a --- /dev/null +++ b/wasmtime-api/tests/examples.rs @@ -0,0 +1,39 @@ +use std::env; +use std::process::{Command, Stdio}; + +fn run_example(name: &'static str) { + let cargo = env::var("CARGO")....
1
39
0
265964113297d668cea0cc12d0aa9110371bf4dd
Marcin Mielniczuk
2019-10-29T14:05:43
Implement clock_time_get on Windows (#119) * Fix some Windows warnings. * Implement clock_time_get on Windows. Also update misc_testsuite to include latest clock_time_get test changes. * improve comments * Remove a leftover import. Co-Authored-By: Jakub Konka <kubkon@jakubkonka.com>
diff --git a/Cargo.toml b/Cargo.toml index 6bcf79103..9ea0769ed 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -27,6 +27,7 @@ rand = "0.7" cfg-if = "0.1.9" log = "0.4" filetime = "0.2.7" +lazy_static = "1.4.0" [target.'cfg(unix)'.dependencies] nix = "0.15" @@ -34,6 +35,8 @@ nix = "0.15" [target.'cfg(windows)'.depe...
6
79
34
e8c03fbd09d0a726022d85e32fbdcf957765fddf
Benjamin Bouvier
2019-10-28T17:28:31
[meta] Remove unused bit-vector functionalty; It can be resurrected if needed in the future. It was used only for the semantics descriptions, which went away with the transition of the meta-language to Rust.
diff --git a/cranelift/codegen/meta/src/cdsl/types.rs b/cranelift/codegen/meta/src/cdsl/types.rs index 9e0556a85..ffa038369 100644 --- a/cranelift/codegen/meta/src/cdsl/types.rs +++ b/cranelift/codegen/meta/src/cdsl/types.rs @@ -16,7 +16,6 @@ static _RUST_NAME_PREFIX: &str = "ir::types::"; /// or one of its subclasses...
3
3
183
5889dd2c641ac32c6afff7a8f14a2b7d7a89dde9
Benjamin Bouvier
2019-10-28T17:13:25
[meta] Add more pub(crate) definitions.
diff --git a/cranelift/codegen/meta/src/cdsl/formats.rs b/cranelift/codegen/meta/src/cdsl/formats.rs index d03929b5f..bcfc6f565 100644 --- a/cranelift/codegen/meta/src/cdsl/formats.rs +++ b/cranelift/codegen/meta/src/cdsl/formats.rs @@ -7,7 +7,7 @@ use std::rc::Rc; /// This corresponds to a single member of a variant ...
17
86
93
06b1817d89a4ec501ecc35e165b19b4da0e7818c
Benjamin Bouvier
2019-10-28T16:46:26
[meta] Rename Operand::is_pure_immediate into is_immediate;
diff --git a/cranelift/codegen/meta/src/cdsl/encodings.rs b/cranelift/codegen/meta/src/cdsl/encodings.rs index cdeac6448..f79d3b943 100644 --- a/cranelift/codegen/meta/src/cdsl/encodings.rs +++ b/cranelift/codegen/meta/src/cdsl/encodings.rs @@ -86,12 +86,11 @@ impl EncodingBuilder { } ...
3
7
8
b657aa57f69c231cf7fc49aed7fea31eb2a4a27d
Benjamin Bouvier
2019-10-28T16:45:40
[meta] Rename Operand::is_immediate to is_immediate_or_entityref
diff --git a/cranelift/codegen/meta/src/cdsl/encodings.rs b/cranelift/codegen/meta/src/cdsl/encodings.rs index f79d3b943..cdeac6448 100644 --- a/cranelift/codegen/meta/src/cdsl/encodings.rs +++ b/cranelift/codegen/meta/src/cdsl/encodings.rs @@ -86,11 +86,12 @@ impl EncodingBuilder { } ...
4
11
11
bb5c879718e7fe52f84aa27ec1aab881640d6e71
Jakub Konka
2019-10-28T21:49:50
Fixes path_symlink_trailing_slashes on Windows This commit: * adds missing `ERROR_ALREADY_EXISTS => __WASI_EEXIST` mapping * re-routes Win errors into correct WASI values in `symlink_*` fns when target exists and/or contains a trailing slash * remaps `ERROR_INVALID_NAME => __WASI_ENOENT`
diff --git a/build.rs b/build.rs index d25c339ca..48ca7d431 100644 --- a/build.rs +++ b/build.rs @@ -200,7 +200,6 @@ mod wasm_tests { "truncation_rights" => true, "fd_readdir" => true, "path_rename_trailing_slashes" => true, - ...
4
22
2
f37d1c7ecca703ea07d2af60c992abae201a8639
Andrew Brown
2019-10-23T21:52:44
Simplify binding of IntCC::Equals to SIMD `icmp`; fixes #1150
diff --git a/cranelift/codegen/meta/src/cdsl/encodings.rs b/cranelift/codegen/meta/src/cdsl/encodings.rs index 6797672a8..f79d3b943 100644 --- a/cranelift/codegen/meta/src/cdsl/encodings.rs +++ b/cranelift/codegen/meta/src/cdsl/encodings.rs @@ -93,7 +93,10 @@ impl EncodingBuilder { { ...
3
21
48
faee3b4bc3bb94e1fdf924a2bec4a863fb1638b8
Josh Triplett
2019-10-28T17:57:51
wasmtime-api: reserve_exact on the correct vector (#452) Fix what looks like a copy-paste issue in wasmtime-api/src/module.rs, which led to calling reserve_exact on one vector before pushing that many elements into another.
diff --git a/wasmtime-api/src/module.rs b/wasmtime-api/src/module.rs index db58f3e1a..9d20d1dc8 100644 --- a/wasmtime-api/src/module.rs +++ b/wasmtime-api/src/module.rs @@ -91,7 +91,7 @@ fn read_imports_and_exports( } SectionCode::Function => { let section = section.get_functi...
1
1
1
71dd73d672deb325664e3c9cd4ee7acebed5fb95
Jim Posen
2019-10-28T17:12:11
Expose some more internals publicly (#340)
diff --git a/misc/wasmtime-py/src/code_memory.rs b/misc/wasmtime-py/src/code_memory.rs deleted file mode 100644 index b117f5228..000000000 --- a/misc/wasmtime-py/src/code_memory.rs +++ /dev/null @@ -1,83 +0,0 @@ -//! Memory management for executable code. -// Copy of wasmtime's wasmtime-jit/src/code_memory.rs - -use co...
10
30
173
e045a6df2765dcbd0b84dc4a67f1a22c388bf5b5
Joshua Nelson
2019-10-27T21:07:59
implement Debug for Linkage this would have been useful while debugging something in my own project
diff --git a/cranelift/module/src/module.rs b/cranelift/module/src/module.rs index 847710ed1..808dd8816 100644 --- a/cranelift/module/src/module.rs +++ b/cranelift/module/src/module.rs @@ -48,7 +48,7 @@ impl From<DataId> for ir::ExternalName { } /// Linkage refers to where an entity is defined and who can see it. -...
1
1
1
f27e0ad53cdd4749f5b603c63ba8bedb97e4e15c
Josh Triplett
2019-10-28T10:42:46
wasmtime-wasi-c: allow(non_snake_case) to suppress warnings on consecutive underscores (#461) wasmtime-wasi-c contains many bindgen-generated symbols like bindgen_test_layout___wasi_event_t___wasi_event_u___wasi_event_u_fd_readwrite_t that contain triple-underscores in them. rustc doesn't consider those names snake...
diff --git a/wasmtime-wasi-c/src/host.rs b/wasmtime-wasi-c/src/host.rs index 918ea92f5..152531794 100644 --- a/wasmtime-wasi-c/src/host.rs +++ b/wasmtime-wasi-c/src/host.rs @@ -1,4 +1,4 @@ -#![allow(non_camel_case_types, dead_code)] +#![allow(non_camel_case_types, non_snake_case, dead_code)] include!(concat!(env!("O...
2
2
1
59bbfbc0d772c735456fd3bcd68c4d2294ac3acb
Jakub Konka
2019-10-25T12:36:35
Remove `needs_close` from `FdObject` This commit removes `needs_close` field from `FdObject`, and stores the underlying `Descriptor` without the `ManuallyDrop` wrapper.
diff --git a/src/fdentry.rs b/src/fdentry.rs index ca9351076..cdfbe4f06 100644 --- a/src/fdentry.rs +++ b/src/fdentry.rs @@ -1,6 +1,5 @@ use crate::sys::fdentry_impl::{determine_type_and_access_rights, OsFile}; use crate::{host, Error, Result}; -use std::mem::ManuallyDrop; use std::path::PathBuf; use std::{fs, io};...
2
8
24
6eb6e342d7e254c5fdc0a43e3019712b4538cee0
Maxim Vorobjov
2019-10-25T13:48:58
Rebuild misc tests when any of test files change (#150) * rebuild misc tests when any of test file changes * fix build formatting * file change validation -> build_and_generate_tests
diff --git a/build.rs b/build.rs index 3a2e6ff7d..d25c339ca 100644 --- a/build.rs +++ b/build.rs @@ -20,6 +20,21 @@ mod wasm_tests { use std::process::{Command, Stdio}; pub(crate) fn build_and_generate_tests() { + // Validate if any of test sources are present and if they changed + let bin_tes...
1
15
0
f9a83294245759cba76de1e2b3b8b5886b305e79
Pat Hickey
2019-10-25T12:23:26
WasiCtxBuilder: add methods to provide Files each for stdio (#147)
diff --git a/src/ctx.rs b/src/ctx.rs index c56ee1f6e..3f4d9d5cf 100644 --- a/src/ctx.rs +++ b/src/ctx.rs @@ -96,6 +96,24 @@ impl WasiCtxBuilder { Ok(self) } + /// Provide a File to use as stdin + pub fn stdin(mut self, file: File) -> Result<Self> { + self.fds.insert(0, FdEntry::from(file)?)...
1
18
0
a34439de42266b9d88de869460be9b5dc1c7fb20
vms
2019-10-24T22:56:04
optimize memory.grow 0 (#443)
diff --git a/wasmtime-runtime/src/memory.rs b/wasmtime-runtime/src/memory.rs index 121cbc34a..fca4b384b 100644 --- a/wasmtime-runtime/src/memory.rs +++ b/wasmtime-runtime/src/memory.rs @@ -80,6 +80,11 @@ impl LinearMemory { /// Returns `None` if memory can't be grown by the specified amount /// of wasm pages....
1
5
0
5a10879d5bd520950c8801c5a050223942dfc8ee
Artur Jamro
2019-10-24T22:37:01
Enable assert_unlinkable check (#451)
diff --git a/wasmtime-jit/src/link.rs b/wasmtime-jit/src/link.rs index 323b07d2b..bc536deaf 100644 --- a/wasmtime-jit/src/link.rs +++ b/wasmtime-jit/src/link.rs @@ -41,7 +41,7 @@ pub fn link_module( // TODO: If the difference is in the calling convention, // we could em...
2
41
30
1176e4f17820736eee180639f53eedf6d4063672
yjh
2019-10-24T15:54:31
Fix clippy warnings (#1168)
diff --git a/cranelift/codegen/meta/src/cdsl/ast.rs b/cranelift/codegen/meta/src/cdsl/ast.rs index 3a994f27e..644e60192 100644 --- a/cranelift/codegen/meta/src/cdsl/ast.rs +++ b/cranelift/codegen/meta/src/cdsl/ast.rs @@ -581,7 +581,7 @@ impl Apply { pred } - pub fn rust_builder(&self, defined_vars: &...
7
40
54
8e45a14cec87472df6616f4fd4583dc39e9eea9a
Jakub Konka
2019-10-24T09:52:15
Fast-forward wasmtime to latest rev
diff --git a/Cargo.toml b/Cargo.toml index a8241d5e4..6bcf79103 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -36,11 +36,11 @@ winx = { path = "winx", version = "0.4.0" } winapi = "0.3" [dev-dependencies] -wasmtime-runtime = { git = "https://github.com/cranestation/wasmtime", rev = "e37168a" } -wasmtime-environ = { g...
1
5
5
875eea605227de05f43a4763278d55773205cc54
Jakub Konka
2019-10-23T19:24:54
Update poll_oneoff's signature This PR updates `wasmtime_wasi` crate by adjusting `poll_oneoff`'s signature to that introduced in `wasi_common` in CraneStation/wasi-common#137. This change is required in order to fix #440.
diff --git a/Cargo.toml b/Cargo.toml index 94018ebdd..45bfa332b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -25,7 +25,7 @@ wasmtime-obj = { path = "wasmtime-obj" } wasmtime-wast = { path = "wasmtime-wast" } wasmtime-wasi = { path = "wasmtime-wasi" } wasmtime-wasi-c = { path = "wasmtime-wasi-c", optional = true } -wa...
4
5
4
3a374d00164d02194e7ecbecd9a571af3bdd7465
Jakub Konka
2019-10-24T08:55:30
Update poll_oneoff API This commit updates `poll_oneoff`'s API in a potentially least invasive way. That is, it adds unused `WasiCtx` argument to the syscall which will be required by #137. I am hopeful that this way #137 can pass all tests and hence this commit should aid the review process.
diff --git a/src/hostcalls/misc.rs b/src/hostcalls/misc.rs index 207d854f3..1a633b42e 100644 --- a/src/hostcalls/misc.rs +++ b/src/hostcalls/misc.rs @@ -72,6 +72,7 @@ hostcalls! { ) -> wasm32::__wasi_errno_t; pub unsafe fn poll_oneoff( + wasi_ctx: &WasiCtx, memory: &mut [u8], input:...
2
2
0
a7fa6bdb3197ca98bcd1b55665e3bb550888dda1
Dan Gohman
2019-10-23T21:05:23
Fix fuzz and wasi-c builds (#447) * Fix the wasmtime-wasi-c crate build and upgrade it to Rust 2018. * Fix the fuzz build.
diff --git a/fuzz/fuzz_targets/compile.rs b/fuzz/fuzz_targets/compile.rs index f6d0b5c32..77d878502 100644 --- a/fuzz/fuzz_targets/compile.rs +++ b/fuzz/fuzz_targets/compile.rs @@ -2,11 +2,8 @@ #[macro_use] extern crate libfuzzer_sys; -extern crate cranelift_codegen; -extern crate cranelift_native; -extern crate wa...
7
12
19
bd8d550ba36b3b7f75531323d974586fdfd36fcb
Dan Gohman
2019-10-23T17:17:22
Improve Cargo.toml files for publishing (#141) * Add versions to the crates. This is needed for publishing on crates.io. * Add a few Cargo.toml attributes to make the crates.io page friendlier.
diff --git a/Cargo.toml b/Cargo.toml index f9fa79ac3..a8241d5e4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasi-common" -version = "0.1.0" +version = "0.4.0" authors = [ "Adam C. Foltzer <acfoltzer@fastly.com>", "Frank Denis <github@pureftpd.org>", @@ -9,6 +9,10 @@ authors =...
3
9
5
056e1d8cc0c8c10a594812745e2df038b81c0540
Dan Gohman
2019-10-23T12:46:06
Add more links in the `fs` module's documentation.
diff --git a/src/fs/file.rs b/src/fs/file.rs index 1eae46e9c..f20e63eb4 100644 --- a/src/fs/file.rs +++ b/src/fs/file.rs @@ -7,10 +7,13 @@ use std::io; /// This corresponds to [`std::fs::File`]. /// /// Note that this `File` has no `open` or `create` methods. To open or create -/// a file, you must first obtain a `D...
3
11
4
a3dd4b91e1986d419a97ff708cb34f46a2e502b5
Johnnie Birch
2019-10-22T23:18:54
Fix lightbeam build broken when supporting ModuleTranslateState (#445)
diff --git a/wasmtime-environ/src/lightbeam.rs b/wasmtime-environ/src/lightbeam.rs index 07a690b1b..4407d0b35 100644 --- a/wasmtime-environ/src/lightbeam.rs +++ b/wasmtime-environ/src/lightbeam.rs @@ -9,7 +9,7 @@ use crate::address_map::{ModuleAddressMap, ValueLabelsRanges}; use crate::cranelift::RelocSink; use crane...
2
3
2
77035b44a62f05e2f36d0496de89948690151bf5
Andrew Brown
2019-10-18T23:23:31
Translate WASM all_true to CLIF
diff --git a/cranelift/wasm/src/code_translator.rs b/cranelift/wasm/src/code_translator.rs index f4bdc601b..709d40894 100644 --- a/cranelift/wasm/src/code_translator.rs +++ b/cranelift/wasm/src/code_translator.rs @@ -1154,6 +1154,13 @@ pub fn translate_operator<FE: FuncEnvironment + ?Sized>( let bool_resul...
1
7
4
65e18df12ff9c8a451e8be773b12477a9701ca22
Andrew Brown
2019-10-18T22:40:17
Translate WASM any_true to CLIF
diff --git a/cranelift/wasm/src/code_translator.rs b/cranelift/wasm/src/code_translator.rs index 01c72fab2..f4bdc601b 100644 --- a/cranelift/wasm/src/code_translator.rs +++ b/cranelift/wasm/src/code_translator.rs @@ -1147,6 +1147,13 @@ pub fn translate_operator<FE: FuncEnvironment + ?Sized>( // operands mu...
1
7
4
63c1f710368078b4b667e9feea5dc7aa7fdfb0d7
Jakub Konka
2019-10-22T09:34:50
Sync with latest wasmtime rev This commit syncs tests with latest wasmtime revision. As such, it now utilises the `wasmtime-api` crate for runtime setup. Closes #126, #127, #128, #129.
diff --git a/Cargo.toml b/Cargo.toml index 8cfe15ecc..f9fa79ac3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -32,14 +32,12 @@ winx = { path = "winx" } winapi = "0.3" [dev-dependencies] -wasmtime-runtime = { git = "https://github.com/cranestation/wasmtime", rev = "cb38b48" } -wasmtime-environ = { git = "https://githu...
2
74
31
d3e694fbe71086d9521a79fb3a1e6f4daf4a092e
Benjamin Bouvier
2019-10-18T14:04:51
[meta] Remove unused InstructionGroup::{name, doc};
diff --git a/cranelift/codegen/meta/src/cdsl/instructions.rs b/cranelift/codegen/meta/src/cdsl/instructions.rs index 0e18ced84..e642a512a 100644 --- a/cranelift/codegen/meta/src/cdsl/instructions.rs +++ b/cranelift/codegen/meta/src/cdsl/instructions.rs @@ -23,8 +23,6 @@ entity_impl!(OpcodeNumber); pub(crate) type AllI...
7
3
29
8fece43aa126cf26345c948844c6b46f042789d0
Benjamin Bouvier
2019-10-18T13:25:33
[meta] Use a type alias for Instruction; ... instead of embedding a Rc<InstructionContent>, just make it a type alias.
diff --git a/cranelift/codegen/meta/src/cdsl/instructions.rs b/cranelift/codegen/meta/src/cdsl/instructions.rs index 4acbd4a64..0e18ced84 100644 --- a/cranelift/codegen/meta/src/cdsl/instructions.rs +++ b/cranelift/codegen/meta/src/cdsl/instructions.rs @@ -3,7 +3,6 @@ use cranelift_entity::{entity_impl, PrimaryMap}; u...
1
29
42
0d63cc2dbcb1aa1e7c8c047d724a08b5ba07e9db
Jakub Konka
2019-10-20T07:43:13
Fix `remove_directory_trailing_slashes` on Windows This commit provides a fix for `remove_directory_trailing_slashes` test case on Windows. It adds a missing mapping between the following WinAPI error code and WASI error: ``` ERROR_DIRECTORY => __WASI_ENOTDIR ``` where `ERROR_DIRECTORY` is thrown when the directory ...
diff --git a/build.rs b/build.rs index 35b0e34ce..3a2e6ff7d 100644 --- a/build.rs +++ b/build.rs @@ -186,7 +186,6 @@ mod wasm_tests { "fd_readdir" => true, "path_rename_trailing_slashes" => true, "path_symlink_trailing_slashes" => true, - ...
3
4
2
e37168a88d9ad46118faecdeedb10c2449b1cc7a
Alex Crichton
2019-10-21T22:51:59
Add back wasmtime-wast support for V128 (#442) Accidentally left removed #434 when I meant to add it back in! Updates the `wast` crate dependency and adds support for translating `v128.const` instructions to a `RuntimeValue` Closes #441
diff --git a/wasmtime-wast/Cargo.toml b/wasmtime-wast/Cargo.toml index 255628200..dc4bbaa69 100644 --- a/wasmtime-wast/Cargo.toml +++ b/wasmtime-wast/Cargo.toml @@ -17,7 +17,7 @@ cranelift-wasm = { version = "0.46.1", features = ["enable-serde"] } wasmtime-jit = { path = "../wasmtime-jit" } wasmtime-runtime = { path ...
2
2
1
9947bc52092957f2dc64a1fa975963047d254a31
Alex Crichton
2019-10-18T20:25:48
Switch from `wabt` crate to `wast` (#434) * Switch lightbeam from `wabt` to `wast` Switch from a C++-based `*.wat` parser to a Rust-based parser * Remove unneeded `wabt` dev-dependency from wasmtime-api * Rewrite `wasmtime-wast` crate with `wast-parser` This commit moves the `wasmtime-wast` crate off the `...
diff --git a/Cargo.toml b/Cargo.toml index 767727211..94018ebdd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -33,7 +33,7 @@ failure = "0.1" target-lexicon = { version = "0.8.1", default-features = false } pretty_env_logger = "0.3.0" file-per-thread-logger = "0.1.1" -wabt = "0.9.2" +wat = "1.0.2" libc = "0.2.60" ray...
10
233
453
ef010b44b77807f8dc56798dee0c66739522564b
Dan Gohman
2019-10-18T15:44:17
Fix nondeterminism in the preopen order. We iterate over the preopens to present them to the WASI program, so storing them in a `HashMap` means this order is nondeterministic. Switch to a `Vec` of tuples instead. This means we don't eliminate duplicates, but they should be rare.
diff --git a/src/ctx.rs b/src/ctx.rs index 434dcedf2..c56ee1f6e 100644 --- a/src/ctx.rs +++ b/src/ctx.rs @@ -11,7 +11,7 @@ use std::path::{Path, PathBuf}; /// A builder allowing customizable construction of `WasiCtx` instances. pub struct WasiCtxBuilder { fds: HashMap<host::__wasi_fd_t, FdEntry>, - preopens: ...
1
3
3
4120d3b44fa3f5a1e8a6aecb64b5a819105565c3
Dan Gohman
2019-09-29T18:52:09
Optimize away an owned string in `path_readlink`.
diff --git a/src/host.rs b/src/host.rs index 37594be30..d43a12763 100644 --- a/src/host.rs +++ b/src/host.rs @@ -508,14 +508,6 @@ pub(crate) fn path_from_slice<'a>(s: &'a [u8]) -> Result<&'a str> { str::from_utf8(s).map_err(|_| Error::EILSEQ) } -/// Creates owned WASI path from byte vector. -/// -/// NB WASI sp...
2
1
9
d102bf9b61234860ba9b5dbbc5784f6c71351df7
Benjamin Bouvier
2019-10-18T14:05:01
Add allow(dead_code) for Immediate until it's used in legalization patterns; (#1157)
diff --git a/cranelift/codegen/meta/src/cdsl/instructions.rs b/cranelift/codegen/meta/src/cdsl/instructions.rs index 464aa6e24..4acbd4a64 100644 --- a/cranelift/codegen/meta/src/cdsl/instructions.rs +++ b/cranelift/codegen/meta/src/cdsl/instructions.rs @@ -452,6 +452,7 @@ impl From<Immediate> for BindParameter { } ...
1
1
0
ebef2c6b5720fce164af9ded8b7ff3dd5d7e041c
Dan Gohman
2019-10-18T00:15:31
Rename "always_lightbeam" to "lightbeam" in more places. (#404)
diff --git a/src/bin/wast.rs b/src/bin/wast.rs index 78c31db0d..be74a23f3 100644 --- a/src/bin/wast.rs +++ b/src/bin/wast.rs @@ -74,8 +74,8 @@ struct Args { flag_cache_config: Option<String>, flag_create_cache_config: bool, flag_enable_simd: bool, - flag_always_lightbeam: bool, - flag_always_cranel...
2
5
9
877152ee5c0dfac30088d9540a4f1ac1690e0ba8
Dan Gohman
2019-10-18T00:14:57
Use the libstd instead of the `errno` crate in wasmtime-runtime. (#408) Rust's standard library now has a way to read the OS errno value, so use that instead of depending on the errno crate in wasmtime-runtime.
diff --git a/Cargo.toml b/Cargo.toml index 1bfb22747..767727211 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -35,7 +35,6 @@ pretty_env_logger = "0.3.0" file-per-thread-logger = "0.1.1" wabt = "0.9.2" libc = "0.2.60" -errno = "0.2.4" rayon = "1.1" wasm-webidl-bindings = "0.5" diff --git a/wasmtime-runtime/Cargo.to...
3
7
9
50beb21b6361be13b61415b8c7a1ed09f9e47bf7
Alex Crichton
2019-10-18T00:14:15
Add a missing api to the wasm C API (#433) This was used when [prototyping] but I found it wasn't implemented yet! [prototyping]: https://github.com/dtolnay/watt/issues/2#issuecomment-543007365
diff --git a/wasmtime-api/src/wasm.rs b/wasmtime-api/src/wasm.rs index 356466f0a..71aee96bd 100644 --- a/wasmtime-api/src/wasm.rs +++ b/wasmtime-api/src/wasm.rs @@ -858,6 +858,11 @@ pub unsafe extern "C" fn wasm_valtype_new(kind: wasm_valkind_t) -> *mut wasm_val Box::into_raw(ty) } +#[no_mangle] +pub unsafe ext...
1
5
0
842faf5aa64ac7592637c64cd6ca92a456a3d085
Nick Fitzgerald
2019-10-18T00:12:01
Support for multi-value wasm (#399) * deps: bump wasmparser to 0.39.2 This has a bug fix for multi-value Wasm validation that is required for getting the spec tests passing. https://github.com/yurydelendik/wasmparser.rs/pull/135 * Update cranelift to 0.46.1 to get multi-value Wasm support The `cranelift_w...
diff --git a/Cargo.toml b/Cargo.toml index 16ba9579e..1bfb22747 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,10 +11,10 @@ edition = "2018" default-run = "wasmtime" [dependencies] -cranelift-codegen = { version = "0.44.0", features = ["enable-serde"] } -cranelift-entity = { version = "0.44.0", features = ["enable...
25
177
172
135f9eb4a645d563691fe37b3f3f57c08e651332
Andrew Brown
2019-10-11T22:16:46
Translate WASM bitselect to CLIF
diff --git a/cranelift/wasm/src/code_translator.rs b/cranelift/wasm/src/code_translator.rs index 8039635db..01c72fab2 100644 --- a/cranelift/wasm/src/code_translator.rs +++ b/cranelift/wasm/src/code_translator.rs @@ -1138,6 +1138,15 @@ pub fn translate_operator<FE: FuncEnvironment + ?Sized>( let b_mod_bitw...
1
9
1
46b44ad82d9370ec92b9388b53bbbd1bcc2a24c8
Sean Stangl
2019-10-17T17:30:38
Increase legibility of the SSABuilder (#1142)
diff --git a/cranelift/frontend/src/ssa.rs b/cranelift/frontend/src/ssa.rs index dcc729ebd..7a1f440a1 100644 --- a/cranelift/frontend/src/ssa.rs +++ b/cranelift/frontend/src/ssa.rs @@ -4,6 +4,8 @@ //! Zwinkau A. (2013) Simple and Efficient Construction of Static Single Assignment Form. //! In: Jhala R., De Bosschere ...
1
99
61
beca77c2f81baf24f974a658f56b1d3532d4d67c
Benjamin Bouvier
2019-10-08T16:03:58
Regalloc: rename "constraint" to "rc" and "op" to "constraint";
diff --git a/cranelift/codegen/src/regalloc/coloring.rs b/cranelift/codegen/src/regalloc/coloring.rs index f7fb50129..c6c48bf78 100644 --- a/cranelift/codegen/src/regalloc/coloring.rs +++ b/cranelift/codegen/src/regalloc/coloring.rs @@ -588,8 +588,8 @@ impl<'a> Context<'a> { // Copy register assignments from t...
3
84
85
69d2f40c106b0e19982b36dcbf36f5b78a514248
Nicolas B. Pierron
2019-09-09T12:37:28
Fix #796: Enable basic-blocks by default.
diff --git a/cranelift/Cargo.toml b/cranelift/Cargo.toml index 8ccacc3e8..667104bcd 100644 --- a/cranelift/Cargo.toml +++ b/cranelift/Cargo.toml @@ -46,7 +46,7 @@ indicatif = "0.12.0" walkdir = "2.2" [features] -default = ["disas", "wasm", "cranelift-codegen/all-arch"] +default = ["disas", "wasm", "cranelift-codege...
4
4
4
9d54f84a324b9238710324b0fd39c8086d2e4e75
Jakub Konka
2019-10-17T09:38:20
Fast-forward wasi-common to latest git rev
diff --git a/Cargo.toml b/Cargo.toml index 80232c661..16ba9579e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -25,7 +25,7 @@ wasmtime-obj = { path = "wasmtime-obj" } wasmtime-wast = { path = "wasmtime-wast" } wasmtime-wasi = { path = "wasmtime-wasi" } wasmtime-wasi-c = { path = "wasmtime-wasi-c", optional = true } -wa...
3
3
3
c3bf04042e03c706088de62acf1cd7aa79f0fa50
Jakub Konka
2019-10-17T09:33:56
Fixes `path_symlink_trailing_slashes` test case (#125) * Fixes `path_symlink_trailing_slashes` test case This commit: * adds a couple `log::debug!` macro calls in and around `path_get` for easier future debugging * changes impl of `path_symlink` hostcall to actually *require* the final component (matching t...
diff --git a/build.rs b/build.rs index af7764fab..35b0e34ce 100644 --- a/build.rs +++ b/build.rs @@ -170,15 +170,8 @@ mod wasm_tests { cfg_if::cfg_if! { if #[cfg(not(windows))] { /// Ignore tests that aren't supported yet. - fn ignore(testsuite: &str, name: &str) -> bool { - ...
7
79
31
d458fb68153f34d3cb71f57db4ad568fec5b5f9e
Jakub Konka
2019-10-16T09:04:39
Clean up BSD vs Linux implementation details This commit moves a couple of things around: * separates the logic of `path_unlink_file` into separate impls for linux and BSD-style nixes * moves implementation consts into appropriate impl modules: linux or bsd * cleans up `utime_now` and `utime_omit` for BSD-style ni...
diff --git a/src/sys/unix/bsd/hostcalls_impl.rs b/src/sys/unix/bsd/hostcalls_impl.rs index 35a57a03b..d2cbb9b5c 100644 --- a/src/sys/unix/bsd/hostcalls_impl.rs +++ b/src/sys/unix/bsd/hostcalls_impl.rs @@ -8,6 +8,47 @@ use std::ffi::CString; use std::fs::File; use std::os::unix::prelude::AsRawFd; +pub(crate) fn path...
7
183
100
f1f6b3780bc0bb9c5d76ae612d4c018da3cd1a19
Jakub Konka
2019-10-16T14:17:29
Fixes CraneStation/wasmtime#396 This commit fixes an issue with incorrect handling of /dev/(u)random on Linux. It turns out that `nix::unistd::isatty` call handled only the POSIX spec case where `ENOTTY` is returned in case the passed in file descriptor is OK but not a TTY, whereas on Linux this is not always the case...
diff --git a/src/sys/unix/bsd/mod.rs b/src/sys/unix/bsd/mod.rs index 89e059ef9..0ca462eda 100644 --- a/src/sys/unix/bsd/mod.rs +++ b/src/sys/unix/bsd/mod.rs @@ -1,2 +1,19 @@ pub(crate) mod hostcalls_impl; pub(crate) mod osfile; + +pub(crate) mod fdentry_impl { + use crate::{sys::host_impl, Result}; + use std::o...
4
57
1
19a980363e72fbf5d08c6f783b0ee55eb95fd3fb
Andrew Brown
2019-10-07T17:48:10
Translate WASM shr to CLIF sshr and ushr As with shift left, the spec requires that the shift count is computed modulo the lane width (see https://github.com/WebAssembly/simd/blob/master/proposals/simd/SIMD.md#left-shift-by-scalar).
diff --git a/cranelift/wasm/src/code_translator.rs b/cranelift/wasm/src/code_translator.rs index e2514909e..8039635db 100644 --- a/cranelift/wasm/src/code_translator.rs +++ b/cranelift/wasm/src/code_translator.rs @@ -1120,6 +1120,24 @@ pub fn translate_operator<FE: FuncEnvironment + ?Sized>( let b_mod_bitw...
1
18
5
808885ce56e8c2b7c0934ac79f5ca3142e093849
Andrew Brown
2019-10-02T20:55:44
Translate WASM shl to CLIF ishl Note how, according to the spec (see https://github.com/WebAssembly/simd/blob/master/proposals/simd/SIMD.md#left-shift-by-scalar), the shift count is computed modulo the lane width. E.g., a shift count of 17 on an i16x8 should not result in all zeroes as it does with Cranelift's `ishl` ...
diff --git a/cranelift/wasm/src/code_translator.rs b/cranelift/wasm/src/code_translator.rs index c5a56f0eb..e2514909e 100644 --- a/cranelift/wasm/src/code_translator.rs +++ b/cranelift/wasm/src/code_translator.rs @@ -1111,6 +1111,15 @@ pub fn translate_operator<FE: FuncEnvironment + ?Sized>( let (a, b) = s...
1
9
3
67733bd2fc7f976b30ae7ec47416c305117b5157
Andrew Brown
2019-10-11T16:26:08
Use ConstantData exclusively for inserting data into the constant pool Previously we allowed anything that could be converted into ConstantData (e.g. a Vec).
diff --git a/cranelift/codegen/meta/src/gen_legalizer.rs b/cranelift/codegen/meta/src/gen_legalizer.rs index 13c4351fb..f4033c64b 100644 --- a/cranelift/codegen/meta/src/gen_legalizer.rs +++ b/cranelift/codegen/meta/src/gen_legalizer.rs @@ -470,7 +470,7 @@ fn gen_transform<'a>( for (name, value) in transform.c...
5
30
28
a69b0fc22122d1dee19933e5a19f6abb581a5a8d
Andrew Brown
2019-10-09T22:02:05
Change match_literals_to_uimm128 to match_literals_to_constant_data
diff --git a/cranelift/reader/src/parser.rs b/cranelift/reader/src/parser.rs index b4ca9b7cc..1b1698caf 100644 --- a/cranelift/reader/src/parser.rs +++ b/cranelift/reader/src/parser.rs @@ -614,7 +614,7 @@ impl<'a> Parser<'a> { let expected_size = controlling_type.bytes() as usize; let constant_data = ...
1
23
22
ff93564c55c28f0236f1118000cb6c263948e1d5
Andrew Brown
2019-10-09T18:09:40
Update predicate documentation to match new ConstantData parameter
diff --git a/cranelift/codegen/src/predicates.rs b/cranelift/codegen/src/predicates.rs index 374e2bbbf..5812163e0 100644 --- a/cranelift/codegen/src/predicates.rs +++ b/cranelift/codegen/src/predicates.rs @@ -32,13 +32,13 @@ pub fn is_zero_32_bit_float<T: Into<ir::immediates::Ieee32>>(x: T) -> bool { x32.bits() ==...
1
2
2
a03f905d0842bbceb15c601b91ef8f3c97f610fa
Andrew Brown
2019-10-02T03:13:17
Replace V128Imm functionality with ConstantData This moves most original uses of V128Imm (e.g. in parsing) to ConstantData and shifts the unit tests from V128Imm to ConstantData.
diff --git a/cranelift/codegen/src/ir/constant.rs b/cranelift/codegen/src/ir/constant.rs index bd69e60c6..f29c8fbad 100644 --- a/cranelift/codegen/src/ir/constant.rs +++ b/cranelift/codegen/src/ir/constant.rs @@ -8,19 +8,21 @@ //! - ensuring alignment of constants within the pool, //! - bucketing constants by size. ...
7
263
272
1600dba634b35c17b74616f9ddd3220f05e2c1be
Andrew Brown
2019-09-30T21:56:03
Make ConstantData a container for any-size constant values Previously, ConstantData was a type alias for `Vec<u8>` which prevented it from having an implementation; this meant that `V128Imm` and `&[u8; 16]` were used in places that otherwise could have accepted types of different byte lengths.
diff --git a/cranelift/codegen/meta/src/cdsl/instructions.rs b/cranelift/codegen/meta/src/cdsl/instructions.rs index 0d27159cd..464aa6e24 100644 --- a/cranelift/codegen/meta/src/cdsl/instructions.rs +++ b/cranelift/codegen/meta/src/cdsl/instructions.rs @@ -734,10 +734,10 @@ pub enum FormatPredicateKind { IsZero64B...
6
113
36
5b274ed3ba033495f5af5f4a6fad86bdceb7dcdb
Benjamin Bouvier
2019-10-14T13:49:47
[bugpoint] Merge consecutive blocks (fixes #1124);
diff --git a/cranelift/Cargo.toml b/cranelift/Cargo.toml index 922993632..deef8c430 100644 --- a/cranelift/Cargo.toml +++ b/cranelift/Cargo.toml @@ -57,5 +57,6 @@ basic-blocks = ["cranelift-codegen/basic-blocks", "cranelift-frontend/basic-bloc # necessary. [profile.release] debug = true +# debug-assertions = true # ...
2
146
6