| 25 | inline Val::Val(Func func) : Val(std::optional(func)) {} |
| 26 | |
| 27 | inline std::optional<Func> Val::funcref() const { |
| 28 | if (val.kind != WASMTIME_FUNCREF) { |
| 29 | std::abort(); |
| 30 | } |
| 31 | if (val.of.funcref.store_id == 0) { |
| 32 | return std::nullopt; |
| 33 | } |
| 34 | return Func(val.of.funcref); |
| 35 | } |
| 36 | |
| 37 | #ifdef WASMTIME_FEATURE_GC |
| 38 |