ghc-9.12: 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.Rts.Types

Description

Types and utility functions used in the JS RTS.

Synopsis

Documentation

traceRts :: StgToJSConfig -> JStgExpr -> JStgStat Source #

Given a JStgExpr, ex, inject a trace statement on ex in the compiled JS program

assertRts :: ToJExpr a => StgToJSConfig -> JStgExpr -> a -> JStgStat Source #

Syntactic sugar. Given a JStgExpr, ex which is assumed to be a predicate, and a message m, assert that 'not ex' is True, if not throw an exception in JS land with message m.

clName :: JStgExpr -> JStgExpr Source #

name of the closure c

clTypeName :: JStgExpr -> JStgExpr Source #

Type name of the closure c

stackFrameSize Source #

Arguments

:: JStgExpr

assign frame size to this

-> JStgExpr

stack frame header function

-> JSM JStgStat

size of the frame, including header

withRegs :: StgReg -> StgReg -> (StgReg -> JStgStat) -> JStgStat Source #

Perform the computation f, on the range of registers bounded by start and end.