Safe Haskell | None |
---|---|
Language | Haskell2010 |
IR loosely based on Appel book.
Synopsis
- writeModule :: SizeEnv -> Declarations () (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 :: SizeEnv -> KempeTy a -> Size
Documentation
writeModule :: SizeEnv -> Declarations () (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
Eq RelBinOp Source # | |
Generic RelBinOp Source # | |
NFData RelBinOp Source # | |
Pretty RelBinOp Source # | |
Defined in Kempe.IR prettyList :: [RelBinOp] -> Doc ann | |
type Rep RelBinOp Source # | |
Defined in Kempe.IR type Rep RelBinOp = D1 ('MetaData "RelBinOp" "Kempe.IR" "kempe-0.1.1.0-inplace-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
Eq IntBinOp Source # | |
Generic IntBinOp Source # | |
NFData IntBinOp Source # | |
Pretty IntBinOp Source # | |
Defined in Kempe.IR prettyList :: [IntBinOp] -> Doc ann | |
type Rep IntBinOp Source # | |
Defined in Kempe.IR type Rep IntBinOp = D1 ('MetaData "IntBinOp" "Kempe.IR" "kempe-0.1.1.0-inplace-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
Eq BoolBinOp Source # | |
Generic BoolBinOp Source # | |
NFData BoolBinOp Source # | |
Pretty BoolBinOp Source # | |
Defined in Kempe.IR pretty :: BoolBinOp -> Doc ann prettyList :: [BoolBinOp] -> Doc ann | |
type Rep BoolBinOp Source # | |
Defined in Kempe.IR type Rep BoolBinOp = D1 ('MetaData "BoolBinOp" "Kempe.IR" "kempe-0.1.1.0-inplace-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 # | |
Defined in Kempe.IR prettyList :: [Temp] -> Doc ann | |
type Rep Temp Source # | |
Defined in Kempe.IR type Rep Temp = D1 ('MetaData "Temp" "Kempe.IR" "kempe-0.1.1.0-inplace-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))) |