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 |
|---|---|---|---|---|---|---|---|
bc56ab743c4102ab04db2219b095f5b1ab1bcdbd | Chris Fallin | 2021-11-16T23:11:56 | ISLE build-script check logic: Canonicalize All The Things!
writeln!() to a string on Windows to generate the expected manifest
needs newline-character canonicalization, too. | diff --git a/cranelift/codegen/build.rs b/cranelift/codegen/build.rs
index adb99386c..ef045fef7 100644
--- a/cranelift/codegen/build.rs
+++ b/cranelift/codegen/build.rs
@@ -272,7 +272,7 @@ fn maybe_rebuild_isle(
// Canonicalize Windows line-endings into Unix line-endings in
// the manifest text itself... | 1 | 1 | 1 |
f787ce433d400004f34c3f0b1e34a7197fd9f349 | Alex Crichton | 2021-11-16T22:47:12 | aarch64: Remove manual sign extension in lowering (#3538)
Currently the lowering for `iconst` will sign-extend the payload value
of the `iconst` instruction itself, but the payload is already
sign-extended to this isn't necessary. This commit removes the redundant
sign extension. | diff --git a/cranelift/codegen/src/isa/aarch64/lower_inst.rs b/cranelift/codegen/src/isa/aarch64/lower_inst.rs
index 5b898ef83..c2ae72055 100644
--- a/cranelift/codegen/src/isa/aarch64/lower_inst.rs
+++ b/cranelift/codegen/src/isa/aarch64/lower_inst.rs
@@ -41,20 +41,16 @@ pub(crate) fn lower_insn_to_regs<C: LowerCtx<I ... | 1 | 5 | 9 |
37adfb898b0d97bdc6eb90af7203717b3511116f | Alex Crichton | 2021-11-15T23:03:09 | Remove deprecated `--enable-*` CLI flags (#3524)
These have all migrated to `--wasm-features *` and otherwise having some
for some features but not other features can lead to accidental
confusion. | diff --git a/src/lib.rs b/src/lib.rs
index fb9487e5a..87a44766d 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -162,38 +162,6 @@ struct CommonOptions {
#[structopt(long)]
disable_cache: bool,
- /// Enable support for proposed SIMD instructions (deprecated; use `--wasm-features=simd`)
- #[structopt(long, ... | 1 | 8 | 44 |
0b1bf104c6c0222c9358487ffebaef62b59899d9 | Nick Fitzgerald | 2021-11-15T22:53:51 | Update `miette` graphical-forcing comment to reference upstream issue | diff --git a/cranelift/codegen/build.rs b/cranelift/codegen/build.rs
index e4a287acb..47b63c50a 100644
--- a/cranelift/codegen/build.rs
+++ b/cranelift/codegen/build.rs
@@ -139,9 +139,8 @@ fn rebuild_isle(crate_dir: &std::path::Path) -> Result<(), Box<dyn std::error::E
let _ = miette::set_hook(Box::new(|_| {
... | 1 | 2 | 3 |
48ef2c0b844936d218f05df3799f28ba98114142 | Nick Fitzgerald | 2021-11-15T19:26:41 | Clarify comment about `force_graphical` in `miette` | diff --git a/cranelift/codegen/build.rs b/cranelift/codegen/build.rs
index e39feed8a..e4a287acb 100644
--- a/cranelift/codegen/build.rs
+++ b/cranelift/codegen/build.rs
@@ -139,8 +139,9 @@ fn rebuild_isle(crate_dir: &std::path::Path) -> Result<(), Box<dyn std::error::E
let _ = miette::set_hook(Box::new(|_| {
... | 1 | 3 | 2 |
6164ba38145f9f2b6b12a44d5e12c2aadcd580e4 | Nick Fitzgerald | 2021-11-15T19:17:31 | ISLE: match cranelift version | diff --git a/Cargo.lock b/Cargo.lock
index 1e6102c16..5b5e8d40c 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1431,7 +1431,7 @@ checksum = "616cde7c720bb2bb5824a224687d8f77bfd38922027f01d825cd7453be5099fb"
[[package]]
name = "isle"
-version = "0.1.0"
+version = "0.78.0"
dependencies = [
"log",
"miette",
diff --... | 3 | 3 | 3 |
f27b357702762ccd51494e2a86dd5d57ac0eaf5b | Nick Fitzgerald | 2021-11-15T19:16:24 | ISLE: update repo in Cargo.toml | diff --git a/cranelift/isle/isle/Cargo.toml b/cranelift/isle/isle/Cargo.toml
index 14d709ef0..501f75ba1 100644
--- a/cranelift/isle/isle/Cargo.toml
+++ b/cranelift/isle/isle/Cargo.toml
@@ -5,7 +5,7 @@ edition = "2018"
license = "Apache-2.0 WITH LLVM-exception"
name = "isle"
readme = "../README.md"
-repository = "htt... | 1 | 1 | 1 |
4a34d2c55b93d2f1a6e60473e651eed883196976 | Nick Fitzgerald | 2021-11-15T19:14:06 | Remove old ISLE-generated file | diff --git a/cranelift/codegen/src/isle.rs b/cranelift/codegen/src/isle.rs
deleted file mode 100644
index f8794716b..000000000
--- a/cranelift/codegen/src/isle.rs
+++ /dev/null
@@ -1,22 +0,0 @@
-// GENERATED BY ISLE. DO NOT EDIT!
-//
-// Generated automatically from the instruction-selection DSL code in:
-// - src/clif... | 1 | 0 | 22 |
ea0cb971fbe666ad4360ef8280a8f398cf224edd | Dan Gohman | 2021-11-15T18:21:13 | Update to rustix 0.26.2. (#3521)
This pulls in a fix for Android, where Android's seccomp policy on older
versions is to make `openat2` irrecoverably crash the process, so we have
to do a version check up front rather than relying on `ENOSYS` to
determine if `openat2` is supported.
And it pulls in the fix for th... | diff --git a/Cargo.lock b/Cargo.lock
index aa5d349c9..85405f14b 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -269,9 +269,9 @@ checksum = "b700ce4376041dcd0a327fd0097c41095743c4c8af8887265942faf1100bd040"
[[package]]
name = "cap-fs-ext"
-version = "0.19.1"
+version = "0.21.1"
source = "registry+https://github.com/ru... | 25 | 135 | 136 |
81f6228c574670dcdacd42e40ce53e9e1a685a15 | David Craven | 2021-11-15T17:47:02 | Fix build 32bit. (#3518)
* Fix build 32bit.
* Use ifcfg. | diff --git a/crates/environ/src/tunables.rs b/crates/environ/src/tunables.rs
index 8fbc32279..06bf96881 100644
--- a/crates/environ/src/tunables.rs
+++ b/crates/environ/src/tunables.rs
@@ -46,25 +46,26 @@ pub struct Tunables {
impl Default for Tunables {
fn default() -> Self {
+ let (static_memory_bound,... | 1 | 19 | 18 |
b6fd3d0c40c9470ee0d84c643505f2cd439f4bdc | Nick Fitzgerald | 2021-11-15T17:25:29 | Remove extra, unused `Cargo.lock` | diff --git a/cranelift/isle/Cargo.lock b/cranelift/isle/Cargo.lock
deleted file mode 100644
index 3e8e8cb49..000000000
--- a/cranelift/isle/Cargo.lock
+++ /dev/null
@@ -1,535 +0,0 @@
-# This file is automatically @generated by Cargo.
-# It is not intended for manual editing.
-version = 3
-
-[[package]]
-name = "addr2li... | 1 | 0 | 535 |
1548ca3c473a17ddae88b7ecb5216d1f82e85d64 | Alex Crichton | 2021-11-15T15:32:24 | Disable `check_label_branch_invariants` in fuzzing
This commit disables the `MachBuffer::check_label_branch_invariants`
debug check on the fuzzers due to it causing timeouts with the test case
from #3441. Fuzzing leads to a 20-30x slowdown of executed code and
locally the fuzz time it takes to instantiate #3441 drops ... | diff --git a/cranelift/codegen/src/machinst/buffer.rs b/cranelift/codegen/src/machinst/buffer.rs
index f1f2c2963..6871e8c47 100644
--- a/cranelift/codegen/src/machinst/buffer.rs
+++ b/cranelift/codegen/src/machinst/buffer.rs
@@ -334,7 +334,7 @@ impl<I: VCodeInst> MachBuffer<I> {
/// times, e.g. after calling `add_... | 1 | 1 | 1 |
ff1af204791264e2bc94b9356e425a2a609afaef | Alex Crichton | 2021-11-15T14:24:23 | Add a fuzz mode to stress unaligned wasm addresses (#3516)
Alignment on all memory instructions in wasm is currently best-effort
and not actually required, meaning that whatever wasm actually uses as
an address should work regardless of whether the address is aligned or
not. This is theoretically tested in the fuzz... | diff --git a/crates/fuzzing/src/generators.rs b/crates/fuzzing/src/generators.rs
index 10eaa8684..295ea29a4 100644
--- a/crates/fuzzing/src/generators.rs
+++ b/crates/fuzzing/src/generators.rs
@@ -12,29 +12,10 @@ pub mod api;
pub mod table_ops;
+use anyhow::Result;
use arbitrary::{Arbitrary, Unstructured};
-
-///... | 3 | 129 | 60 |
bbb4949128eff865b9a1408b896194ee9b55b1cc | Nick Fitzgerald | 2021-11-10T21:21:48 | ISLE: use `lower_to_amode` inside `sink_load` implementation | diff --git a/cranelift/codegen/src/isa/x64/lower/isle.rs b/cranelift/codegen/src/isa/x64/lower/isle.rs
index 2a4c96030..1fe15ea97 100644
--- a/cranelift/codegen/src/isa/x64/lower/isle.rs
+++ b/cranelift/codegen/src/isa/x64/lower/isle.rs
@@ -8,13 +8,12 @@ use super::{
is_mergeable_load, lower_to_amode, AluRmiROpcod... | 1 | 4 | 18 |
2053e972b7dbee48a021d46e84502376133a8b27 | Pat Hickey | 2021-11-08T15:11:31 | InstancePre can impl Clone (#3510)
Its a manually written impl, not a derive, because InstancePre<T>: Clone
does not require T: Clone.
The clone should be reasonably inexpensive: Clone for Module is just an
Arc, and Clone for Definition should also just be an Arc on the HostFunc
or Instance variants. An Instance... | diff --git a/crates/wasmtime/src/instance.rs b/crates/wasmtime/src/instance.rs
index bced7cfe4..aec6c1ba0 100644
--- a/crates/wasmtime/src/instance.rs
+++ b/crates/wasmtime/src/instance.rs
@@ -905,6 +905,17 @@ pub struct InstancePre<T> {
_marker: std::marker::PhantomData<fn() -> T>,
}
+/// InstancePre's clone d... | 1 | 11 | 0 |
7a568b19b42ddb86da156e5566bbbde98307ccb4 | Nick Fitzgerald | 2021-11-05T22:59:49 | ISLE: run `rustfmt` on generated code | diff --git a/cranelift/codegen/build.rs b/cranelift/codegen/build.rs
index 5932030fc..e39feed8a 100644
--- a/cranelift/codegen/build.rs
+++ b/cranelift/codegen/build.rs
@@ -218,9 +218,44 @@ fn rebuild_isle(crate_dir: &std::path::Path) -> Result<(), Box<dyn std::error::E
impl std::error::Error for DebugRepo... | 1 | 36 | 1 |
30d206779ec370eac8c0e2e527f44ced4aa0f912 | Nick Fitzgerald | 2021-11-05T21:28:03 | x64: Remove some unreachable code that's been ported to ISLE | diff --git a/cranelift/codegen/src/isa/x64/lower.rs b/cranelift/codegen/src/isa/x64/lower.rs
index 65e94e396..312d3423a 100644
--- a/cranelift/codegen/src/isa/x64/lower.rs
+++ b/cranelift/codegen/src/isa/x64/lower.rs
@@ -1545,20 +1545,7 @@ fn lower_insn_to_regs<C: LowerCtx<I = Inst>>(
} else if ty == types... | 1 | 1 | 14 |
00e7ca206f7051c3f41173e5e6193cedbc09fe90 | Nick Fitzgerald | 2021-11-05T21:05:38 | ISLE: add a missing type check for whether terms used in expressions have a constructor | diff --git a/cranelift/isle/isle/src/ast.rs b/cranelift/isle/isle/src/ast.rs
index 4b2aa84ca..57f257a89 100644
--- a/cranelift/isle/isle/src/ast.rs
+++ b/cranelift/isle/isle/src/ast.rs
@@ -338,6 +338,25 @@ impl Expr {
| &Expr::Let { pos, .. } => pos,
}
}
+
+ /// Call `f` for each of the te... | 2 | 42 | 0 |
6bcee7f5f7ec126c29c6b790ab8b320fdf495bf2 | Alex Crichton | 2021-11-03T21:50:49 | Add a configuration option to force "static" memories (#3503)
* Add a configuration option to force "static" memories
In poking around at some things earlier today I realized that one
configuration option for memories we haven't exposed from embeddings
like the CLI is to forcibly limit the size of memory growth a... | diff --git a/crates/runtime/src/memory.rs b/crates/runtime/src/memory.rs
index 5a69d2136..6ab2ed83f 100644
--- a/crates/runtime/src/memory.rs
+++ b/crates/runtime/src/memory.rs
@@ -90,7 +90,7 @@ pub struct MmapMemory {
impl MmapMemory {
/// Create a new linear memory instance with specified minimum and maximum ... | 4 | 49 | 5 |
6428ac80d07f2922626a8f1f266719db1580f031 | Pat Hickey | 2021-11-03T21:50:40 | `cargo update -p userfaultfd` to 0.4.2 (#3505)
which has bugfixes to work correctly on linux 5.11 and above, which is
required for github's ubuntu-latest builder as of this morning | diff --git a/Cargo.lock b/Cargo.lock
index d01762bd4..aa5d349c9 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -178,9 +178,9 @@ dependencies = [
[[package]]
name = "bindgen"
-version = "0.57.0"
+version = "0.59.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fd4865004a46a0aafb2a0a5eb1... | 1 | 50 | 12 |
c952969389ceabb812ba154675e9d4773fd55b3f | Benjamin Bouvier | 2021-11-02T17:08:30 | Remove unused dependencies (#3490)
* Remove unused dependencies in Cranelift
* add serde to the current workspace
* remove more unused dependencies in wasmtime? | diff --git a/Cargo.lock b/Cargo.lock
index e9c268349..d01762bd4 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -557,15 +557,11 @@ name = "cranelift-codegen-meta"
version = "0.78.0"
dependencies = [
"cranelift-codegen-shared",
- "cranelift-entity",
]
[[package]]
name = "cranelift-codegen-shared"
version = "0.78.0... | 18 | 2 | 59 |
93e9bb02e44aca861cb8553f9468c530dc1d9a95 | bjorn3 | 2021-11-01T17:17:57 | Review comments | diff --git a/cranelift/codegen/meta/src/cdsl/operands.rs b/cranelift/codegen/meta/src/cdsl/operands.rs
index 1d26ec362..915b8b638 100644
--- a/cranelift/codegen/meta/src/cdsl/operands.rs
+++ b/cranelift/codegen/meta/src/cdsl/operands.rs
@@ -39,12 +39,12 @@ impl Operand {
self
}
- pub fn doc(&self) ->... | 2 | 10 | 18 |
9a27fdad8693561019251313aeffc316111318b5 | Alex Crichton | 2021-11-01T14:18:11 | Update v8 used during fuzzing (#3493)
This commit updates the crate name from `rusty_v8` to `v8` as well since
the upstream bindings have sinced moved. I originally wanted to do this
to see if a fix for one of our fuzz bugs was pulled in but I don't think
the fix has been pulled in yet. Despite that it seems reason... | diff --git a/Cargo.lock b/Cargo.lock
index 9c6fc8a11..e9c268349 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2509,19 +2509,6 @@ dependencies = [
"wait-timeout",
]
-[[package]]
-name = "rusty_v8"
-version = "0.27.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "81fc062fb861b82fa7ac4... | 4 | 16 | 17 |
55f8f8ce0559517ea4c62f9cdd1da38c6631c9f0 | bjorn3 | 2021-10-31T18:56:46 | Remove a bit of dead code | diff --git a/cranelift/codegen/meta/src/cdsl/types.rs b/cranelift/codegen/meta/src/cdsl/types.rs
index 7d74d6672..3c8d8927c 100644
--- a/cranelift/codegen/meta/src/cdsl/types.rs
+++ b/cranelift/codegen/meta/src/cdsl/types.rs
@@ -6,7 +6,7 @@ use crate::shared::types as shared_types;
use cranelift_codegen_shared::consta... | 1 | 2 | 9 |
f84e1c16c74ffea46fe48f8d6583e66956cd0bdd | bjorn3 | 2021-10-31T18:27:12 | Enforce all OperandKind have documentation | diff --git a/cranelift/codegen/meta/src/cdsl/operands.rs b/cranelift/codegen/meta/src/cdsl/operands.rs
index 605df2486..1d26ec362 100644
--- a/cranelift/codegen/meta/src/cdsl/operands.rs
+++ b/cranelift/codegen/meta/src/cdsl/operands.rs
@@ -130,19 +130,15 @@ impl OperandKind {
rust_field_name: &'static str,
... | 3 | 98 | 40 |
e8f3c0c6a9f6dcc27677e0cbf0d8d09c3a322131 | bjorn3 | 2021-10-31T18:01:33 | Use InstructionFormat inside InstructionFormatBuilder | diff --git a/cranelift/codegen/meta/src/cdsl/formats.rs b/cranelift/codegen/meta/src/cdsl/formats.rs
index 299294f50..876fb7702 100644
--- a/cranelift/codegen/meta/src/cdsl/formats.rs
+++ b/cranelift/codegen/meta/src/cdsl/formats.rs
@@ -84,32 +84,26 @@ impl InstructionFormat {
}
}
-pub(crate) struct Instruction... | 2 | 14 | 30 |
2fbd57e9e21541abc2f1f724add3783a4b6f7d08 | bjorn3 | 2021-10-31T17:48:07 | Remove imm_with_name
It is only used once to rename an imm field to mask | diff --git a/cranelift/codegen/meta/src/cdsl/formats.rs b/cranelift/codegen/meta/src/cdsl/formats.rs
index 6cd20ecae..299294f50 100644
--- a/cranelift/codegen/meta/src/cdsl/formats.rs
+++ b/cranelift/codegen/meta/src/cdsl/formats.rs
@@ -122,15 +122,6 @@ impl InstructionFormatBuilder {
self
}
- pub fn... | 5 | 6 | 15 |
74261ccd791e7f83382ca8b77149c7704c6d9cca | bjorn3 | 2021-10-31T17:47:13 | Never use the first vararg as typevar operand
If an instruction only takes varargs as values, it may have no arguments
at all. | diff --git a/cranelift/codegen/meta/src/cdsl/formats.rs b/cranelift/codegen/meta/src/cdsl/formats.rs
index d445a4ed7..6cd20ecae 100644
--- a/cranelift/codegen/meta/src/cdsl/formats.rs
+++ b/cranelift/codegen/meta/src/cdsl/formats.rs
@@ -133,7 +133,7 @@ impl InstructionFormatBuilder {
pub fn typevar_operand(mut s... | 2 | 16 | 18 |
e4d42a1be4cd240937978f553c6689bff81661a7 | bjorn3 | 2021-10-31T17:11:49 | Move arg unpacking for all remaining expand functions to simple_legalize | diff --git a/cranelift/codegen/src/legalizer/globalvalue.rs b/cranelift/codegen/src/legalizer/globalvalue.rs
index 28cf96617..50974a1d8 100644
--- a/cranelift/codegen/src/legalizer/globalvalue.rs
+++ b/cranelift/codegen/src/legalizer/globalvalue.rs
@@ -4,7 +4,6 @@
//! instruction into code that depends on the kind of ... | 4 | 38 | 82 |
ce3175993a751f8e1e3133f8566da5d9b6e81f7c | bjorn3 | 2021-10-31T17:00:39 | Inline expand_br_icmp, expand_stack_load and expand_stack_store | diff --git a/cranelift/codegen/src/legalizer/mod.rs b/cranelift/codegen/src/legalizer/mod.rs
index a9a8022d4..a186337c6 100644
--- a/cranelift/codegen/src/legalizer/mod.rs
+++ b/cranelift/codegen/src/legalizer/mod.rs
@@ -40,9 +40,24 @@ pub fn simple_legalize(func: &mut ir::Function, cfg: &mut ControlFlowGraph, isa:
... | 1 | 49 | 100 |
96b14ed8eb516efa7f165ec8f281dc55a3b74f03 | bjorn3 | 2021-10-31T16:52:43 | Match on InstructionData instead of Opcode
This should be faster by avoiding matching on InstructionData to get the
Opcode, then on Opcode and then finally on the InstructionData again to
get the arguments | diff --git a/cranelift/codegen/src/legalizer/mod.rs b/cranelift/codegen/src/legalizer/mod.rs
index b09d1c601..a9a8022d4 100644
--- a/cranelift/codegen/src/legalizer/mod.rs
+++ b/cranelift/codegen/src/legalizer/mod.rs
@@ -16,7 +16,7 @@
use crate::cursor::{Cursor, FuncCursor};
use crate::flowgraph::ControlFlowGraph;
u... | 1 | 177 | 82 |
795e381be4b748da111ffd0a840202e462d64fb8 | Philipp Oppermann | 2021-10-29T19:01:41 | Fix typo: profilng -> profiling (#3492) | diff --git a/crates/wasmtime/src/lib.rs b/crates/wasmtime/src/lib.rs
index 75e3b1f11..5b743f929 100644
--- a/crates/wasmtime/src/lib.rs
+++ b/crates/wasmtime/src/lib.rs
@@ -259,7 +259,7 @@
//! asynchronously.
//!
//! * `jitdump` - Enabled by default, this feature compiles in support for the
-//! jitdump runtime ... | 1 | 1 | 1 |
d49b83fcc45c0894161e2e0ee9ec9b4432c9723a | Philipp Oppermann | 2021-10-29T18:36:10 | Small comma fix in crate docs (#3491) | diff --git a/crates/wasmtime/src/lib.rs b/crates/wasmtime/src/lib.rs
index 7b6a09686..75e3b1f11 100644
--- a/crates/wasmtime/src/lib.rs
+++ b/crates/wasmtime/src/lib.rs
@@ -198,7 +198,7 @@
//! designed to be as cheap as possible.
//!
//! With an [`Instance`] you can then invoke various exports and interact with
-//!... | 1 | 1 | 1 |
91d4f36970a86f7ce401e0e3e847dff8a118babb | bjorn3 | 2021-10-27T11:23:29 | Move generate_table from cranelift-codegen-shared to cranelift-codegen-meta | diff --git a/cranelift/codegen/meta/src/constant_hash.rs b/cranelift/codegen/meta/src/constant_hash.rs
new file mode 100644
index 000000000..bb1d4c71f
--- /dev/null
+++ b/cranelift/codegen/meta/src/constant_hash.rs
@@ -0,0 +1,64 @@
+//! Build support for precomputed constant hash tables.
+//!
+//! This module can gener... | 5 | 73 | 66 |
c26197ef8c6e78bd41ea76cd5235a7fb78c95e32 | Alex Crichton | 2021-10-28T19:39:06 | Fix the publish script to ignore witx more (#3486)
This failed on CI [1] I think because the filesystem is traversed
differently than on my local system. This is relatively easily fixable
though where we shouldn't care about witx version when bumping version
requirements since we don't manage the publication of wit... | diff --git a/scripts/publish.rs b/scripts/publish.rs
index 848d31991..e4aa34224 100644
--- a/scripts/publish.rs
+++ b/scripts/publish.rs
@@ -270,6 +270,12 @@ fn bump_version(krate: &Crate, crates: &[Crate], patch: bool) {
};
for other in crates {
+ // If `other` isn't a published crate th... | 1 | 6 | 0 |
8aa8dfe26a7b6f03c943c0f55a259e34eb58a408 | Nick Fitzgerald | 2021-10-26T17:19:27 | cranelift: in `test_compile` filetest, log disasm not clif
With the old backends, this would log the lowered+legalized clif, but the log is
useles now with the new backends. Logging the disasm is the new moral
equivalent. | diff --git a/cranelift/filetests/src/test_compile.rs b/cranelift/filetests/src/test_compile.rs
index c0115f3d4..0426e3671 100644
--- a/cranelift/filetests/src/test_compile.rs
+++ b/cranelift/filetests/src/test_compile.rs
@@ -44,12 +44,6 @@ impl SubTest for TestCompile {
.compile(isa)
.map_err(... | 1 | 3 | 6 |
7962fe3f439856dd158ba61568a198d85c850afe | Pat Hickey | 2021-10-26T14:06:45 | update tracing-subscriber (#3473)
which gets rid of the transitive dep on `chrono` that was affected by
`RUSTSEC-2020-0159`. | diff --git a/Cargo.lock b/Cargo.lock
index 92eaf12aa..361fed14b 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -420,18 +420,6 @@ dependencies = [
"zeroize",
]
-[[package]]
-name = "chrono"
-version = "0.4.19"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "670ad68c9088c2a963aaa298cb3696... | 3 | 6 | 48 |
490d49a7688db4e1e91a983c808650ef5b667824 | Alex Crichton | 2021-10-26T14:06:03 | Adjust dependency directives between crates (#3420)
* Adjust dependency directives between crates
This commit is a preparation for the release process for Wasmtime. The
specific changes here are to delineate which crates are "public", and
all version requirements on non-public crates will now be done with
`=A.B.... | diff --git a/Cargo.lock b/Cargo.lock
index 5631a2d6c..92eaf12aa 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -3488,7 +3488,6 @@ dependencies = [
"wasmtime-cranelift",
"wasmtime-environ",
"wasmtime-fuzzing",
- "wasmtime-jit",
"wasmtime-runtime",
"wasmtime-wasi",
"wasmtime-wasi-crypto",
@@ -3678,7 +3677,6 @@ d... | 20 | 100 | 50 |
e3a423c3e83ee6000efe2732d994786d2893dbb2 | Nick Fitzgerald | 2021-10-25T22:51:55 | Remove some uses of `foo.expect(&format!(...))` pattern
This eagerly evaluates the `format!` and produces a `String` with a heap
allocation, regardless whether `foo` is `Some`/`Ok` or `None`/`Err`. Using
`foo.unwrap_or_else(|| panic!(...))` makes it so that the error message
formatting is only evaluated if `foo` is `N... | diff --git a/benches/instantiation.rs b/benches/instantiation.rs
index 43553d664..8236fbd02 100644
--- a/benches/instantiation.rs
+++ b/benches/instantiation.rs
@@ -43,7 +43,7 @@ fn bench_sequential(c: &mut Criterion, modules: &[&str]) {
let engine = Engine::new(&config).expect("failed to create engine")... | 3 | 10 | 8 |
2f2c5231b46d14c1c9a9fef37c0df880d05c5d49 | Alex Crichton | 2021-10-25T17:04:31 | Add Alex's solution for null handling in TlsRestore | diff --git a/crates/runtime/src/traphandlers.rs b/crates/runtime/src/traphandlers.rs
index 3a1bfac8e..af60c2f4c 100644
--- a/crates/runtime/src/traphandlers.rs
+++ b/crates/runtime/src/traphandlers.rs
@@ -431,9 +431,12 @@ mod tls {
// null out our own previous field for safety in case it's
// ... | 1 | 11 | 3 |
e9c4164b94705510ebad5e6b636a012c38c7b652 | Anton Kirilov | 2021-09-23T14:10:22 | Call membarrier() after making JIT mappings executable on AArch64 Linux
The membarrier() system call ensures that no processor has fetched
a stale instruction stream.
Copyright (c) 2021, Arm Limited. | diff --git a/cranelift/jit/src/backend.rs b/cranelift/jit/src/backend.rs
index d7d092d25..44c766ed2 100644
--- a/cranelift/jit/src/backend.rs
+++ b/cranelift/jit/src/backend.rs
@@ -428,6 +428,14 @@ impl JITModule {
self.memory.readonly.set_readonly();
self.memory.code.set_readable_and_executable();
... | 2 | 35 | 0 |
fb549c6ddb7136403f699b6426c90c854f1c97d0 | Pat Hickey | 2021-10-22T23:12:07 | actually do some awaiting in the async limiter, which doesnt work
something tls-related is not right | diff --git a/tests/all/limits.rs b/tests/all/limits.rs
index 04cb0f576..1515197ff 100644
--- a/tests/all/limits.rs
+++ b/tests/all/limits.rs
@@ -510,6 +510,8 @@ impl ResourceLimiterAsync for MemoryContext {
desired: usize,
maximum: Option<usize>,
) -> bool {
+ // Show we can await in this ... | 1 | 4 | 0 |
5f978dbfddd07c8facb97c90196b1a6c971c9521 | Pat Hickey | 2021-10-22T21:03:04 | make feature requirement render in rustdoc for new apis | diff --git a/crates/wasmtime/src/externals.rs b/crates/wasmtime/src/externals.rs
index a35216eb0..047291ba3 100644
--- a/crates/wasmtime/src/externals.rs
+++ b/crates/wasmtime/src/externals.rs
@@ -444,6 +444,7 @@ impl Table {
Table::_new(store.as_context_mut().0, ty, init)
}
+ #[cfg_attr(nightlydoc, ... | 3 | 5 | 0 |
681945908213a61ff137f5b607a9fa25b49ad6b9 | Pat Hickey | 2021-10-22T19:00:56 | fix all docs links | diff --git a/crates/wasmtime/src/externals.rs b/crates/wasmtime/src/externals.rs
index d75b11c6c..a35216eb0 100644
--- a/crates/wasmtime/src/externals.rs
+++ b/crates/wasmtime/src/externals.rs
@@ -408,9 +408,11 @@ impl Table {
///
/// # Panics
///
- /// This function will panic when used with a [`Stor... | 4 | 55 | 34 |
bcbd74678a484d5b568b699a4b80c165404e9b4d | Pat Hickey | 2021-10-22T18:08:09 | add some tests that show behavior is the same when on wasm stack | diff --git a/tests/all/limits.rs b/tests/all/limits.rs
index 05585657e..04cb0f576 100644
--- a/tests/all/limits.rs
+++ b/tests/all/limits.rs
@@ -8,7 +8,12 @@ fn test_limits() -> Result<()> {
let engine = Engine::default();
let module = Module::new(
&engine,
- r#"(module (memory (export "m") 0)... | 1 | 86 | 1 |
b00d811e83c518917284c5860f848eb7fb2f53fc | Pat Hickey | 2021-10-22T17:43:46 | code review | diff --git a/crates/runtime/src/libcalls.rs b/crates/runtime/src/libcalls.rs
index 1c648f0bf..8d5130950 100644
--- a/crates/runtime/src/libcalls.rs
+++ b/crates/runtime/src/libcalls.rs
@@ -195,13 +195,11 @@ pub unsafe extern "C" fn wasmtime_memory32_grow(
match std::panic::catch_unwind(|| {
let instance =... | 2 | 9 | 15 |
52542b6c01f8fb6c9aa025deb4a93242861737f6 | Pat Hickey | 2021-10-22T15:54:42 | mock enough of the store to pass the uffd test | diff --git a/crates/runtime/src/instance/allocator/pooling/uffd.rs b/crates/runtime/src/instance/allocator/pooling/uffd.rs
index bc5fda170..df6f18f13 100644
--- a/crates/runtime/src/instance/allocator/pooling/uffd.rs
+++ b/crates/runtime/src/instance/allocator/pooling/uffd.rs
@@ -436,7 +436,7 @@ mod test {
use sup... | 1 | 54 | 2 |
efef0769fe0edf337224275529566404c10b858c | Pat Hickey | 2021-10-22T15:39:00 | make uffd test compile, but not pass | diff --git a/crates/runtime/src/instance/allocator/pooling/uffd.rs b/crates/runtime/src/instance/allocator/pooling/uffd.rs
index e82f932eb..bc5fda170 100644
--- a/crates/runtime/src/instance/allocator/pooling/uffd.rs
+++ b/crates/runtime/src/instance/allocator/pooling/uffd.rs
@@ -436,7 +436,7 @@ mod test {
use sup... | 1 | 2 | 2 |
da51fae4c331f6a3bdd7926573b7514767e51a27 | Michael Chesser | 2021-10-21T23:08:08 | Rename executable to already_protected | diff --git a/cranelift/jit/src/memory.rs b/cranelift/jit/src/memory.rs
index 3a001ac59..5adde6d3d 100644
--- a/cranelift/jit/src/memory.rs
+++ b/cranelift/jit/src/memory.rs
@@ -109,7 +109,7 @@ impl Drop for PtrLen {
/// program's life.
pub(crate) struct Memory {
allocations: Vec<PtrLen>,
- executable: usize,
... | 1 | 9 | 9 |
61ecccf306e6964a918118c4eb12ddf64309a038 | Michael Chesser | 2021-05-24T23:49:15 | Avoid updating memory protection on allocations that have the right protection. | diff --git a/cranelift/jit/src/memory.rs b/cranelift/jit/src/memory.rs
index 0aab70743..3a001ac59 100644
--- a/cranelift/jit/src/memory.rs
+++ b/cranelift/jit/src/memory.rs
@@ -179,6 +179,8 @@ impl Memory {
}
}
}
+
+ self.executable = self.allocations.len();
}
/... | 1 | 5 | 0 |
0370d5c1a25c502f45dde10acf2b02968df80b6e | Pat Hickey | 2021-10-21T23:46:31 | code review suggestion | diff --git a/crates/runtime/src/libcalls.rs b/crates/runtime/src/libcalls.rs
index 9aba075bc..1c648f0bf 100644
--- a/crates/runtime/src/libcalls.rs
+++ b/crates/runtime/src/libcalls.rs
@@ -190,7 +190,9 @@ pub unsafe extern "C" fn wasmtime_memory32_grow(
delta: u64,
memory_index: u32,
) -> usize {
- std::p... | 1 | 14 | 8 |
175e72bac40f2a89de457195150978b54b9cfbc8 | Pat Hickey | 2021-10-21T23:43:13 | test that the catch unwind works | diff --git a/tests/all/limits.rs b/tests/all/limits.rs
index a41a2ba88..05585657e 100644
--- a/tests/all/limits.rs
+++ b/tests/all/limits.rs
@@ -89,7 +89,6 @@ async fn test_limits_async() -> Result<()> {
) -> bool {
desired <= self.memory_size
}
- fn memory_grow_failed(&mut self, _... | 1 | 106 | 3 |
3fd674c6bc824ffe35592c878b75052b7bfb1a04 | Pat Hickey | 2021-10-21T23:36:37 | async memory_grow_failed can have a default impl
idk why this didnt work in the old factoring! but im glad it does | diff --git a/crates/wasmtime/src/limits.rs b/crates/wasmtime/src/limits.rs
index 02d6fcd81..7ca9cb07f 100644
--- a/crates/wasmtime/src/limits.rs
+++ b/crates/wasmtime/src/limits.rs
@@ -104,7 +104,7 @@ pub trait ResourceLimiterAsync {
) -> bool;
/// Identical to [`ResourceLimiter::memory_grow_failed`]
- f... | 1 | 1 | 1 |
758abe39633081cc5a45719535a195d6f2a93a5a | Pat Hickey | 2021-10-21T22:50:01 | add table limiting tests | diff --git a/tests/all/limits.rs b/tests/all/limits.rs
index 92a960fa4..a41a2ba88 100644
--- a/tests/all/limits.rs
+++ b/tests/all/limits.rs
@@ -399,7 +399,7 @@ impl ResourceLimiter for MemoryContext {
}
#[test]
-fn test_custom_limiter() -> Result<()> {
+fn test_custom_memory_limiter() -> Result<()> {
let engi... | 1 | 179 | 34 |
538c19589bf2f27e35a1a32d093b69169b692468 | Pat Hickey | 2021-10-21T22:21:05 | build out async versions of the existing limiter tests | diff --git a/tests/all/limits.rs b/tests/all/limits.rs
index c19ab4b04..92a960fa4 100644
--- a/tests/all/limits.rs
+++ b/tests/all/limits.rs
@@ -478,6 +478,118 @@ fn test_custom_limiter() -> Result<()> {
Ok(())
}
+#[async_trait::async_trait]
+impl ResourceLimiterAsync for MemoryContext {
+ async fn memory_gr... | 1 | 192 | 0 |
a1301f8dae96012adcf9a756ee5009bd5949f3cc | Pat Hickey | 2021-10-21T22:07:40 | add table_grow_failed | diff --git a/crates/runtime/src/lib.rs b/crates/runtime/src/lib.rs
index 4f531d422..6fc8e66c3 100644
--- a/crates/runtime/src/lib.rs
+++ b/crates/runtime/src/lib.rs
@@ -90,24 +90,28 @@ pub unsafe trait Store {
&mut self,
) -> (&mut VMExternRefActivationsTable, &dyn ModuleInfoLookup);
- /// Callback i... | 4 | 40 | 9 |
c0a1af94cfd2a33aa6c0e52d18fc5661baa0f9d8 | Pat Hickey | 2021-10-21T22:07:32 | fix trap behavior | diff --git a/crates/wasmtime/src/trap.rs b/crates/wasmtime/src/trap.rs
index 61da2dcce..39f557dcf 100644
--- a/crates/wasmtime/src/trap.rs
+++ b/crates/wasmtime/src/trap.rs
@@ -385,7 +385,10 @@ impl std::error::Error for Trap {
impl From<anyhow::Error> for Trap {
fn from(e: anyhow::Error) -> Trap {
- Box... | 1 | 4 | 1 |
252ba39c27c8fe3e88488391b7c8189f53e4cc0f | Pat Hickey | 2021-10-21T21:15:53 | implement table _async methods, test passes now | diff --git a/crates/wasmtime/src/externals.rs b/crates/wasmtime/src/externals.rs
index d267bf14a..686b15447 100644
--- a/crates/wasmtime/src/externals.rs
+++ b/crates/wasmtime/src/externals.rs
@@ -436,6 +436,31 @@ impl Table {
Table::_new(store.as_context_mut().0, ty, init)
}
+ /// Async variant of [... | 2 | 58 | 6 |
5aef8f47c8993c354fb285561fcb9c206f477e7a | Pat Hickey | 2021-10-21T19:15:00 | catch panic in libcalls for memory and table grow | diff --git a/crates/runtime/src/libcalls.rs b/crates/runtime/src/libcalls.rs
index 067e0b850..9aba075bc 100644
--- a/crates/runtime/src/libcalls.rs
+++ b/crates/runtime/src/libcalls.rs
@@ -59,7 +59,7 @@
use crate::externref::VMExternRef;
use crate::instance::Instance;
use crate::table::{Table, TableElementType};
-us... | 1 | 33 | 25 |
d3deaae99d900ff830952f8e75ef2eb61affe568 | Pat Hickey | 2021-10-21T19:09:18 | collapse some common code | diff --git a/crates/wasmtime/src/instance.rs b/crates/wasmtime/src/instance.rs
index b2cf6affa..bced7cfe4 100644
--- a/crates/wasmtime/src/instance.rs
+++ b/crates/wasmtime/src/instance.rs
@@ -126,6 +126,11 @@ impl Instance {
typecheck_externs(store.0, module, imports)?;
Instantiator::new(stor... | 1 | 22 | 36 |
6c70b81ff55fc8dff574dccd0408fccff7d404bc | Pat Hickey | 2021-10-21T19:04:20 | review feedback | diff --git a/crates/runtime/src/instance/allocator.rs b/crates/runtime/src/instance/allocator.rs
index fead13946..abcb94b11 100644
--- a/crates/runtime/src/instance/allocator.rs
+++ b/crates/runtime/src/instance/allocator.rs
@@ -97,10 +97,10 @@ impl StorePtr {
self.0.clone()
}
/// Use the StorePtr as... | 3 | 21 | 13 |
abbe28d833d1a869384ec00b74af35cafc4766dc | Pat Hickey | 2021-10-21T18:53:55 | propogate changes to use anyhow::Error instead of Box<dyn Error...> | diff --git a/crates/wasmtime/src/externals.rs b/crates/wasmtime/src/externals.rs
index 8f3d7e164..d267bf14a 100644
--- a/crates/wasmtime/src/externals.rs
+++ b/crates/wasmtime/src/externals.rs
@@ -551,7 +551,7 @@ impl Table {
let init = init.into_table_element(store, ty)?;
let table = self.wasmtime_ta... | 5 | 30 | 42 |
a5007f318ffa0d6331fe4926e3008c999f606908 | Pat Hickey | 2021-10-21T18:36:48 | runtime: use anyhow::Error instead of Box<dyn std::error::Error...> | diff --git a/crates/runtime/src/instance.rs b/crates/runtime/src/instance.rs
index 3bff9803e..64afecd76 100644
--- a/crates/runtime/src/instance.rs
+++ b/crates/runtime/src/instance.rs
@@ -12,6 +12,7 @@ use crate::vmcontext::{
VMInterrupts, VMMemoryDefinition, VMMemoryImport, VMTableDefinition, VMTableImport,
};
... | 6 | 81 | 57 |
2225722373be5bf56335d7664459a7bd76f2d7d5 | Pat Hickey | 2021-10-21T01:34:26 | Memory::new_async, grow_async now work! | diff --git a/crates/wasmtime/src/instance.rs b/crates/wasmtime/src/instance.rs
index e11971739..b2cf6affa 100644
--- a/crates/wasmtime/src/instance.rs
+++ b/crates/wasmtime/src/instance.rs
@@ -503,19 +503,19 @@ impl<'a> Instantiator<'a> {
// NB: this is the same code as `run`. It's intentionally
// ... | 3 | 53 | 17 |
adf7521e30c3c2d57e5914500f801be95693e5ca | Pat Hickey | 2021-10-21T00:26:59 | introduce a failing test | diff --git a/tests/all/limits.rs b/tests/all/limits.rs
index 7e1b30390..dab154279 100644
--- a/tests/all/limits.rs
+++ b/tests/all/limits.rs
@@ -65,6 +65,96 @@ fn test_limits() -> Result<()> {
Ok(())
}
+#[tokio::test]
+async fn test_limits_async() -> Result<()> {
+ let mut config = Config::new();
+ config... | 1 | 90 | 0 |
67a6c27e225ba6c54b1be1c4eb1902857d6d75b0 | Pat Hickey | 2021-10-20T23:53:24 | pooling needs the store earlier | diff --git a/crates/runtime/src/instance/allocator.rs b/crates/runtime/src/instance/allocator.rs
index 0826eecd8..fead13946 100644
--- a/crates/runtime/src/instance/allocator.rs
+++ b/crates/runtime/src/instance/allocator.rs
@@ -92,12 +92,10 @@ impl StorePtr {
pub fn new(ptr: *mut dyn Store) -> Self {
Sel... | 2 | 10 | 6 |
18a355e0926ffcaf7bb88aa878a644d0e3110f8e | Pat Hickey | 2021-09-28T19:21:13 | give sychronous ResourceLimiter an async alternative | diff --git a/Cargo.lock b/Cargo.lock
index 8c73ff954..5631a2d6c 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -108,9 +108,9 @@ dependencies = [
[[package]]
name = "async-trait"
-version = "0.1.50"
+version = "0.1.51"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0b98e84bbb4cbcdd97da19... | 19 | 373 | 236 |
472b1b2e8a2b4782f260440e2237907f065e38bc | Chris Fallin | 2021-10-21T19:07:39 | Avoid quadratic behavior in pathological label-alias case in MachBuffer.
Fixes #3468.
If a program has many instances of the pattern "goto next; next:" in a
row (i.e., no-op branches to the fallthrough address), the branch
simplification in `MachBuffer` would remove them all, as expected.
However, in order to work co... | diff --git a/cranelift/codegen/src/machinst/buffer.rs b/cranelift/codegen/src/machinst/buffer.rs
index 0702ee37b..f1f2c2963 100644
--- a/cranelift/codegen/src/machinst/buffer.rs
+++ b/cranelift/codegen/src/machinst/buffer.rs
@@ -250,8 +250,12 @@ pub struct MachBufferFinalized {
pub unwind_info: SmallVec<[(CodeOffs... | 1 | 24 | 2 |
afd10646c9574ac979f82658eb3c3d9e361ed216 | Adam Bratschi-Kaye | 2021-10-20T21:31:53 | List exports of an instance in linking error (#3456)
When there is a linking error caused by an undefined instance, list all
the instances exports in the error message. This will clarify errors for
undefined two-level imports that get desugared to one-level instance
imports under the module-linking proposal. | diff --git a/crates/wasmtime/src/linker.rs b/crates/wasmtime/src/linker.rs
index 9eb91506e..0ea313dd0 100644
--- a/crates/wasmtime/src/linker.rs
+++ b/crates/wasmtime/src/linker.rs
@@ -5,7 +5,7 @@ use crate::{
AsContextMut, Caller, Engine, Extern, ExternType, Func, FuncType, ImportType, Instance,
IntoFunc, Mo... | 2 | 44 | 21 |
fb585fde40a384fe5bdda0c8ec14c60d5413c9dc | Alex Crichton | 2021-10-20T16:25:52 | Update the `wast` crate dependency (#3464)
Pulls in a few minor fixes for stack overflows with module linking as
well as some updates to other various wasm proposals. | diff --git a/Cargo.lock b/Cargo.lock
index b5ece2f17..223ffabc9 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -561,7 +561,7 @@ dependencies = [
"smallvec",
"souper-ir",
"target-lexicon",
- "wast 37.0.0",
+ "wast 38.0.1",
]
[[package]]
@@ -1933,7 +1933,7 @@ dependencies = [
"peepmatic-test-operator",
"peepma... | 10 | 23 | 23 |
e2a724ce182a5cc90f4b6c7b913ce8087235eed2 | Alex Crichton | 2021-10-20T15:52:06 | Update the `object` crate to 0.27.0 (#3465)
Mostly just keeping us up to date with changes there since we somewhat
heavily rely on it now. | diff --git a/Cargo.lock b/Cargo.lock
index 118d6600f..b5ece2f17 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -142,9 +142,9 @@ checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a"
[[package]]
name = "backtrace"
-version = "0.3.61"
+version = "0.3.62"
source = "registry+https://github.com/rus... | 12 | 25 | 29 |
e8d3b8e3ea3733b1012aedc08d7c52cbce5a80cd | Alex Crichton | 2021-10-19T18:19:20 | Fix an off-by-two condition in heap legalization (#3462)
This commit fixes an issue in Cranelift where legalization of
`heap_addr` instructions (used by wasm to represent heap accesses) could
be off-by-two where loads that should be valid were actually treated as
invalid. The bug here happened in an optimization wh... | diff --git a/cranelift/codegen/src/legalizer/heap.rs b/cranelift/codegen/src/legalizer/heap.rs
index 5239c67da..f423632a6 100644
--- a/cranelift/codegen/src/legalizer/heap.rs
+++ b/cranelift/codegen/src/legalizer/heap.rs
@@ -157,10 +157,20 @@ fn static_addr(
let mut spectre_oob_comparison = None;
offset = cas... | 2 | 50 | 3 |
1a5fa3ed3f3bf5c211b9b6b2bcca85de3c6e4eeb | Alex Crichton | 2021-10-15T15:40:42 | Enable stable wasm features for spectest fuzzing (#3454)
These are now required for the general suite of spec tests we're running
by default. | diff --git a/crates/fuzzing/src/oracles.rs b/crates/fuzzing/src/oracles.rs
index bf7af0263..9cfec7cfb 100644
--- a/crates/fuzzing/src/oracles.rs
+++ b/crates/fuzzing/src/oracles.rs
@@ -497,8 +497,6 @@ pub fn spectest(fuzz_config: crate::generators::Config, test: crate::generators:
log::debug!("running {:?} with {:... | 1 | 0 | 2 |
f2276995362c784a8f64508fc17fd6ef5f581845 | Chris Fallin | 2021-11-12T00:00:12 | Make ISLE part of the root Cargo workspace. | diff --git a/Cargo.lock b/Cargo.lock
index aa5d349c9..2f8b1a433 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -462,7 +462,7 @@ dependencies = [
"atty",
"bitflags",
"strsim",
- "textwrap",
+ "textwrap 0.11.0",
"unicode-width",
"vec_map",
]
@@ -1094,6 +1094,15 @@ dependencies = [
"termcolor",
]
+[[package]]... | 3 | 158 | 17 |
4c61c96c3ff921a69c715bce0ccacf441d3e6ecc | Nick Fitzgerald | 2021-11-04T20:33:26 | Add Cargo.toml metadata | diff --git a/cranelift/isle/isle/Cargo.toml b/cranelift/isle/isle/Cargo.toml
index 0e684bc56..5c7acee3a 100644
--- a/cranelift/isle/isle/Cargo.toml
+++ b/cranelift/isle/isle/Cargo.toml
@@ -1,9 +1,12 @@
[package]
-name = "isle"
-version = "0.1.0"
authors = ["Chris Fallin <chris@cfallin.org>", "Nick Fitzgerald <fitzgen... | 1 | 5 | 2 |
e23564700da8eec36910d885cffff739ba3fc8b9 | Nick Fitzgerald | 2021-11-04T20:30:56 | Add myself as a second author | diff --git a/cranelift/isle/isle/Cargo.toml b/cranelift/isle/isle/Cargo.toml
index dec314540..0e684bc56 100644
--- a/cranelift/isle/isle/Cargo.toml
+++ b/cranelift/isle/isle/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "isle"
version = "0.1.0"
-authors = ["Chris Fallin <chris@cfallin.org>"]
+authors = ["Chris Fallin ... | 1 | 1 | 1 |
bd8c7faf1222320560083664b259a1070884287c | Nick Fitzgerald | 2021-11-02T22:15:07 | Add support for hex integer literals | diff --git a/cranelift/isle/isle/src/lexer.rs b/cranelift/isle/isle/src/lexer.rs
index a8f9f9d93..e9a4e7b06 100644
--- a/cranelift/isle/isle/src/lexer.rs
+++ b/cranelift/isle/isle/src/lexer.rs
@@ -248,21 +248,48 @@ impl<'a> Lexer<'a> {
} else {
false
};
- ... | 1 | 36 | 9 |
8f5dffab72c0824ee3738d1cdbb846014615d392 | Nick Fitzgerald | 2021-11-01T20:55:28 | Add better error messages for duplicate term declarations | diff --git a/cranelift/isle/isle/src/sema.rs b/cranelift/isle/isle/src/sema.rs
index 3e650ad3f..0aae69a2b 100644
--- a/cranelift/isle/isle/src/sema.rs
+++ b/cranelift/isle/isle/src/sema.rs
@@ -198,6 +198,8 @@ pub struct TermEnv {
pub struct Term {
/// This term's id.
pub id: TermId,
+ /// The source posit... | 1 | 9 | 1 |
22e18a9d985173cfe4f5a5bf59a5fab960a48c6c | Nick Fitzgerald | 2021-10-26T21:35:04 | Remove `eprintln!`s that shouldn't have been committed | diff --git a/cranelift/isle/isle/src/codegen.rs b/cranelift/isle/isle/src/codegen.rs
index 103c58eda..74874b6a1 100644
--- a/cranelift/isle/isle/src/codegen.rs
+++ b/cranelift/isle/isle/src/codegen.rs
@@ -729,7 +729,6 @@ impl<'a> Codegen<'a> {
// (possibly an empty one). Only use a `match` form if ... | 1 | 0 | 6 |
037db8aab695d3f6fb1c8818ee4520bd9baf220d | Nick Fitzgerald | 2021-10-26T21:32:22 | Make sure that infallible match operations come after fallible ones
Eventually we will probably want to sort by a partial ordering based on pattern
subsumption to break ties between rules with the same priority. This local
heuristic of making sure infallibilty comes last is good enough for now and
handles the cases we... | diff --git a/cranelift/isle/isle/src/codegen.rs b/cranelift/isle/isle/src/codegen.rs
index 696830228..103c58eda 100644
--- a/cranelift/isle/isle/src/codegen.rs
+++ b/cranelift/isle/isle/src/codegen.rs
@@ -651,7 +651,7 @@ impl<'a> Codegen<'a> {
indent: &str,
ctx: &mut BodyContext,
) -> bool {
- ... | 2 | 43 | 25 |
6c6b7a2b787fac372b014395d325aac2d66d24d0 | Nick Fitzgerald | 2021-10-26T20:33:01 | Add a method to pretty-print a trie | diff --git a/cranelift/isle/isle/src/trie.rs b/cranelift/isle/isle/src/trie.rs
index 768212b27..5acb08b0a 100644
--- a/cranelift/isle/isle/src/trie.rs
+++ b/cranelift/isle/isle/src/trie.rs
@@ -473,6 +473,36 @@ impl TrieNode {
}
}
}
+
+ /// Get a pretty-printed version of this trie, for deb... | 1 | 30 | 0 |
0411b208713ab44f1f4683db742e982e7f4ca45b | Nick Fitzgerald | 2021-10-22T21:40:26 | Fix `allow` declaration | diff --git a/cranelift/isle/isle/src/codegen.rs b/cranelift/isle/isle/src/codegen.rs
index 844d5c8b4..696830228 100644
--- a/cranelift/isle/isle/src/codegen.rs
+++ b/cranelift/isle/isle/src/codegen.rs
@@ -71,7 +71,7 @@ impl<'a> Codegen<'a> {
"#![allow(unused_imports, unused_variables, non_snake_case)]"
... | 1 | 1 | 1 |
7fab7c5eab1033e99e444a2ed12953d572e53044 | Nick Fitzgerald | 2021-10-22T21:37:43 | Emit `if let`s against `Option<x>` instead of `Option<(x,)>` | diff --git a/cranelift/isle/isle/src/codegen.rs b/cranelift/isle/isle/src/codegen.rs
index 1b63ea3fc..844d5c8b4 100644
--- a/cranelift/isle/isle/src/codegen.rs
+++ b/cranelift/isle/isle/src/codegen.rs
@@ -575,11 +575,13 @@ impl<'a> Codegen<'a> {
} else {
writeln!(
... | 1 | 7 | 5 |
0c6956376ba63b76a2f4fb6b4aad3b18b2d35573 | Nick Fitzgerald | 2021-10-22T21:37:20 | Allow irrefutable let patterns in the generated code | diff --git a/cranelift/isle/isle/src/codegen.rs b/cranelift/isle/isle/src/codegen.rs
index 5f4619e47..1b63ea3fc 100644
--- a/cranelift/isle/isle/src/codegen.rs
+++ b/cranelift/isle/isle/src/codegen.rs
@@ -71,6 +71,7 @@ impl<'a> Codegen<'a> {
"#![allow(unused_imports, unused_variables, non_snake_case)]"
... | 1 | 1 | 0 |
e015a49270e3d3993eed088c6fcbcb45ff424ad0 | Nick Fitzgerald | 2021-10-13T20:46:45 | Do not use 1-member tuples in external constructor/extractor trait methods
Just use the single member type directly. | diff --git a/cranelift/isle/isle/src/codegen.rs b/cranelift/isle/isle/src/codegen.rs
index ba168803b..5f4619e47 100644
--- a/cranelift/isle/isle/src/codegen.rs
+++ b/cranelift/isle/isle/src/codegen.rs
@@ -78,22 +78,24 @@ impl<'a> Codegen<'a> {
fn generate_trait_sig(&self, code: &mut String, indent: &str, sig: &Ext... | 1 | 22 | 14 |
0e02ec4cbac32c45693b80a477c3538cafc5e514 | Nick Fitzgerald | 2021-10-12T18:04:17 | Use `BTree{Map,Set}` instead of `Hash{Map,Set}` to ensure deterministic output
Fixes #8 | diff --git a/cranelift/isle/isle/src/codegen.rs b/cranelift/isle/isle/src/codegen.rs
index ca983d922..ba168803b 100644
--- a/cranelift/isle/isle/src/codegen.rs
+++ b/cranelift/isle/isle/src/codegen.rs
@@ -4,11 +4,11 @@ use crate::ir::{ExprInst, InstId, PatternInst, Value};
use crate::sema::ExternalSig;
use crate::sem... | 4 | 82 | 71 |
efe7df7f45f585278feb41a13ce73d3916d24b4c | Nick Fitzgerald | 2021-10-11T18:32:49 | Keep track of where primitives are defined for better error messages | diff --git a/cranelift/isle/isle/src/codegen.rs b/cranelift/isle/isle/src/codegen.rs
index 32e291a4d..ca983d922 100644
--- a/cranelift/isle/isle/src/codegen.rs
+++ b/cranelift/isle/isle/src/codegen.rs
@@ -173,7 +173,7 @@ impl<'a> Codegen<'a> {
fn type_name(&self, typeid: TypeId, by_ref: bool) -> String {
... | 2 | 21 | 7 |
fe836a2302d5b7129666f004e623b0a5a999d329 | Nick Fitzgerald | 2021-10-11T18:30:43 | Yield source positions from lexer that have file-relative offsets
They were previously all source texts concatenated-relative offsets, which would
cause `miette` to error out when trying to find the line/col when displaying
errors. Not good to have errors when displaying errors! Gets very confusing when
trying to trac... | diff --git a/cranelift/isle/isle/src/lexer.rs b/cranelift/isle/isle/src/lexer.rs
index b4b6bea3e..a8f9f9d93 100644
--- a/cranelift/isle/isle/src/lexer.rs
+++ b/cranelift/isle/isle/src/lexer.rs
@@ -135,14 +135,14 @@ impl<'a> Lexer<'a> {
Ok(l)
}
- /// Get the lexer's current file offset.
- pub fn of... | 1 | 10 | 10 |
fddff6ee2d87b92015759660e39ce37f4401e833 | Nick Fitzgerald | 2021-10-05T23:35:07 | Fix a panic when checking the call graph for an extractor with type errors in its definition | diff --git a/cranelift/isle/isle/src/ast.rs b/cranelift/isle/isle/src/ast.rs
index 5af7eaf6d..4b2aa84ca 100644
--- a/cranelift/isle/isle/src/ast.rs
+++ b/cranelift/isle/isle/src/ast.rs
@@ -128,10 +128,10 @@ impl Pattern {
}
/// Call `f` for each of the terms in this pattern.
- pub fn terms(&self, f: &mut... | 2 | 26 | 6 |
9af23bf061ed4f3b73ef8162e8d110b785fde295 | Nick Fitzgerald | 2021-10-05T21:40:51 | Report the recursive calls when an extractor is recursive | diff --git a/cranelift/isle/isle/src/sema.rs b/cranelift/isle/isle/src/sema.rs
index 9c3101602..14062ea3f 100644
--- a/cranelift/isle/isle/src/sema.rs
+++ b/cranelift/isle/isle/src/sema.rs
@@ -879,20 +879,36 @@ impl TermEnv {
'outer: for root in extractor_call_graph.keys().copied() {
seen.clear();... | 1 | 25 | 9 |
381dadadd00c6bcbadbf531c792102877c4bb222 | Nick Fitzgerald | 2021-10-04T20:48:20 | Move trie construction out to its own module | diff --git a/cranelift/isle/isle/src/codegen.rs b/cranelift/isle/isle/src/codegen.rs
index 576fc0aa7..f12d743b7 100644
--- a/cranelift/isle/isle/src/codegen.rs
+++ b/cranelift/isle/isle/src/codegen.rs
@@ -1,507 +1,22 @@
//! Generate Rust code from a series of Sequences.
-use crate::ir::{lower_rule, ExprInst, ExprSeq... | 6 | 592 | 522 |
0e082e8d6f623429151641b509e54f4ed185f233 | Nick Fitzgerald | 2021-09-30T19:28:22 | Make sure that every `decl` has a definition at the end of type checking | diff --git a/cranelift/isle/isle/src/sema.rs b/cranelift/isle/isle/src/sema.rs
index b3d0a6f54..516560b5d 100644
--- a/cranelift/isle/isle/src/sema.rs
+++ b/cranelift/isle/isle/src/sema.rs
@@ -269,6 +269,10 @@ impl Term {
}
}
+ fn is_declared(&self) -> bool {
+ matches!(self.kind, TermKind::De... | 1 | 23 | 0 |
d2bd07c24699b758771688ccf266ccf443822520 | Nick Fitzgerald | 2021-09-30T16:51:09 | Check that integer literals are primitive types in patterns | diff --git a/cranelift/isle/isle/src/sema.rs b/cranelift/isle/isle/src/sema.rs
index 9a6641fb6..b3d0a6f54 100644
--- a/cranelift/isle/isle/src/sema.rs
+++ b/cranelift/isle/isle/src/sema.rs
@@ -1034,6 +1034,16 @@ impl TermEnv {
return None;
}
};
+ ... | 1 | 10 | 0 |
ce207ee9531007b10ddb9985dc0f83e764b21f32 | Nick Fitzgerald | 2021-09-30T16:49:23 | Check that integer literals are a primitive type | diff --git a/cranelift/isle/isle/src/sema.rs b/cranelift/isle/isle/src/sema.rs
index d1d8213ed..9a6641fb6 100644
--- a/cranelift/isle/isle/src/sema.rs
+++ b/cranelift/isle/isle/src/sema.rs
@@ -1376,7 +1376,19 @@ impl TermEnv {
Some(Expr::Var(bv.ty, bv.id))
}
- &ast::Expr::Cons... | 1 | 13 | 1 |
a099b2b5900c01e2087bcc53f8c21b9ae3f9926f | Nick Fitzgerald | 2021-09-30T00:18:18 | Extend fuzzing to semantic analysis and codegen
* Fix a panic when we are substituting macro args, but we already had an error
involving the macro.
* Fix a stack overflow when an internal extractor's definition is recursive. | diff --git a/cranelift/isle/fuzz/Cargo.toml b/cranelift/isle/fuzz/Cargo.toml
index bec0b681b..51a593006 100644
--- a/cranelift/isle/fuzz/Cargo.toml
+++ b/cranelift/isle/fuzz/Cargo.toml
@@ -15,7 +15,7 @@ libfuzzer-sys = "0.4"
log = "0.4.14"
[[bin]]
-name = "parse"
-path = "fuzz_targets/parse.rs"
+name = "compile"
+p... | 4 | 177 | 104 |
9be1942b113115de61fde2a3938db352b2fb6d8e | Nick Fitzgerald | 2021-09-29T20:38:00 | Use `.copied()` instead of `.cloned()` | diff --git a/cranelift/isle/fuzz/fuzz_targets/parse.rs b/cranelift/isle/fuzz/fuzz_targets/compile.rs
similarity index 100%
rename from cranelift/isle/fuzz/fuzz_targets/parse.rs
rename to cranelift/isle/fuzz/fuzz_targets/compile.rs
diff --git a/cranelift/isle/isle/src/sema.rs b/cranelift/isle/isle/src/sema.rs
index 2082... | 2 | 1 | 1 |
6604a26e27ed714348cc6ed10f66ec5e7e2d2725 | Nick Fitzgerald | 2021-09-29T20:18:30 | Add a top-level parse function
And make `parse_defs` take `self` by ownership. This avoids a couple `Vec`
clones. | diff --git a/cranelift/isle/fuzz/fuzz_targets/parse.rs b/cranelift/isle/fuzz/fuzz_targets/parse.rs
index 73cee40e8..67390f865 100644
--- a/cranelift/isle/fuzz/fuzz_targets/parse.rs
+++ b/cranelift/isle/fuzz/fuzz_targets/parse.rs
@@ -9,9 +9,7 @@ fuzz_target!(|s: &str| {
log::debug!("lexer = {:?}", lexer);
if... | 3 | 12 | 10 |
e3aeb850b2357a8525ccb74de36a55c916d9c5dc | Nick Fitzgerald | 2021-09-28T23:27:59 | Fix a panic when parsing var patterns | diff --git a/cranelift/isle/Cargo.lock b/cranelift/isle/Cargo.lock
index 6a0f0849c..3e8e8cb49 100644
--- a/cranelift/isle/Cargo.lock
+++ b/cranelift/isle/Cargo.lock
@@ -115,6 +115,15 @@ dependencies = [
"log",
]
+[[package]]
+name = "env_logger"
+version = "0.9.0"
+source = "registry+https://github.com/rust-lang/c... | 5 | 52 | 31 |
f2b6244b9c76414a9229b0e0d08ae86ed8d88c2e | Nick Fitzgerald | 2021-09-28T23:12:07 | Fix some panics on parsing error paths | diff --git a/cranelift/isle/isle/src/parser.rs b/cranelift/isle/isle/src/parser.rs
index 7ea9b6e48..0cad0387d 100644
--- a/cranelift/isle/isle/src/parser.rs
+++ b/cranelift/isle/isle/src/parser.rs
@@ -51,8 +51,10 @@ impl<'a> Parser<'a> {
}
}
- fn pos(&self) -> Option<Pos> {
- self.lexer.peek()... | 1 | 20 | 44 |
6a523938de2b00f6da63e77ec2fa62f00436b91a | Nick Fitzgerald | 2021-09-28T23:07:42 | Fix overflows when tokenizing integer literals | diff --git a/cranelift/isle/fuzz/fuzz_targets/parse.rs b/cranelift/isle/fuzz/fuzz_targets/parse.rs
index f2a572dbd..747bb21e2 100644
--- a/cranelift/isle/fuzz/fuzz_targets/parse.rs
+++ b/cranelift/isle/fuzz/fuzz_targets/parse.rs
@@ -3,7 +3,8 @@
use libfuzzer_sys::fuzz_target;
fuzz_target!(|s: &str| {
- let lexer... | 3 | 46 | 31 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.