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/SMLNJ/src/compiler/FLINT/clos/unrebind.sml
ViewVC logotype

Diff of /sml/branches/SMLNJ/src/compiler/FLINT/clos/unrebind.sml

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

revision 93, Tue May 12 21:56:22 1998 UTC revision 100, Thu May 14 04:56:46 1998 UTC
# Line 23  Line 23 
23    open CPS    open CPS
24  in  in
25    
26    fun bug s = ErrorMsg.impossible ("UnRebind: " ^ s)
27    
28  fun unrebind (fk,v,args,cl,ce) =  fun unrebind (fk,v,args,cl,ce) =
29  let fun rename rebind(VAR v) =  let fun rename rebind(VAR v) =
30            let fun f nil = VAR v            let fun f nil = VAR v
# Line 45  Line 47 
47        let val rename = rename rebind        let val rename = rename rebind
48            val rec h =            val rec h =
49                 fn RECORD(kind,vl,w,e) =>                 fn RECORD(kind,vl,w,e) =>
50                      RECORD(kind,map (fn(v,p) => (rename v,p)) vl,w,h e)                      let val w' = LambdaVar.dupLvar w
51                         in RECORD(kind, map (fn(v,p) => (rename v,p)) vl,
52                                   w', g ((w, VAR w')::rebind) e)
53                        end
54                  | OFFSET(0,v,w,e) => g ((w,rename v)::rebind) e                  | OFFSET(0,v,w,e) => g ((w,rename v)::rebind) e
55                  | OFFSET(i,v,w,e) =>                  | OFFSET(i,v,w,e) => bug "unexpected none-zero OFFSET"
56    (*
57                      let val w' = LambdaVar.dupLvar w                      let val w' = LambdaVar.dupLvar w
58                       in  OFFSET(i,rename v,w',g ((w, VAR w')::rebind) e)                       in  OFFSET(i,rename v,w',g ((w, VAR w')::rebind) e)
59                      end                      end
60    *)
61                  | SELECT(i,v,w,t,e) =>                  | SELECT(i,v,w,t,e) =>
62                      let val w' = LambdaVar.dupLvar w                      let val w' = LambdaVar.dupLvar w
63                       in  SELECT(i,rename v,w',t,g((w, VAR w')::rebind) e)                       in  SELECT(i,rename v,w',t,g((w, VAR w')::rebind) e)

Legend:
Removed from v.93  
changed lines
  Added in v.100

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