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-2/src/compiler/FLINT/trans/translate.sml
ViewVC logotype

Diff of /sml/branches/primop-branch-2/src/compiler/FLINT/trans/translate.sml

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

revision 504, Tue Dec 7 18:31:05 1999 UTC revision 587, Thu Mar 30 09:01:52 2000 UTC
# Line 920  Line 920 
920    
921  and mkFctexp (fe, d) =  and mkFctexp (fe, d) =
922    let fun g (VARfct f) = mkFct(f, d)    let fun g (VARfct f) = mkFct(f, d)
923          | g (FCTfct{param as M.STR{access=DA.LVAR v, ...}, argtycs, def}) =          | g (FCTfct {param as M.STR { access, ... }, argtycs, def }) =
924              (case access of
925                   DA.LVAR v =>
926                let val knds = map tpsKnd argtycs                let val knds = map tpsKnd argtycs
927                    val nd = DI.next d                    val nd = DI.next d
928                    val body = mkStrexp (def, nd)                    val body = mkStrexp (def, nd)
929                    val hdr = buildHdr v                    val hdr = buildHdr v
930                    (* binding of all v's components *)                    (* binding of all v's components *)
931                 in TFN(knds, FN(v, strLty(param, nd, compInfo), hdr body))                 in
932                       TFN(knds, FN(v, strLty(param, nd, compInfo), hdr body))
933                end                end
934                 | _ => bug "mkFctexp: unexpected access")
935          | g (LETfct (dec, b)) = mkDec (dec, d) (g b)          | g (LETfct (dec, b)) = mkDec (dec, d) (g b)
936          | g (MARKfct (b, reg)) = withRegion reg g b          | g (MARKfct (b, reg)) = withRegion reg g b
937          | g _ = bug "unexpected functor expressions in mkFctexp"          | g _ = bug "unexpected functor expressions in mkFctexp"
# Line 936  Line 940 
940    end    end
941    
942  and mkStrbs (sbs, d) =  and mkStrbs (sbs, d) =
943    let fun g (STRB{str=M.STR{access=DA.LVAR v, ...}, def, ...}, b) =    let fun g (STRB{str=M.STR { access, ... }, def, ... }, b) =
944              (case access of
945                   DA.LVAR v =>
946                 let val hdr = buildHdr v                 let val hdr = buildHdr v
947                     (* binding of all v's components *)                     (* binding of all v's components *)
948                  in LET(v, mkStrexp(def, d), hdr b)                 in
949                       LET(v, mkStrexp(def, d), hdr b)
950                 end                 end
951                 | _ => bug "mkStrbs: unexpected access")
952          | g _ = bug "unexpected structure bindings in mkStrbs"          | g _ = bug "unexpected structure bindings in mkStrbs"
   
953     in fold g sbs     in fold g sbs
954    end    end
955    
956  and mkFctbs (fbs, d) =  and mkFctbs (fbs, d) =
957    let fun g (FCTB{fct=M.FCT{access=DA.LVAR v, ...}, def, ...}, b) =    let fun g (FCTB{fct=M.FCT { access, ... }, def, ... }, b) =
958              (case access of
959                   DA.LVAR v =>
960                 let val hdr = buildHdr v                 let val hdr = buildHdr v
961                  in LET(v, mkFctexp(def, d), hdr b)                 in
962                       LET(v, mkFctexp(def, d), hdr b)
963                 end                 end
964                 | _ => bug "mkFctbs: unexpected access")
965          | g _ = bug "unexpected functor bindings in mkStrbs"          | g _ = bug "unexpected functor bindings in mkStrbs"
   
966     in fold g fbs     in fold g fbs
967    end    end
968    

Legend:
Removed from v.504  
changed lines
  Added in v.587

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