GHC.StgToJS.Regs

ghc-9.10.0.20240328: The GHC API

Safe Haskell | None
Language | GHC2021

GHC.StgToJS.Regs

Synopsis

- data StgReg
  - = R1
  - | R2
  - | R3
  - | R4
  - | R5
  - | R6
  - | R7
  - | R8
  - | R9
  - | R10
  - | R11
  - | R12
  - | R13
  - | R14
  - | R15
  - | R16
  - | R17
  - | R18
  - | R19
  - | R20
  - | R21
  - | R22
  - | R23
  - | R24
  - | R25
  - | R26
  - | R27
  - | R28
  - | R29
  - | R30
  - | R31
  - | R32
  - | R33
  - | R34
  - | R35
  - | R36
  - | R37
  - | R38
  - | R39
  - | R40
  - | R41
  - | R42
  - | R43
  - | R44
  - | R45
  - | R46
  - | R47
  - | R48
  - | R49
  - | R50
  - | R51
  - | R52
  - | R53
  - | R54
  - | R55
  - | R56
  - | R57
  - | R58
  - | R59
  - | R60
  - | R61
  - | R62
  - | R63
  - | R64
  - | R65
  - | R66
  - | R67
  - | R68
  - | R69
  - | R70
  - | R71
  - | R72
  - | R73
  - | R74
  - | R75
  - | R76
  - | R77
  - | R78
  - | R79
  - | R80
  - | R81
  - | R82
  - | R83
  - | R84
  - | R85
  - | R86
  - | R87
  - | R88
  - | R89
  - | R90
  - | R91
  - | R92
  - | R93
  - | R94
  - | R95
  - | R96
  - | R97
  - | R98
  - | R99
  - | R100
  - | R101
  - | R102
  - | R103
  - | R104
  - | R105
  - | R106
  - | R107
  - | R108
  - | R109
  - | R110
  - | R111
  - | R112
  - | R113
  - | R114
  - | R115
  - | R116
  - | R117
  - | R118
  - | R119
  - | R120
  - | R121
  - | R122
  - | R123
  - | R124
  - | R125
  - | R126
  - | R127
  - | R128
- data Special
  - = Stack
  - | Sp
- sp :: JStgExpr
- stack :: JStgExpr
- r1 :: JStgExpr
- r2 :: JStgExpr
- r3 :: JStgExpr
- r4 :: JStgExpr
- regsFromR1 :: [StgReg]
- regsFromR2 :: [StgReg]
- jsRegsFromR1 :: [JStgExpr]
- jsRegsFromR2 :: [JStgExpr]
- data StgRet
  - = Ret1
  - | Ret2
  - | Ret3
  - | Ret4
  - | Ret5
  - | Ret6
  - | Ret7
  - | Ret8
  - | Ret9
  - | Ret10
- jsRegToInt :: StgReg -> Int
- intToJSReg :: Int -> StgReg
- jsReg :: Int -> JStgExpr
- maxReg :: Int
- minReg :: Int
- register :: StgReg -> JStgExpr
- foreignRegister :: StgRet -> JStgExpr

# Documentation

data StgReg Source #

General purpose "registers"

The JS backend arbitrarily supports 128 registers

Constructors

R1 |
R2 |
R3 |
R4 |
R5 |
R6 |
R7 |
R8 |
R9 |
R10 |
R11 |
R12 |
R13 |
R14 |
R15 |
R16 |
R17 |
R18 |
R19 |
R20 |
R21 |
R22 |
R23 |
R24 |
R25 |
R26 |
R27 |
R28 |
R29 |
R30 |
R31 |
R32 |
R33 |
R34 |
R35 |
R36 |
R37 |
R38 |
R39 |
R40 |
R41 |
R42 |
R43 |
R44 |
R45 |
R46 |
R47 |
R48 |
R49 |
R50 |
R51 |
R52 |
R53 |
R54 |
R55 |
R56 |
R57 |
R58 |
R59 |
R60 |
R61 |
R62 |
R63 |
R64 |
R65 |
R66 |
R67 |
R68 |
R69 |
R70 |
R71 |
R72 |
R73 |
R74 |
R75 |
R76 |
R77 |
R78 |
R79 |
R80 |
R81 |
R82 |
R83 |
R84 |
R85 |
R86 |
R87 |
R88 |
R89 |
R90 |
R91 |
R92 |
R93 |
R94 |
R95 |
R96 |
R97 |
R98 |
R99 |
R100 |
R101 |
R102 |
R103 |
R104 |
R105 |
R106 |
R107 |
R108 |
R109 |
R110 |
R111 |
R112 |
R113 |
R114 |
R115 |
R116 |
R117 |
R118 |
R119 |
R120 |
R121 |
R122 |
R123 |
R124 |
R125 |
R126 |
R127 |
R128 |

#### Instances

Instances details

ToJExpr StgReg Source # |
Instance details Defined in GHC.StgToJS.Regs Methods toJExpr :: StgReg -> JStgExpr Source # toJExprFromList :: [StgReg] -> JStgExpr Source #
Bounded StgReg Source # |
Instance details Defined in GHC.StgToJS.Regs Methods minBound :: StgReg # maxBound :: StgReg #
Enum StgReg Source # |
Instance details Defined in GHC.StgToJS.Regs Methods succ :: StgReg -> StgReg # pred :: StgReg -> StgReg # toEnum :: Int -> StgReg # fromEnum :: StgReg -> Int # enumFrom :: StgReg -> [StgReg] # enumFromThen :: StgReg -> StgReg -> [StgReg] # enumFromTo :: StgReg -> StgReg -> [StgReg] # enumFromThenTo :: StgReg -> StgReg -> StgReg -> [StgReg] #
Ix StgReg Source # |
Instance details Defined in GHC.StgToJS.Regs Methods range :: (StgReg, StgReg) -> [StgReg] # index :: (StgReg, StgReg) -> StgReg -> Int # unsafeIndex :: (StgReg, StgReg) -> StgReg -> Int # inRange :: (StgReg, StgReg) -> StgReg -> Bool # rangeSize :: (StgReg, StgReg) -> Int # unsafeRangeSize :: (StgReg, StgReg) -> Int #
Show StgReg Source # |
Instance details Defined in GHC.StgToJS.Regs Methods showsPrec :: Int -> StgReg -> ShowS # show :: StgReg -> String # showList :: [StgReg] -> ShowS #
Eq StgReg Source # |
Instance details Defined in GHC.StgToJS.Regs Methods (==) :: StgReg -> StgReg -> Bool # (/=) :: StgReg -> StgReg -> Bool #
Ord StgReg Source # |
Instance details Defined in GHC.StgToJS.Regs Methods compare :: StgReg -> StgReg -> Ordering # (<) :: StgReg -> StgReg -> Bool # (<=) :: StgReg -> StgReg -> Bool # (>) :: StgReg -> StgReg -> Bool # (>=) :: StgReg -> StgReg -> Bool # max :: StgReg -> StgReg -> StgReg # min :: StgReg -> StgReg -> StgReg #

data Special Source #

Stack registers

Constructors

Stack |
Sp |

#### Instances

Instances details

ToJExpr Special Source # |
Instance details Defined in GHC.StgToJS.Regs Methods toJExpr :: Special -> JStgExpr Source # toJExprFromList :: [Special] -> JStgExpr Source #
Show Special Source # |
Instance details Defined in GHC.StgToJS.Regs Methods showsPrec :: Int -> Special -> ShowS # show :: Special -> String # showList :: [Special] -> ShowS #
Eq Special Source # |
Instance details Defined in GHC.StgToJS.Regs Methods (==) :: Special -> Special -> Bool # (/=) :: Special -> Special -> Bool #

sp :: JStgExpr Source #

stack :: JStgExpr Source #

r1 :: JStgExpr Source #

r2 :: JStgExpr Source #

r3 :: JStgExpr Source #

r4 :: JStgExpr Source #

regsFromR1 :: [StgReg] Source #

List of registers, starting from R1

regsFromR2 :: [StgReg] Source #

List of registers, starting from R2

jsRegsFromR1 :: [JStgExpr] Source #

List of registers, starting from R1 as JStgExpr

jsRegsFromR2 :: [JStgExpr] Source #

List of registers, starting from R2 as JExpr

data StgRet Source #

Return registers

Extra results from foreign calls can be stored here (while first result is directly returned)

Constructors

Ret1 |
Ret2 |
Ret3 |
Ret4 |
Ret5 |
Ret6 |
Ret7 |
Ret8 |
Ret9 |
Ret10 |

#### Instances

Instances details

ToJExpr StgRet Source # |
Instance details Defined in GHC.StgToJS.Regs Methods toJExpr :: StgRet -> JStgExpr Source # toJExprFromList :: [StgRet] -> JStgExpr Source #
Bounded StgRet Source # |
Instance details Defined in GHC.StgToJS.Regs Methods minBound :: StgRet # maxBound :: StgRet #
Enum StgRet Source # |
Instance details Defined in GHC.StgToJS.Regs Methods succ :: StgRet -> StgRet # pred :: StgRet -> StgRet # toEnum :: Int -> StgRet # fromEnum :: StgRet -> Int # enumFrom :: StgRet -> [StgRet] # enumFromThen :: StgRet -> StgRet -> [StgRet] # enumFromTo :: StgRet -> StgRet -> [StgRet] # enumFromThenTo :: StgRet -> StgRet -> StgRet -> [StgRet] #
Ix StgRet Source # |
Instance details Defined in GHC.StgToJS.Regs Methods range :: (StgRet, StgRet) -> [StgRet] # index :: (StgRet, StgRet) -> StgRet -> Int # unsafeIndex :: (StgRet, StgRet) -> StgRet -> Int # inRange :: (StgRet, StgRet) -> StgRet -> Bool # rangeSize :: (StgRet, StgRet) -> Int # unsafeRangeSize :: (StgRet, StgRet) -> Int #
Show StgRet Source # |
Instance details Defined in GHC.StgToJS.Regs Methods showsPrec :: Int -> StgRet -> ShowS # show :: StgRet -> String # showList :: [StgRet] -> ShowS #
Eq StgRet Source # |
Instance details Defined in GHC.StgToJS.Regs Methods (==) :: StgRet -> StgRet -> Bool # (/=) :: StgRet -> StgRet -> Bool #
Ord StgRet Source # |
Instance details Defined in GHC.StgToJS.Regs Methods compare :: StgRet -> StgRet -> Ordering # (<) :: StgRet -> StgRet -> Bool # (<=) :: StgRet -> StgRet -> Bool # (>) :: StgRet -> StgRet -> Bool # (>=) :: StgRet -> StgRet -> Bool # max :: StgRet -> StgRet -> StgRet # min :: StgRet -> StgRet -> StgRet #

jsRegToInt :: StgReg -> Int Source #

intToJSReg :: Int -> StgReg Source #

jsReg :: Int -> JStgExpr Source #

maxReg :: Int Source #

minReg :: Int Source #

register :: StgReg -> JStgExpr Source #

Given a register, return the JS syntax object representing that register

foreignRegister :: StgRet -> JStgExpr Source #

Given a register, return the JS syntax object representing that register