SCM Repository
[diderot] / branches / charisee / src / compiler / mid-to-low / toString.sml |
View of /branches/charisee/src/compiler/mid-to-low/toString.sml
Parent Directory
|
Revision Log
Revision 2615 -
(download)
(annotate)
Wed May 14 00:22:49 2014 UTC (6 years, 9 months ago) by cchiw
File size: 1039 byte(s)
Wed May 14 00:22:49 2014 UTC (6 years, 9 months ago) by cchiw
File size: 1039 byte(s)
added tree-il expressions and types
structure toStringEin = struct local structure DstIL = LowIL structure DstTy = LowILTypes structure DstOp = LowOps structure Var = LowIL.Var structure E = Ein in fun toStringRHS x = (case DstIL.Var.binding x of vb => String.concat[ "\n Found ", DstIL.vbToString vb,"\n"] (* end case *)) fun toStringAssgn(DstIL.ASSGN (x, A))=(case A of DstIL.OP(opss,args)=> String.concat [(Var.toString x),"==",DstOp.toString opss, " : ",(String.concatWith "," (List.map Var.toString args))] | DstIL.LIT _=> String.concat[Var.toString x,"==...Lit"] | DstIL.CONS (_, varl)=> String.concat[(Var.toString x),"==", (String.concatWith "," (List.map (fn e1=> Var.toString e1) varl))] | _ => String.concat[Var.toString x,"==","Etc",toStringRHS x] (*end case*)) | toStringAssgn _ = raise Fail "Non-assignment operator" fun toStringAll(ty,rator)= String.concat(["\n",DstTy.toString ty,"--", toStringAssgn rator] ) end end
root@smlnj-gforge.cs.uchicago.edu | ViewVC Help |
Powered by ViewVC 1.0.0 |