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

SCM Repository

[diderot] Diff of /branches/vis15/src/compiler/tree-ir/tree-types.sml
ViewVC logotype

Diff of /branches/vis15/src/compiler/tree-ir/tree-types.sml

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

revision 3845, Tue May 10 19:17:45 2016 UTC revision 3846, Wed May 11 13:35:09 2016 UTC
# Line 32  Line 32 
32        | TupleTy of t list               (* tuples; used for multiple return values *)        | TupleTy of t list               (* tuples; used for multiple return values *)
33        | SeqTy of t * int option        | SeqTy of t * int option
34        | ImageTy of ImageInfo.info        | ImageTy of ImageInfo.info
35          | StrandTy of Atom.atom
36    
37      val intTy = IntTy      val intTy = IntTy
38    
# Line 62  Line 63 
63        | same (SeqTy(ty1, NONE), SeqTy(ty2, NONE)) = same(ty1, ty2)        | same (SeqTy(ty1, NONE), SeqTy(ty2, NONE)) = same(ty1, ty2)
64        | same (SeqTy(ty1, SOME n1), SeqTy(ty2, SOME n2)) = (n1 = n2) andalso same(ty1, ty2)        | same (SeqTy(ty1, SOME n1), SeqTy(ty2, SOME n2)) = (n1 = n2) andalso same(ty1, ty2)
65        | same (ImageTy info1, ImageTy info2) = ImageInfo.sameShape(info1, info2)        | same (ImageTy info1, ImageTy info2) = ImageInfo.sameShape(info1, info2)
66          | same (StrandTy n1, StrandTy n2) = Atom.same(n1, n2)
67        | same _ = false        | same _ = false
68    
69      fun hash BoolTy = 0w1      fun hash BoolTy = 0w1
# Line 73  Line 75 
75        | hash (SeqTy(ty, NONE)) = hash ty + 0w19        | hash (SeqTy(ty, NONE)) = hash ty + 0w19
76        | hash (SeqTy(ty, SOME n)) = Word.fromInt n * hash ty + 0w23        | hash (SeqTy(ty, SOME n)) = Word.fromInt n * hash ty + 0w23
77        | hash (ImageTy info) = 0w37 * ImageInfo.hash info + 0w6        | hash (ImageTy info) = 0w37 * ImageInfo.hash info + 0w6
78          | hash (StrandTy n) = Atom.hash n
79    
80      fun toString BoolTy = "bool"      fun toString BoolTy = "bool"
81        | toString StringTy = "string"        | toString StringTy = "string"
# Line 90  Line 93 
93        | toString (SeqTy(ty, NONE)) = toString ty ^ "[]"        | toString (SeqTy(ty, NONE)) = toString ty ^ "[]"
94        | toString (SeqTy(ty, SOME n)) = concat[toString ty, "[", Int.toString n, "]"]        | toString (SeqTy(ty, SOME n)) = concat[toString ty, "[", Int.toString n, "]"]
95        | toString (ImageTy info) = concat["image(", ImageInfo.toString info, ")"]        | toString (ImageTy info) = concat["image(", ImageInfo.toString info, ")"]
96          | toString (StrandTy n) = Atom.toString n
97    
98      structure Tbl = HashTableFn (      structure Tbl = HashTableFn (
99        struct        struct

Legend:
Removed from v.3845  
changed lines
  Added in v.3846

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