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

SCM Repository

[diderot] View of /branches/charisee/src/compiler/mid-il/midToString.sml
ViewVC logotype

View of /branches/charisee/src/compiler/mid-il/midToString.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2845 - (download) (annotate)
Fri Dec 12 06:46:23 2014 UTC (4 years, 7 months ago) by cchiw
File size: 877 byte(s)
added norm
(*Just converts EINAPPS to string
 * Used for debugging
 *)
structure MidToString =
struct

 structure DstIL = MidIL
 structure DstTy = MidILTypes
 structure DstOp = MidOps
 structure Var = MidIL.Var
 structure P=Printer
 
    fun printEINAPP(id, DstIL.EINAPP(rator, args))=let
        val a=String.concatWith " , " (List.map Var.toString args)
        in
            String.concat([(DstTy.toString (Var.ty id)),"<",
            Var.toString id,"> ==",P.printerE rator, a,"\n"])
        end
    | printEINAPP(id, DstIL.OP(rator, args))=let
        val a=String.concatWith " , " (List.map Var.toString args)
        in
            String.concat([(DstTy.toString (Var.ty id)),"<",
            Var.toString id,"> =",DstOp.toString rator,a,"\n"])
        end
        
    | printEINAPP(id,_)= String.concat([Var.toString id,"<",(DstTy.toString (Var.ty id)),"> non-einapp\n"])


end

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