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

SCM Repository

[diderot] Diff of /trunk/src/compiler/IL/gen/high-il.in
ViewVC logotype

Diff of /trunk/src/compiler/IL/gen/high-il.in

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

revision 226, Tue Aug 3 21:34:18 2010 UTC revision 336, Tue Aug 24 20:24:21 2010 UTC
# Line 13  Line 13 
13    
14      datatype ty = BoolTy | StringTy | IntTy | TensorTy of int list      datatype ty = BoolTy | StringTy | IntTy | TensorTy of int list
15    
16      (* required helper functions for the "ty" type *)
17      fun samety (ty1 : ty, ty2) = (ty1 = ty2)      fun samety (ty1 : ty, ty2) = (ty1 = ty2)
18      fun hashty BoolTy = 0w1      fun hashty BoolTy = 0w1
19        | hashty StringTy = 0w2        | hashty StringTy = 0w2
# Line 21  Line 22 
22      fun tyToString BoolTy = "bool"      fun tyToString BoolTy = "bool"
23        | tyToString StringTy = "string"        | tyToString StringTy = "string"
24        | tyToString IntTy = "int"        | tyToString IntTy = "int"
25          | tyToString (TensorTy[]) = "real"
26        | tyToString (TensorTy dd) = String.concat[        | tyToString (TensorTy dd) = String.concat[
27              "tensor[", String.concatWith "," (List.map Int.toString dd), "]"              "tensor[", String.concatWith "," (List.map Int.toString dd), "]"
28            ]            ]
29    
30      (* required helper functions for the string type *)
31      fun samestring (s1 : string, s2) = (s1 = s2)      fun samestring (s1 : string, s2) = (s1 = s2)
32      val hashstring = HashString.hashString      val hashstring = HashString.hashString
33      fun stringToString s = String.concat["\"", s, "\""]      fun stringToString s = String.concat["\"", s, "\""]

Legend:
Removed from v.226  
changed lines
  Added in v.336

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