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/trunk/src/compiler/FLINT/cps/convert.sml
ViewVC logotype

Diff of /sml/trunk/src/compiler/FLINT/cps/convert.sml

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

revision 251, Mon Apr 19 02:55:26 1999 UTC revision 423, Mon Sep 6 02:32:11 1999 UTC
# Line 21  Line 21 
21        structure DI = DebIndex        structure DI = DebIndex
22        structure F  = FLINT        structure F  = FLINT
23        structure FU = FlintUtil        structure FU = FlintUtil
24        structure M  = IntmapF        structure M  = IntBinaryMap
25    
26        open CPS        open CPS
27  in  in
# Line 412  Line 412 
412                                   (vl,                                   (vl,
413                                    FIX([(KNOWN_TAIL, f', vl', cl',                                    FIX([(KNOWN_TAIL, f', vl', cl',
414                                          (* add the function to the tail map *)                                          (* add the function to the tail map *)
415                                          loop' (M.add(m,f,f')) (e, kont))],                                          loop' (M.insert(m,f,f')) (e, kont))],
416                                        APP(VAR f', map VAR (tl vl))))                                        APP(VAR f', map VAR (tl vl))))
417                               end                               end
418                                | _ => (k::(map #1 vts), loop(e, kont))                                | _ => (k::(map #1 vts), loop(e, kont))
# Line 422  Line 422 
422              end              end
423            | F.APP(f as F.VAR lv, vs) =>            | F.APP(f as F.VAR lv, vs) =>
424              (* first check if it's a recursive call to a tail loop *)              (* first check if it's a recursive call to a tail loop *)
425              (let val f' = M.lookup m lv              (case M.find(m, lv)
426              in APP(VAR f', lpvars vs)                of SOME f' => APP(VAR f', lpvars vs)
427              end handle M.IntmapF =>                 | NONE =>
428                       (* code for the non-tail case.                       (* code for the non-tail case.
429                        * Sadly this is *not* exceptional *)                        * Sadly this is *not* exceptional *)
430                       let val (hdr, F) = preventEta c                       let val (hdr, F) = preventEta c

Legend:
Removed from v.251  
changed lines
  Added in v.423

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