Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Diff of /sml/branches/primop-branch-3/compiler/FLINT/opt/recover.sml
ViewVC logotype

Diff of /sml/branches/primop-branch-3/compiler/FLINT/opt/recover.sml

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

revision 2395, Tue Apr 10 22:12:19 2007 UTC revision 2396, Tue Apr 10 22:15:30 2007 UTC
# Line 79  Line 79 
79                | lpe (LET(vs, e1, e2)) =                | lpe (LET(vs, e1, e2)) =
80                    (addvs (ListPair.zip(vs, lpe e1)); lpe e2)                    (addvs (ListPair.zip(vs, lpe e1)); lpe e2)
81                | lpe (FIX(fdecs, e)) = (lpds fdecs; lpe e)                | lpe (FIX(fdecs, e)) = (lpds fdecs; lpe e)
82                | lpe (APP(u, vs)) = let val u' = lpv u                | lpe (APP(u, vs)) =
83                      let val u' = lpv u
84                                     in (#2(LT.ltd_fkfun u')                                     in (#2(LT.ltd_fkfun u')
85                  (* handle LT.DeconExn =>                        handle LT.DeconExn =>
86                         (PPFlint.printLexp (APP(u, vs));                         (print "\nError Application:\n";
87                          bug "loop in recover") *) )                          PPFlint.printLexp (APP(u, vs));
88                            raise LT.DeconExn))
89                                     end                                     end
90                | lpe (TFN((tfk, v, tvks, e1), e2)) =                | lpe (TFN((tfk, v, tvks, e1), e2)) =
91                    (addv(v, LT.lt_nvpoly(tvks, loop e1));                    (addv(v, LT.lt_nvpoly(tvks, loop e1));
# Line 115  Line 117 
117                | lpe (PRIMOP((_,_,lt,ts), _, v, e)) =                | lpe (PRIMOP((_,_,lt,ts), _, v, e)) =
118                    (addv (v, reslty (lt, ts)); lpe e)                    (addv (v, reslty (lt, ts)); lpe e)
119    
120           in lpe e           in lpe e handle LT.DeconExn => (print "\nWhole Expr:\n";
121                                             PPFlint.printLexp e; bug "ltd decon")
122          end (* function transform *)          end (* function transform *)
123    
124        val (fkind, f, vts, e) = fdec        val (fkind, f, vts, e) = fdec
125        val _ = addvs vts        val _ = addvs vts
126        val atys = map #2 vts        val atys = map #2 vts
127        (* val _ = PPFlint.printLexp e *)        (* val _ = PPFlint.printLexp e *)
128        val rtys = loop e handle LT.DeconExn => (PPFlint.printLexp e; bug "ltd decon")        val rtys = loop e
129        val _ = addv (f, LT.ltc_fkfun(fkind, atys, rtys))        val _ = addv (f, LT.ltc_fkfun(fkind, atys, rtys))
130    in {getLty=getlty, cleanUp=fn () => IntHashTable.clear zz, addLty=addv}    in {getLty=getlty, cleanUp=fn () => IntHashTable.clear zz, addLty=addv}
131   end (* function recover *)   end (* function recover *)

Legend:
Removed from v.2395  
changed lines
  Added in v.2396

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