Skip to content

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

Exceptions: trace exception index inside a WasmHeapTy. (#14012)

Chris Fallin98cd178eb486
diff --git a/crates/environ/src/types.rs b/crates/environ/src/types.rs
index 9841f45ebc..099d4250af 100644
--- a/crates/environ/src/types.rs
+++ b/crates/environ/src/types.rs
@@ -554,7 +554,23 @@ impl TypeTrace for WasmHeapType {
Self::ConcreteFunc(i) => func(i),
Self::ConcreteStruct(i) => func(i),
Self::ConcreteCont(i) => func(i),
- _ => Ok(()),
+ Self::ConcreteExn(i) => func(i),
+ // Top/bottom lattice elements have no inner type
+ // reference.
+ Self::Extern
+ | Self::NoExtern
+ | Self::Func
+ | Self::NoFunc
+ | Self::Cont
+ | Self::NoCont
+ | Self::Any
+ | Self::Eq
+ | Self::I31
+ | Self::Array
+ | Self::Struct
+ | Self::Exn
+ | Self::NoExn
+ | Self::None => Ok(()),
}
}
@@ -567,7 +583,23 @@ impl TypeTrace for WasmHeapType {
Self::ConcreteFunc(i) => func(i),
Self::ConcreteStruct(i) => func(i),
Self::ConcreteCont(i) => func(i),
- _ => Ok(()),
+ Self::ConcreteExn(i) => func(i),
+ // Top/bottom lattice elements have no inner type
+ // reference.
+ Self::Extern
+ | Self::NoExtern
+ | Self::Func
+ | Self::NoFunc
+ | Self::Cont
+ | Self::NoCont
+ | Self::Any
+ | Self::Eq
+ | Self::I31
+ | Self::Array
+ | Self::Struct
+ | Self::Exn
+ | Self::NoExn
+ | Self::None => Ok(()),
}
}
}