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

SCM Repository

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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 5048 - (download) (annotate)
Thu Jul 13 01:09:59 2017 UTC (2 years, 1 month ago) by cchiw
File size: 1046 byte(s)
put evalfem in ein ir
(* expand-fem.sml
 *
 * This code is part of the Diderot Project (http://diderot-language.cs.uchicago.edu)
 *
 * COPYRIGHT (c) 2016 The University of Chicago
 * All rights reserved.
 *)

structure translateField : sig

    val transform : MidIR.assign -> MidIR.assign list

  end = struct

    structure IR = MidIR
    structure V = IR.Var
    structure Ty = MidTypes
    structure E = Ein
    structure IMap = IntRedBlackMap
    structure ISet = IntRedBlackSet



fun transform (y, IR.EINAPP(ein as E.EIN{body,...}, args)) = (print "\n\ninside transform";case (body)
        of E.Probe(E.OField(ofld, _,_,_),_) => (case ofld
            of E.PolyWrap   => ( print "poly ein transform";PolyEin.transform(y, ein, args))
            | E.Fem         =>  ( print "fem ein transform";ExpandFem.transform(y, IR.EINAPP(ein, args)))
            (* end case*))
        | _ =>  ( print ("\n\ntransform ein else"^EinPP.toString(ein)); [(y, IR.EINAPP(ein, args))])
         (* end case*))
    | transform (y, e) =    ( print "transform non ein";[(y, e)])
end

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