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

SCM Repository

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

Diff of /branches/vis12-cl/src/compiler/gen/il/mid-il.in

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

revision 390, Wed Oct 13 19:56:41 2010 UTC revision 391, Thu Oct 14 13:18:24 2010 UTC
# Line 11  Line 11 
11  structure MidOps =  structure MidOps =
12    struct    struct
13    
14      datatype ty = BoolTy | StringTy | IntTy | VecTy of int      type ty = MidILTypes.ty
15    
16      val realTy = VecTy 0      val samety = MidILTypes.same
17        val hashty = MidILTypes.hash
18      fun samety (ty1 : ty, ty2) = (ty1 = ty2)      val tyToString = MidILTypes.toString
     fun hashty BoolTy = 0w1  
       | hashty StringTy = 0w2  
       | hashty IntTy = 0w3  
       | hashty (VecTy d) = Word.fromInt d + 0w4  
     fun tyToString BoolTy = "bool"  
       | tyToString StringTy = "string"  
       | tyToString IntTy = "int"  
       | tyToString (VecTy 0) = "real"  
       | tyToString (VecTy d) = "vec" ^ Int.toString d  
19    
20      fun sameint (i1 : int, i2) = (i1 = i2)      fun sameint (i1 : int, i2) = (i1 = i2)
21      fun hashint i = Word.fromInt i      fun hashint i = Word.fromInt i

Legend:
Removed from v.390  
changed lines
  Added in v.391

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