ghc-9.6.3: The GHC API
Copyright(c) The University of Glasgow 2001
LicenseBSD-style (see the file LICENSE)
MaintainerJeffrey Young <> Luite Stegeman <> Sylvain Henry <> Josh Meredith <>
Stabilityexperimental Code generation of Expressions
Safe HaskellSafe-Inferred





genExpr :: HasDebugCallStack => ExprCtx -> CgStgExpr -> G (JStat, ExprResult) Source #

Evaluate an expression in the given expression context (continuation)

genEntryType :: HasDebugCallStack => [Id] -> G CIType Source #

Generate the entry function types for identifiers. Note that this only returns either CIThunk or CIFun. Everything else (PAP Blackhole etc.) is filtered as not a RuntimeRepKinded type.

loadLiveFun :: [Id] -> G JStat Source #

Given a set of Ids, bind each Id to the appropriate data fields in N registers. This assumes these data fields have already been populated in the registers. For the empty, singleton, and binary case use register 1, for any more use as many registers as necessary.

genBody :: HasDebugCallStack => ExprCtx -> Id -> StgReg -> [Id] -> CgStgExpr -> G JStat Source #

Generate the body of an object