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

SCM Repository

[diderot] Annotation of /branches/femprime/src/compiler/high-to-mid/translate-field.sml
ViewVC logotype

Annotation of /branches/femprime/src/compiler/high-to-mid/translate-field.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 5048 - (view) (download)

1 : cchiw 5040 (* expand-fem.sml
2 :     *
3 :     * This code is part of the Diderot Project (http://diderot-language.cs.uchicago.edu)
4 :     *
5 :     * COPYRIGHT (c) 2016 The University of Chicago
6 :     * All rights reserved.
7 :     *)
8 :    
9 :     structure translateField : sig
10 :    
11 :     val transform : MidIR.assign -> MidIR.assign list
12 :    
13 :     end = struct
14 :    
15 :     structure IR = MidIR
16 :     structure V = IR.Var
17 :     structure Ty = MidTypes
18 :     structure E = Ein
19 :     structure IMap = IntRedBlackMap
20 :     structure ISet = IntRedBlackSet
21 :    
22 :    
23 :    
24 : cchiw 5048 fun transform (y, IR.EINAPP(ein as E.EIN{body,...}, args)) = (print "\n\ninside transform";case (body)
25 : cchiw 5040 of E.Probe(E.OField(ofld, _,_,_),_) => (case ofld
26 : cchiw 5048 of E.PolyWrap => ( print "poly ein transform";PolyEin.transform(y, ein, args))
27 :     | E.Fem => ( print "fem ein transform";ExpandFem.transform(y, IR.EINAPP(ein, args)))
28 : cchiw 5040 (* end case*))
29 : cchiw 5048 | _ => ( print ("\n\ntransform ein else"^EinPP.toString(ein)); [(y, IR.EINAPP(ein, args))])
30 : cchiw 5040 (* end case*))
31 : cchiw 5048 | transform (y, e) = ( print "transform non ein";[(y, e)])
32 : cchiw 5040 end

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