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

SCM Repository

[diderot] Diff of /branches/vis15/src/compiler/gen/ir/low-ir.in
ViewVC logotype

Diff of /branches/vis15/src/compiler/gen/ir/low-ir.in

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

revision 3651, Tue Feb 2 16:59:08 2016 UTC revision 3652, Tue Feb 2 20:23:12 2016 UTC
# Line 23  Line 23 
23      type tys = ty list      type tys = ty list
24      fun sametys (tys1, tys2) = ListPair.allEq samety (tys1, tys2)      fun sametys (tys1, tys2) = ListPair.allEq samety (tys1, tys2)
25      fun hashtys tys = List.foldl (fn (ty, s) => hashty ty + 0w3 * s) 0w0 tys      fun hashtys tys = List.foldl (fn (ty, s) => hashty ty + 0w3 * s) 0w0 tys
26      fun tysToString tys = String.concat["[", String.concatWith "," (List.map tyToString tys), "]" ]      fun tysToString tys = String.concat["[", String.concatWithMap "," tyToString tys, "]" ]
27    
28    (* required helper functions for the int type *)    (* required helper functions for the int type *)
29      fun sameint (i1 : int, i2) = (i1 = i2)      fun sameint (i1 : int, i2) = (i1 = i2)
# Line 35  Line 35 
35      val hashstring = HashString.hashString      val hashstring = HashString.hashString
36      fun stringToString s = String.concat["\"", s, "\""]      fun stringToString s = String.concat["\"", s, "\""]
37    
38      (* required helper functions for the shape type *)
39        type shape = int list
40        val sameshape : (shape * shape -> bool) = (op =)
41        fun hashshape shp =
42              List.foldl (fn (i, w) => Word.xorb(Word.<<(w, 0w1), Word.fromInt i))
43                (Word.fromInt(List.length shp)) shp
44        fun shapeToString shp = String.concat["[", String.concatWithMap "," Int.toString shp, "]"]
45    
46    (* required helper functions for the mask type *)    (* required helper functions for the mask type *)
47      type mask = bool list      type mask = bool list
48      val samemask : (mask * mask -> bool) = (op =)      val samemask : (mask * mask -> bool) = (op =)

Legend:
Removed from v.3651  
changed lines
  Added in v.3652

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