ghc-9.12.0.20241114: The GHC API
Safe HaskellNone
LanguageGHC2021

GHC.Wasm.ControlFlow.FromCmm

Synopsis

Documentation

structuredControl Source #

Arguments

:: forall expr stmt m. MonadUniqDSM m 
=> Platform

needed for offset calculation

-> (Label -> CmmExpr -> m expr)

translator for expressions

-> (Label -> CmmActions -> m stmt)

translator for straight-line code

-> CmmGraph

CFG to be translated

-> m (WasmControl stmt expr ('[] :: [WasmType]) '['I32]) 

Convert a Cmm CFG to WebAssembly's structured control flow.