ghc-9.10.1: The GHC API
Copyright(c) The University of Glasgow 2001
LicenseBSD-style (see the file LICENSE)
MaintainerJeffrey Young <jeffrey.young@iohk.io> Luite Stegeman <luite.stegeman@iohk.io> Sylvain Henry <sylvain.henry@iohk.io> Josh Meredith <josh.meredith@iohk.io>
Stabilityexperimental Code generation of Expressions
Safe HaskellNone
LanguageGHC2021

GHC.StgToJS.Expr

Description

 
Synopsis

Documentation

genExpr :: HasDebugCallStack => ExprCtx -> CgStgExpr -> G (JStgStat, 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.

loadLiveFun :: [Id] -> G JStgStat 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 -> StgReg -> [Id] -> CgStgExpr -> Type -> G JStgStat Source #

Generate the body of an object