Skip to content

A lightweight WebAssembly runtime that is fast, secure, and standards-compliant

Wasmtime debug instrumentation: remove stale comment about moving GCs. (#14095)

Chris Fallin687cbc1710bf
diff --git a/crates/cranelift/src/func_environ.rs b/crates/cranelift/src/func_environ.rs
index 8b65df4341..64311df3e1 100644
--- a/crates/cranelift/src/func_environ.rs
+++ b/crates/cranelift/src/func_environ.rs
@@ -1204,18 +1204,10 @@ impl<'module_environment> FuncEnvironment<'module_environment> {
// values were pushed; hence, these operand-stack values
// are "dirty" and need to be flushed to the stackslot.
//
- // N.B.: note that we don't re-sync GC-rooted values, and
- // we don't root the instrumentation slots
- // explicitly. This is safe as long as we don't have a
- // moving GC, because the value that we're observing in
- // the main program dataflow is already rooted in the main
- // program (we are only storing an extra copy of it). But
- // if/when we do build a moving GC, we will need to handle
- // this, probably by invalidating the "freshness" of all
- // ref-typed values after a safepoint and re-writing them
- // to the instrumentation slot; or alternately, extending
- // the debug instrumentation mechanism to be able to
- // directly refer to the user stack-slot.
+ // N.B.: note that we explicitly GC-root instrumentation
+ // slots, so we do not need to synchronize the canonical GC
+ // refs across may-GC points; the values will be separately
+ // updated by a GC pass in these slots.
for i in self.stacks.stack_shape.len()..self.stacks.stack.len() {
let parent_shape = i
.checked_sub(1)