{"record":{"id":"7fae8ad9a687055c","repo":"wasmerio/wasmer","slug":"not-yet-implemented-7fae8a","errorCode":null,"errorMessage":"not yet implemented","messagePattern":"not yet implemented","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"lib/compiler-singlepass/src/codegen.rs","lineNumber":268,"sourceCode":"    }\n\n    /// Returns the value stack depth at which resources should be deallocated.\n    /// For loops, this preserves PHI arguments by excluding them from deallocation.\n    fn value_stack_depth_for_release(&self) -> usize {\n        self.value_stack_depth - self.param_types.len()\n    }\n}\n\nfn type_to_wp_type(ty: &Type) -> WpType {\n    match ty {\n        Type::I32 => WpType::I32,\n        Type::I64 => WpType::I64,\n        Type::F32 => WpType::F32,\n        Type::F64 => WpType::F64,\n        Type::V128 => WpType::V128,\n        Type::ExternRef => WpType::Ref(WpRefType::new(true, WpHeapType::EXTERN).unwrap()),\n        Type::FuncRef => WpType::Ref(WpRefType::new(true, WpHeapType::FUNC).unwrap()),\n        Type::ExceptionRef => todo!(),\n    }\n}\n\n/// Abstraction for a 2-input, 1-output operator. Can be an integer/floating-point\n/// binop/cmpop.\nstruct I2O1<R: Reg, S: Reg> {\n    loc_a: Location<R, S>,\n    loc_b: Location<R, S>,\n    ret: Location<R, S>,\n}\n\n/// Type of native call we emit.\nenum NativeCallType {\n    IncludeVMCtxArgument,\n    Unreachable,\n}\n\nconst RED_ZONE_SIZE: usize = 32;","sourceCodeStart":250,"sourceCodeEnd":286,"githubUrl":"https://github.com/wasmerio/wasmer/blob/8c4b9ee9d33fb2068863fbb3d328683e7e6ff7f5/lib/compiler-singlepass/src/codegen.rs#L250-L286","documentation":"`type_to_wp_type` in the singlepass compiler converts internal wasm `Type` values to stack-machine `WpType` values; the `Type::ExceptionRef` arm is a `todo!()`. Compiling a module that uses exception-reference types on the operand stack panics with 'not yet implemented', because singlepass does not yet support the exception-handling (exnref) proposal.","triggerScenarios":"Compiling a wasm module with exception handling enabled where an `exnref`-typed value must be mapped to a WpType; reached from `feed_operator` -> `type_to_wp_type` at codegen.rs:268.","commonSituations":"Modules built with the WebAssembly exception-handling proposal (try/catch, throw with exnref operands) run through wasmtime's singlepass backend (often used with -O0 or on platforms Cranelift does not cover).","solutions":["Compile the module without exception-handling (e.g. rebuild wasm with legacy EH or without --enable-exceptions)","Use the Cranelift compiler instead of singlepass if your platform allows it","Upgrade wasmtime to a version with exnref support in singlepass","Disable the exceptions feature in the wasm toolchain/runtime config"],"exampleFix":"// before: singlepass panics on exnref\nlet mut config = Config::new();\nconfig.strategy(Strategy::Winch); // or default singlepass on RISC-V\nconfig.wasm_exceptions(true);\n// after: use Cranelift or disable exceptions\nlet mut config = Config::new();\nconfig.strategy(Strategy::Cranelift); // exnref supported here\n// or: config.wasm_exceptions(false);","handlingStrategy":"validation","validationCode":"// Reject exnref-typed modules before singlepass compilation.\nlet mut features = WasmFeatures::default();\nfeatures.exceptions = false;\nwasmparser::Validator::new_with_features(features).validate_all(&wasm_bytes)?;\n// or check config: if compiling with singlepass, ensure exceptions disabled\nlet mut config = Config::new();\nconfig.wasm_exceptions(false);","typeGuard":"fn supports_backend(ty: &Type) -> bool {\n    !matches!(ty, Type::ExceptionRef)\n}","tryCatchPattern":null,"preventionTips":["Use Cranelift strategy where exnref is supported","Build wasm without the exception-handling proposal","Verify backend (singlepass vs cranelift) feature parity in CI"],"tags":["wasmtime","singlepass","exnref","exception-handling","unimplemented"],"backgroundTag":"unimplemented-wasm-operator","analyzedSha":"8c4b9ee9d33fb2068863fbb3d328683e7e6ff7f5","analyzedAt":"2026-09-01T23:06:31.009Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-09T06:17:21.866Z"}