Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .git-third-party/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
"repos": {
"executor/third-party/wasmtime": {
"url": "https://github.com/bytecodealliance/wasmtime.git",
"commit": "7bac2c2775808aaec5d4aa5627a5e447b51102cf",
"commit": "ebf20ab7cbf35fa3fbd8202562017fda6a541021",
"patches": [
"gbm0xv16dc1fs2km",
"zsjxmza3dms0hr10",
"4rr93pqjtwm5m701",
"r6518c8dxghpkhsj",
"6xy06vg0d71czwmm"
"wyqzzn2hxndgbxbx",
"mgz066ws46rvhghv",
"x77t41kns34hzzhb",
"fvfcbfxe3ng3djg8",
"nwdw669v5p3aamta"
],
"submodules": []
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ index 80dcb86..342489f 100644

#[repr(C)]
diff --git a/crates/cranelift/src/func_environ.rs b/crates/cranelift/src/func_environ.rs
index fe1b8d8..7dea98f 100644
index dbe4e3f..266938b 100644
--- a/crates/cranelift/src/func_environ.rs
+++ b/crates/cranelift/src/func_environ.rs
@@ -5218,9 +5218,9 @@ impl FuncEnvironment<'_> {
@@ -5228,9 +5228,9 @@ impl FuncEnvironment<'_> {
self.fuel_save_from_var(builder);
}

Expand Down Expand Up @@ -76,10 +76,10 @@ index 1511a65..5669ddb 100644
/// Creates a new cranelift `Signature` with no wasm params/results for the
/// given calling convention.
diff --git a/crates/cranelift/src/translate/code_translator.rs b/crates/cranelift/src/translate/code_translator.rs
index 0a02c4d..772f112 100644
index 0e12a52..d4c2afd 100644
--- a/crates/cranelift/src/translate/code_translator.rs
+++ b/crates/cranelift/src/translate/code_translator.rs
@@ -4764,6 +4764,6 @@ fn float_op_unreachable_check(environ: &mut FuncEnvironment<'_>, builder: &mut F
@@ -4765,6 +4765,6 @@ fn float_op_unreachable_check(environ: &mut FuncEnvironment<'_>, builder: &mut F
if environ.are_floats_enabled() {
return false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ store after execution finishes.
2 files changed, 59 insertions(+), 48 deletions(-)

diff --git a/crates/wasmtime/src/runtime/func.rs b/crates/wasmtime/src/runtime/func.rs
index b0a53c5..c657833 100644
index ad9f759..94da452 100644
--- a/crates/wasmtime/src/runtime/func.rs
+++ b/crates/wasmtime/src/runtime/func.rs
@@ -1462,7 +1462,9 @@ use std::collections::BTreeMap;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ index afa5ab6..5f3fdee 100644
let mut validator =
validator.into_validator(mem::take(&mut compiler.cx.validator_allocations));
diff --git a/crates/cranelift/src/func_environ.rs b/crates/cranelift/src/func_environ.rs
index 7dea98f..ee471b7 100644
index 266938b..dadf341 100644
--- a/crates/cranelift/src/func_environ.rs
+++ b/crates/cranelift/src/func_environ.rs
@@ -52,6 +52,14 @@ pub(crate) enum Extension {
Expand Down Expand Up @@ -197,7 +197,7 @@ index 7dea98f..ee471b7 100644

stack_switching_handler_list_buffer: None,
stack_switching_values_buffer: None,
@@ -5144,25 +5149,42 @@ impl FuncEnvironment<'_> {
@@ -5154,25 +5159,42 @@ impl FuncEnvironment<'_> {

self.update_state_slot_vmctx(builder);

Expand Down Expand Up @@ -256,7 +256,7 @@ index 7dea98f..ee471b7 100644

// Additionally we initialize `fuel_var` if it will get used.
if self.tunables.consume_fuel {
@@ -5225,22 +5247,44 @@ impl FuncEnvironment<'_> {
@@ -5235,22 +5257,44 @@ impl FuncEnvironment<'_> {
}

pub fn before_return(&mut self, builder: &mut FunctionBuilder) {
Expand Down Expand Up @@ -317,7 +317,7 @@ index 7dea98f..ee471b7 100644

pub fn translate_cont_bind(
diff --git a/crates/cranelift/src/translate/code_translator.rs b/crates/cranelift/src/translate/code_translator.rs
index 772f112..a7bf09c 100644
index d4c2afd..fdff6a5 100644
--- a/crates/cranelift/src/translate/code_translator.rs
+++ b/crates/cranelift/src/translate/code_translator.rs
@@ -368,22 +368,17 @@ pub fn translate_operator(
Expand Down Expand Up @@ -1091,15 +1091,15 @@ index 772f112..a7bf09c 100644
let (a, b) = env.stacks.pop2();
let bitcast_a = optionally_bitcast_vector(a, needed_type, builder);
let bitcast_b = optionally_bitcast_vector(b, needed_type, builder);
@@ -4720,6 +4848,7 @@ fn create_catch_block(
let block = builder.create_block();
@@ -4721,6 +4849,7 @@ fn create_catch_block(
let exn_ref = builder.append_block_param(block, exn_payload_ty);
builder.switch_to_block(block);
environ.on_catch_block_entry(builder);
+ environ.restore_semantic_stack_limits_after_exception(builder);
debug_assert!(exn_ref_ty.bits() <= exn_payload_ty.bits());
let exn_ref = if exn_ref_ty.bits() < exn_payload_ty.bits() {
builder.ins().ireduce(exn_ref_ty, exn_ref)
@@ -4760,7 +4889,10 @@ fn create_catch_block(
@@ -4761,7 +4890,10 @@ fn create_catch_block(
Ok(block)
}

Expand Down Expand Up @@ -1281,7 +1281,7 @@ index bd8f42f..b90a75d 100644
memory_init_cow,
other.memory_init_cow,
diff --git a/crates/wasmtime/src/runtime/func.rs b/crates/wasmtime/src/runtime/func.rs
index c657833..b129bed 100644
index 94da452..30f7016 100644
--- a/crates/wasmtime/src/runtime/func.rs
+++ b/crates/wasmtime/src/runtime/func.rs
@@ -1509,7 +1509,10 @@ impl<'a, T: 'static> StoreContextMut<'a, T> {
Expand Down Expand Up @@ -1342,7 +1342,7 @@ index f7ab83b..cad9d79 100644
continuations: Vec::new(),
instances: TryPrimaryMap::new(),
diff --git a/crates/wasmtime/src/runtime/vm/vmcontext.rs b/crates/wasmtime/src/runtime/vm/vmcontext.rs
index 4509bc4..a086355 100644
index 44cee91..781007d 100644
--- a/crates/wasmtime/src/runtime/vm/vmcontext.rs
+++ b/crates/wasmtime/src/runtime/vm/vmcontext.rs
@@ -721,6 +721,14 @@ const _: () = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ Subject: [PATCH] feat: rebase genvm
28 files changed, 466 insertions(+), 52 deletions(-)

diff --git a/Cargo.toml b/Cargo.toml
index 83b09c9..4560d95 100644
index 69b668d..36c85f5 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -375,18 +375,18 @@ wit-bindgen = { version = "0.60.0", default-features = false }
@@ -370,18 +370,18 @@ wit-bindgen = { version = "0.60.0", default-features = false }
wit-bindgen-rust-macro = { version = "0.60.0", default-features = false }

# wasm-tools family:
Expand Down Expand Up @@ -181,7 +181,7 @@ index 5f3fdee..afa5ab6 100644
let mut validator =
validator.into_validator(mem::take(&mut compiler.cx.validator_allocations));
diff --git a/crates/cranelift/src/func_environ.rs b/crates/cranelift/src/func_environ.rs
index 64e9642..fe1b8d8 100644
index b72e825..dbe4e3f 100644
--- a/crates/cranelift/src/func_environ.rs
+++ b/crates/cranelift/src/func_environ.rs
@@ -211,6 +211,9 @@ pub struct FuncEnvironment<'module_environment> {
Expand All @@ -204,31 +204,31 @@ index 64e9642..fe1b8d8 100644
stack_switching_handler_list_buffer: None,
stack_switching_values_buffer: None,

@@ -3444,6 +3450,7 @@ impl FuncEnvironment<'_> {
@@ -3445,6 +3451,7 @@ impl FuncEnvironment<'_> {
sig_ref: ir::SigRef,
call_args: &[ir::Value],
) -> WasmResult<()> {
+ self.before_return(builder);
Call::new_tail(builder, self, srcloc).direct_call(callee_index, sig_ref, call_args)?;
Ok(())
}
@@ -3458,6 +3465,7 @@ impl FuncEnvironment<'_> {
@@ -3459,6 +3466,7 @@ impl FuncEnvironment<'_> {
callee: ir::Value,
call_args: &[ir::Value],
) -> WasmResult<()> {
+ self.before_return(builder);
Call::new_tail(builder, self, srcloc).indirect_call(
table_index,
ty_index,
@@ -3476,6 +3484,7 @@ impl FuncEnvironment<'_> {
@@ -3477,6 +3485,7 @@ impl FuncEnvironment<'_> {
callee: ir::Value,
call_args: &[ir::Value],
) -> WasmResult<()> {
+ self.before_return(builder);
Call::new_tail(builder, self, srcloc).call_ref(sig_ref, callee, call_args)?;
Ok(())
}
@@ -5135,6 +5144,26 @@ impl FuncEnvironment<'_> {
@@ -5145,6 +5154,26 @@ impl FuncEnvironment<'_> {

self.update_state_slot_vmctx(builder);

Expand All @@ -255,7 +255,7 @@ index 64e9642..fe1b8d8 100644
// Additionally we initialize `fuel_var` if it will get used.
if self.tunables.consume_fuel {
self.fuel_function_entry(builder);
@@ -5177,6 +5206,43 @@ impl FuncEnvironment<'_> {
@@ -5187,6 +5216,43 @@ impl FuncEnvironment<'_> {
self.isa.triple().architecture == target_lexicon::Architecture::X86_64
}

Expand Down Expand Up @@ -299,7 +299,7 @@ index 64e9642..fe1b8d8 100644
pub fn translate_cont_bind(
&mut self,
builder: &mut FunctionBuilder<'_>,
@@ -5334,6 +5400,7 @@ impl FuncEnvironment<'_> {
@@ -5344,6 +5410,7 @@ impl FuncEnvironment<'_> {
}

pub fn handle_before_return(&mut self, retvals: &[ir::Value], builder: &mut FunctionBuilder) {
Expand All @@ -321,7 +321,7 @@ index 50c0b26..1511a65 100644
/// Creates a new cranelift `Signature` with no wasm params/results for the
/// given calling convention.
diff --git a/crates/cranelift/src/translate/code_translator.rs b/crates/cranelift/src/translate/code_translator.rs
index 7de3ab3..5c33b47 100644
index dcb41ff..925a145 100644
--- a/crates/cranelift/src/translate/code_translator.rs
+++ b/crates/cranelift/src/translate/code_translator.rs
@@ -1071,120 +1071,145 @@ pub fn translate_operator(
Expand Down Expand Up @@ -830,7 +830,7 @@ index 7de3ab3..5c33b47 100644
}

/// Generate a `jump` instruction, but first cast all 128-bit vector values to I8X16 if they
@@ -4669,3 +4758,11 @@ fn create_catch_block(
@@ -4670,3 +4759,11 @@ fn create_catch_block(

Ok(block)
}
Expand Down Expand Up @@ -1129,7 +1129,7 @@ index f3f0a3f..698ffc6 100644

fn _assertions_lib() {
diff --git a/crates/wasmtime/src/runtime/func.rs b/crates/wasmtime/src/runtime/func.rs
index d847800..b0a53c5 100644
index b9520fd..ad9f759 100644
--- a/crates/wasmtime/src/runtime/func.rs
+++ b/crates/wasmtime/src/runtime/func.rs
@@ -1446,6 +1446,32 @@ impl Func {
Expand Down Expand Up @@ -1312,7 +1312,7 @@ index a081654..9911f9d 100644
impl<T: fmt::Debug> fmt::Debug for Store<T> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
diff --git a/crates/wasmtime/src/runtime/vm/vmcontext.rs b/crates/wasmtime/src/runtime/vm/vmcontext.rs
index 9324674..4509bc4 100644
index 0a9c934..44cee91 100644
--- a/crates/wasmtime/src/runtime/vm/vmcontext.rs
+++ b/crates/wasmtime/src/runtime/vm/vmcontext.rs
@@ -810,8 +810,10 @@ impl Default for VMStoreContext {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ place, so trapping on them broke real numpy code paths.
1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/crates/cranelift/src/translate/code_translator.rs b/crates/cranelift/src/translate/code_translator.rs
index 5c33b47..0a02c4d 100644
index 925a145..0e12a52 100644
--- a/crates/cranelift/src/translate/code_translator.rs
+++ b/crates/cranelift/src/translate/code_translator.rs
@@ -1804,7 +1804,8 @@ pub fn translate_operator(
Expand Down
Loading