Debian Codegraph @

lib/mlrisc-lib/MLRISC/mltree/mltree-stream.sml

raw
1 (* mltree-stream.sml
2 *
3 * COPYRIGHT (c) 2001 Lucent Technologies, Bell Laboratories.
4 *
5 *)
6 functor MLTreeStream
7 ( structure T : MLTREE
8 structure S : INSTRUCTION_STREAM
9 ) : MLTREE_STREAM =
10 struct
11 structure T = T
12 structure S = S
13 (*
14 * Instruction streams
15 *)
16 type ('i,'cellset, 'cfg) stream = ('i, T.an list, 'cellset, 'cfg) S.stream
17
18 (*
19 * Extension mechanism
20 *)
21 datatype ('instr,'cellset,'operand,'addressing_mode, 'cfg) reducer =
22 REDUCER of
23 { reduceRexp : T.rexp -> T.reg,
24 reduceFexp : T.fexp -> T.reg,
25 reduceCCexp : T.ccexp -> T.reg,
26 reduceStm : T.stm * T.an list -> unit,
27 operand : T.rexp -> 'operand,
28 reduceOperand : 'operand -> T.reg,
29 addressOf : T.rexp -> 'addressing_mode,
30 emit : 'instr * T.an list -> unit,
31 instrStream : ('instr,'cellset, 'cfg) stream,
32 mltreeStream : (T.stm,T.mlrisc list, 'cfg) stream
33 }
34
35 end
36