Safe Haskell | None |
---|---|
Language | Haskell2010 |
IR loosely based on Appel book.
Synopsis
- writeModule :: Module () (ConsAnn MonoStackType) MonoStackType -> TempM [Stmt]
- data Stmt
- data Exp
- data RelBinOp
- data IntBinOp
- data BoolBinOp
- type Label = Word
- data Temp
- = Temp64 !Int
- | Temp8 !Int
- | DataPointer
- runTempM :: TempM a -> (a, WriteSt)
- type TempM = State TempSt
- prettyIR :: [Stmt] -> Doc ann
- data WriteSt = WriteSt {}
- size :: KempeTy a -> Int64
Documentation
writeModule :: Module () (ConsAnn MonoStackType) MonoStackType -> TempM [Stmt] Source #
Labeled Label | |
Jump Label | |
CJump Exp Label Label | |
MJump Exp Label | |
CCall MonoStackType ByteString | |
KCall Label | |
WrapKCall ABI MonoStackType ByteString Label | |
MovTemp Temp Exp | |
MovMem Exp Int64 Exp | |
Ret |
Instances
Instances
Instances
Generic RelBinOp Source # | |
NFData RelBinOp Source # | |
Pretty RelBinOp Source # | |
type Rep RelBinOp Source # | |
Defined in Kempe.IR type Rep RelBinOp = D1 ('MetaData "RelBinOp" "Kempe.IR" "kempe-0.1.0.0-37UN4MutUBa1oYJTH0xWlz-kempe-modules" 'False) ((C1 ('MetaCons "IntEqIR" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "IntNeqIR" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "IntLtIR" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "IntGtIR" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "IntLeqIR" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "IntGeqIR" 'PrefixI 'False) (U1 :: Type -> Type)))) |
IntPlusIR | |
IntTimesIR | |
IntDivIR | |
IntMinusIR | |
IntModIR | |
IntXorIR | |
WordShiftRIR | |
WordShiftLIR | |
WordModIR | |
WordDivIR |
Instances
Generic IntBinOp Source # | |
NFData IntBinOp Source # | |
Pretty IntBinOp Source # | |
type Rep IntBinOp Source # | |
Defined in Kempe.IR type Rep IntBinOp = D1 ('MetaData "IntBinOp" "Kempe.IR" "kempe-0.1.0.0-37UN4MutUBa1oYJTH0xWlz-kempe-modules" 'False) (((C1 ('MetaCons "IntPlusIR" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "IntTimesIR" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "IntDivIR" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "IntMinusIR" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "IntModIR" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "IntXorIR" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "WordShiftRIR" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "WordShiftLIR" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "WordModIR" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "WordDivIR" 'PrefixI 'False) (U1 :: Type -> Type))))) |
Instances
Generic BoolBinOp Source # | |
NFData BoolBinOp Source # | |
Pretty BoolBinOp Source # | |
type Rep BoolBinOp Source # | |
Defined in Kempe.IR type Rep BoolBinOp = D1 ('MetaData "BoolBinOp" "Kempe.IR" "kempe-0.1.0.0-37UN4MutUBa1oYJTH0xWlz-kempe-modules" 'False) (C1 ('MetaCons "BoolAnd" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "BoolOr" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "BoolXor" 'PrefixI 'False) (U1 :: Type -> Type))) |
Instances
Eq Temp Source # | |
Generic Temp Source # | |
NFData Temp Source # | |
Pretty Temp Source # | |
type Rep Temp Source # | |
Defined in Kempe.IR type Rep Temp = D1 ('MetaData "Temp" "Kempe.IR" "kempe-0.1.0.0-37UN4MutUBa1oYJTH0xWlz-kempe-modules" 'False) (C1 ('MetaCons "Temp64" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int)) :+: (C1 ('MetaCons "Temp8" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int)) :+: C1 ('MetaCons "DataPointer" 'PrefixI 'False) (U1 :: Type -> Type))) |