Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Annotation of /sml/trunk/src/MLRISC/mltree/mltree-size.sml
ViewVC logotype

Annotation of /sml/trunk/src/MLRISC/mltree/mltree-size.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1181 - (view) (download)

1 : leunga 624 functor MLTreeSize
2 :     (structure T : MLTREE
3 :     val intTy : T.ty (* size of integer word *)
4 :     ) : MLTREE_SIZE =
5 :     struct
6 :     structure T = T
7 :    
8 :     val intTy = intTy
9 :    
10 :     fun size(T.REG(ty,_)) = ty
11 :     | size(T.LI _) = intTy
12 :     | size(T.LABEL _) = intTy
13 :     | size(T.CONST _) = intTy
14 : leunga 796 | size(T.LABEXP e) = size e
15 : leunga 624 | size(T.NEG(ty,_)) = ty
16 :     | size(T.ADD(ty,_,_)) = ty
17 :     | size(T.SUB(ty,_,_)) = ty
18 :     | size(T.MULS(ty,_,_)) = ty
19 : blume 1181 | size(T.DIVS(_,ty,_,_)) = ty
20 :     | size(T.REMS(_,ty,_,_)) = ty
21 : leunga 624 | size(T.MULU(ty,_,_)) = ty
22 :     | size(T.DIVU(ty,_,_)) = ty
23 :     | size(T.REMU(ty,_,_)) = ty
24 :     | size(T.NEGT(ty,_)) = ty
25 :     | size(T.ADDT(ty,_,_)) = ty
26 :     | size(T.SUBT(ty,_,_)) = ty
27 :     | size(T.MULT(ty,_,_)) = ty
28 : blume 1181 | size(T.DIVT(_,ty,_,_)) = ty
29 :     | size(T.REMT(_,ty,_,_)) = ty
30 : leunga 624 | size(T.ANDB(ty,_,_)) = ty
31 :     | size(T.ORB(ty,_,_)) = ty
32 :     | size(T.XORB(ty,_,_)) = ty
33 : leunga 744 | size(T.EQVB(ty,_,_)) = ty
34 : leunga 624 | size(T.NOTB(ty,_)) = ty
35 :     | size(T.SRA(ty,_,_)) = ty
36 :     | size(T.SRL(ty,_,_)) = ty
37 :     | size(T.SLL(ty,_,_)) = ty
38 : leunga 744 | size(T.SX(ty,_,_)) = ty
39 :     | size(T.ZX(ty,_,_)) = ty
40 :     | size(T.CVTF2I(ty,_,_,_)) = ty
41 : leunga 624 | size(T.COND(ty,_,_,_)) = ty
42 :     | size(T.LOAD(ty,_,_)) = ty
43 : leunga 744 | size(T.PRED(e,_)) = size e
44 : leunga 624 | size(T.LET(_,e)) = size e
45 :     | size(T.REXT(ty,_)) = ty
46 :     | size(T.MARK(e,_)) = size e
47 : leunga 744 | size(T.OP(ty,_,_)) = ty
48 :     | size(T.ARG(ty,_,_)) = ty
49 :     | size(T.$(ty,_,_)) = ty
50 :     | size(T.PARAM _) = intTy
51 :     | size(T.BITSLICE(ty,_,_)) = ty
52 :     | size(T.???) = intTy
53 : leunga 624
54 :     fun fsize(T.FREG(ty,_)) = ty
55 :     | fsize(T.FLOAD(ty,_,_)) = ty
56 :     | fsize(T.FADD(ty,_,_)) = ty
57 :     | fsize(T.FSUB(ty,_,_)) = ty
58 :     | fsize(T.FMUL(ty,_,_)) = ty
59 :     | fsize(T.FDIV(ty,_,_)) = ty
60 :     | fsize(T.FABS(ty,_)) = ty
61 :     | fsize(T.FNEG(ty,_)) = ty
62 :     | fsize(T.FSQRT(ty,_)) = ty
63 :     | fsize(T.FCOND(ty,_,_,_)) = ty
64 :     | fsize(T.CVTI2F(ty,_,_)) = ty
65 :     | fsize(T.CVTF2F(ty,_,_)) = ty
66 :     | fsize(T.FCOPYSIGN(ty,_,_)) = ty
67 :     | fsize(T.FPRED(e,_)) = fsize e
68 :     | fsize(T.FEXT(ty,_)) = ty
69 :     | fsize(T.FMARK(e,_)) = fsize e
70 :    
71 :     end

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0