idris-0.9.15: Functional Programming Language with Dependent Types

Safe HaskellNone

IRTS.Bytecode

Documentation

data Reg Source

Constructors

RVal 
L Int 
T Int 
Tmp 

Instances

Eq Reg 
Show Reg 

data BC Source

Constructors

ASSIGN Reg Reg 
ASSIGNCONST Reg Const 
UPDATE Reg Reg 
MKCON Reg (Maybe Reg) Int [Reg] 
CASE Bool Reg [(Int, [BC])] (Maybe [BC]) 
PROJECT Reg Int Int 
PROJECTINTO Reg Reg Int 
CONSTCASE Reg [(Const, [BC])] (Maybe [BC]) 
CALL Name 
TAILCALL Name 
FOREIGNCALL Reg FLang FType String [(FType, Reg)] 
SLIDE Int 
REBASE 
RESERVE Int 
ADDTOP Int 
TOPBASE Int 
BASETOP Int 
STOREOLD 
OP Reg PrimFn [Reg] 
NULL Reg 
ERROR String 

Instances

Show BC 

toBC :: (Name, SDecl) -> (Name, [BC])Source

clean :: Bool -> [BC]Source

bc :: Reg -> SExp -> Bool -> [BC]Source

isConst :: [SAlt] -> BoolSource

moveReg :: Int -> [LVar] -> [BC]Source

assign :: Reg -> Reg -> [BC]Source

conCase :: Bool -> Reg -> Reg -> [SAlt] -> Bool -> [BC]Source

constCase :: Reg -> Reg -> [SAlt] -> Bool -> [BC]Source

caseAlt :: Reg -> Reg -> Bool -> SAlt -> Maybe (Int, [BC])Source

constAlt :: t -> Reg -> Bool -> SAlt -> Maybe (Const, [BC])Source

defaultAlt :: Reg -> [SAlt] -> Bool -> Maybe [BC]Source