Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] Diff of /branches/pure-cfg/src/compiler/gen/il/mid-il.in
ViewVC logotype

Diff of /branches/pure-cfg/src/compiler/gen/il/mid-il.in

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1623, Fri Nov 11 21:58:50 2011 UTC revision 1624, Sat Nov 12 16:50:10 2011 UTC
# Line 11  Line 11 
11  structure MidOps =  structure MidOps =
12    struct    struct
13    
14      (* required helper functions for types *)
15      type ty = MidILTypes.ty      type ty = MidILTypes.ty
   
16      val samety = MidILTypes.same      val samety = MidILTypes.same
17      val hashty = MidILTypes.hash      val hashty = MidILTypes.hash
18      val tyToString = MidILTypes.toString      val tyToString = MidILTypes.toString
19    
20      (* required helper functions for type lists *)
21        type tys = ty list
22        fun sametys (tys1, tys2) = ListPair.allEq samety (tys1, tys2)
23        fun hashtys tys = List.foldl (fn (ty, s) => hashty ty + 0w3 * s) 0w0 tys
24        fun tysToString tys = String.concat["[", String.concatWith "," (List.map tyToString tys), "]" ]
25    
26    (* required helper functions for the int type *)    (* required helper functions for the int type *)
27      fun sameint (i1 : int, i2) = (i1 = i2)      fun sameint (i1 : int, i2) = (i1 = i2)
28      fun hashint i = Word.fromInt i      fun hashint i = Word.fromInt i

Legend:
Removed from v.1623  
changed lines
  Added in v.1624

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