ghc-9.13: 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
Safe HaskellNone
LanguageGHC2021

GHC.StgToJS.ExprCtx

Description

 
Synopsis

Documentation

data ExprCtx Source #

Context into which an expression is evaluated

Instances

Instances details
Outputable ExprCtx Source # 
Instance details

Defined in GHC.StgToJS.ExprCtx

Methods

ppr :: ExprCtx -> SDoc Source #

initExprCtx :: Id -> ExprCtx Source #

Initialize an expression context in the context of the given top-level binding Id

ctxIsEvaluated :: Id -> Bool Source #

Predicate: do we know for sure that the given Id is evaluated?

ctxSetSrcSpan :: RealSrcSpan -> ExprCtx -> ExprCtx Source #

Set source location

ctxSetTop :: Id -> ExprCtx -> ExprCtx Source #

Set top-level binding Id

ctxTarget :: ExprCtx -> [TypedExpr] Source #

Target variables for the evaluated expression

Let-no-escape

ctxClearLneFrame :: ExprCtx -> ExprCtx Source #

Remove information about the current LNE frame

ctxUpdateLneFrame :: [(Id, Int)] -> [Id] -> ExprCtx -> ExprCtx Source #

Update let-no-escape frame

ctxLneFrameVars :: ExprCtx -> [(Id, Int)] Source #

Contents of current LNE frame

Variables and their index on the stack

ctxIsLneBinding :: ExprCtx -> Id -> Bool Source #

Does the given Id correspond to a LNE binding

ctxIsLneLiveVar :: ExprCtx -> Id -> Bool Source #

Does the given Id correspond to a LNE live var on the stack

ctxLneBindingStackSize :: ExprCtx -> Id -> Maybe Int Source #

Return the LNE stack size associated to the given Id. Return Nothing when the Id doesn't correspond to a LNE binding.

ctxLneShrinkStack :: ExprCtx -> Int -> ExprCtx Source #

Shrink the LNE stack to the given size