GHC.StgToJS.Heap

ghc-9.14.0.20251028: The GHC API

Safe Haskell | None
Language | GHC2021

GHC.StgToJS.Heap

Contents

- Field names
- Javascript Type literals

Synopsis

- closureType :: JStgExpr -> JStgExpr
- infoClosureType :: JStgExpr -> JStgExpr
- infoFunArity :: JStgExpr -> JStgExpr
- isObject :: JStgExpr -> JStgExpr
- isThunk :: JStgExpr -> JStgExpr
- isThunk' :: JStgExpr -> JStgExpr
- isBlackhole :: JStgExpr -> JStgExpr
- isFun :: JStgExpr -> JStgExpr
- isFun' :: JStgExpr -> JStgExpr
- isPap :: JStgExpr -> JStgExpr
- isPap' :: JStgExpr -> JStgExpr
- isCon :: JStgExpr -> JStgExpr
- isCon' :: JStgExpr -> JStgExpr
- conTag :: JStgExpr -> JStgExpr
- conTag' :: JStgExpr -> JStgExpr
- closureInfo :: JStgExpr -> JStgExpr
- closureMeta :: JStgExpr -> JStgExpr
- closureField1 :: JStgExpr -> JStgExpr
- closureField2 :: JStgExpr -> JStgExpr
- closureCC :: JStgExpr -> JStgExpr
- funArity :: JStgExpr -> JStgExpr
- papArity :: JStgExpr -> JStgExpr
- funOrPapArity :: JStgExpr -> Maybe JStgExpr -> JStgExpr
- closureInfo_ :: FastString
- closureMeta_ :: FastString
- closureCC_ :: FastString
- closureField1_ :: FastString
- closureField2_ :: FastString
- jTyObject :: JStgExpr

# Documentation

closureType :: JStgExpr -> JStgExpr Source #

infoClosureType :: JStgExpr -> JStgExpr Source #

Closure type from infotable

infoFunArity :: JStgExpr -> JStgExpr Source #

Function arity from infotable

isObject :: JStgExpr -> JStgExpr Source #

isThunk :: JStgExpr -> JStgExpr Source #

isThunk' :: JStgExpr -> JStgExpr Source #

isBlackhole :: JStgExpr -> JStgExpr Source #

isFun :: JStgExpr -> JStgExpr Source #

isFun' :: JStgExpr -> JStgExpr Source #

isPap :: JStgExpr -> JStgExpr Source #

isPap' :: JStgExpr -> JStgExpr Source #

isCon :: JStgExpr -> JStgExpr Source #

isCon' :: JStgExpr -> JStgExpr Source #

conTag :: JStgExpr -> JStgExpr Source #

conTag' :: JStgExpr -> JStgExpr Source #

closureInfo :: JStgExpr -> JStgExpr Source #

Get closure infotable

closureMeta :: JStgExpr -> JStgExpr Source #

Get closure metadata

closureField1 :: JStgExpr -> JStgExpr Source #

Get closure extra field 1

closureField2 :: JStgExpr -> JStgExpr Source #

Get closure extra field 2

closureCC :: JStgExpr -> JStgExpr Source #

Get closure cost-center

funArity :: JStgExpr -> JStgExpr Source #

Number of arguments (arity & 0xff = arguments, arity >> 8 = number of registers)

papArity :: JStgExpr -> JStgExpr Source #

funOrPapArity Source #

Arguments

:: JStgExpr | heap object
-> Maybe JStgExpr | reference to infotable, if you have one already (saves a c.f lookup twice)
-> JStgExpr | arity tag (tag >> 8 = registers, tag & 0xff = arguments)

# Field names

closureInfo_ :: FastString Source #

Closure infotable field name

closureMeta_ :: FastString Source #

Closure meta field name

closureCC_ :: FastString Source #

Closure cost-center field name

closureField1_ :: FastString Source #

Closure first payload field name

closureField2_ :: FastString Source #

Closure second payload field name

# Javascript Type literals

jTyObject :: JStgExpr Source #