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

SCM Repository

[diderot] Diff of /branches/charisee/src/compiler/tree-il/tree-func.sml
ViewVC logotype

Diff of /branches/charisee/src/compiler/tree-il/tree-func.sml

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

revision 2645, Thu May 29 15:38:33 2014 UTC revision 2646, Thu May 29 15:52:23 2014 UTC
# Line 5  Line 5 
5      structure Ty = TreeILTypes      structure Ty = TreeILTypes
6      structure Op = TreeOps      structure Op = TreeOps
7    
8      datatype oprator = LD of int * int *   Literal.literal | MKVEC of int | OP of Op.rator | CONS of Ty.ty |  FVEC of int*int |SVEC of int      datatype oprator = LD of int * int *   Literal.literal | MKVEC of int | OP of Op.rator | CONS of Ty.ty |  REALTOVEC of int
9            |  FVEC of int*int |SVEC of int
10    
11    
12    
# Line 16  Line 17 
17      | same ( MKVEC a0,  MKVEC b0)=Op.sameint(a0, b0)      | same ( MKVEC a0,  MKVEC b0)=Op.sameint(a0, b0)
18      | same ( OP a0,  OP b0)= Op.same(a0,b0)      | same ( OP a0,  OP b0)= Op.same(a0,b0)
19      | same ( CONS a0, CONS b0)= Ty.same(a0,b0)      | same ( CONS a0, CONS b0)= Ty.same(a0,b0)
20        | same(REALTOVEC a0, REALTOVEC b0)=Op.sameint(a0,b0)
21      | same( FVEC(a0,a1), FVEC(b0,b1))= Op.sameint(a0, b0) andalso Op.sameint(a1, b1)      | same( FVEC(a0,a1), FVEC(b0,b1))= Op.sameint(a0, b0) andalso Op.sameint(a1, b1)
22      | same( SVEC (a0), SVEC(b0))= Op.sameint(a0, b0)      | same( SVEC (a0), SVEC(b0))= Op.sameint(a0, b0)
23      | same _ =false      | same _ =false
# Line 24  Line 26 
26      | hash ( MKVEC (tyOrig))= 0w5 + Op.hashint tyOrig      | hash ( MKVEC (tyOrig))= 0w5 + Op.hashint tyOrig
27      | hash ( OP(rator))= 0w7 + Op.hash(rator)      | hash ( OP(rator))= 0w7 + Op.hash(rator)
28      | hash(  CONS a0)= 0w11 +Ty.hash(a0)      | hash(  CONS a0)= 0w11 +Ty.hash(a0)
29        | hash(REALTOVEC a0)= 0w19 + Op.hashint a0
30      | hash( FVEC(a0,a1)) =0w13+Op.hashint a0 + Op.hashint a1      | hash( FVEC(a0,a1)) =0w13+Op.hashint a0 + Op.hashint a1
31      | hash( SVEC (a0)) =0w17+Op.hashint a0      | hash( SVEC (a0)) =0w17+Op.hashint a0
32    
# Line 31  Line 34 
34      | toString( MKVEC (tyOrig))=String.concat["MKVEC(",q tyOrig,")"]      | toString( MKVEC (tyOrig))=String.concat["MKVEC(",q tyOrig,")"]
35      | toString( OP(rator))=String.concat["OP-",Op.toString rator]      | toString( OP(rator))=String.concat["OP-",Op.toString rator]
36      | toString( CONS a0)= String.concat["CONS-",Ty.toString(a0)]      | toString( CONS a0)= String.concat["CONS-",Ty.toString(a0)]
37        | toString(REALTOVEC a0)=String.concat["RealToVEC-", q a0]
38      | toString( FVEC (tyNew,tyOrig))= String.concat["FILLVEC:", q tyOrig , "to",q tyNew ]      | toString( FVEC (tyNew,tyOrig))= String.concat["FILLVEC:", q tyOrig , "to",q tyNew ]
39      | toString( SVEC  (tyNew))= String.concat["STOREVEC:", q tyNew]      | toString( SVEC  tyNew)= String.concat["SLICEVEC:", q tyNew]
40    
41    
42      fun cmp(e1,e2)=String.compare(toString e1, toString e2)      fun cmp(e1,e2)=String.compare(toString e1, toString e2)

Legend:
Removed from v.2645  
changed lines
  Added in v.2646

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