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/main/flintcomp.sml
ViewVC logotype

Diff of /sml/trunk/src/compiler/FLINT/main/flintcomp.sml

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

revision 202, Sun Dec 13 02:29:45 1998 UTC revision 213, Fri Jan 15 21:18:35 1999 UTC
# Line 25  Line 25 
25    
26  fun phase x = Stats.doPhase (Stats.makePhase x)  fun phase x = Stats.doPhase (Stats.makePhase x)
27    
 val fcc = Stats.newCounter[];  
 val _ = Stats.registerStat(Stats.newStat("FContract", [fcc]))  
   
28  val deb2names = phase "Compiler 056 deb2names" TvarCvt.debIndex2names  val deb2names = phase "Compiler 056 deb2names" TvarCvt.debIndex2names
29  val names2deb = phase "Compiler 057 names2deb" TvarCvt.names2debIndex  val names2deb = phase "Compiler 057 names2deb" TvarCvt.names2debIndex
30    
# Line 35  Line 32 
32  val lcontract' = phase "Compiler 052 lcontract'" LContract.lcontract  val lcontract' = phase "Compiler 052 lcontract'" LContract.lcontract
33  val fcollect  = phase "Compiler 052a fcollect" Collect.collect  val fcollect  = phase "Compiler 052a fcollect" Collect.collect
34  val fcontract = phase "Compiler 052b fcontract" FContract.contract  val fcontract = phase "Compiler 052b fcontract" FContract.contract
35  val fcontract = fn f => ((* lcontract' f; *) fcontract(fcollect f, fcc))  val fcontract = fcontract o fcollect
36  val loopify   = phase "Compiler 057 loopify" Loopify.loopify  val loopify   = phase "Compiler 057 loopify" Loopify.loopify
37  val fixfix    = phase "Compiler 056 fixfix" FixFix.fixfix  val fixfix    = phase "Compiler 056 fixfix" FixFix.fixfix
38    
# Line 104  Line 101 
101        fun wff (f, s) = if wformed f then ()        fun wff (f, s) = if wformed f then ()
102                         else print ("\nAfter " ^ s ^ " CODE NOT WELL FORMED\n")                         else print ("\nAfter " ^ s ^ " CODE NOT WELL FORMED\n")
103    
104        (* val fcing = ref (!fcs)        (* f:FLINT.prog   flint code
105        fun fcontract f =         * fk:flintkind   what kind of flint variant this is
           case !fcing  
            of fcontract::fcs => (fcing := fcs; fcontract f)  
             | [] => let val fcc = Stats.newCounter[]  
                         val fcname = "FContract-"^(Int.toString(length(!fcs)))  
                         val coname = "FCollect-"^(Int.toString(length(!fcs)))  
                         val lcname = "LContract-"^(Int.toString(length(!fcs)))  
                         val fcstat = Stats.newStat(fcname, [fcc])  
                         val fcphase = phase ("Compiler 052b "^fcname)  
                                             FContract.contract  
                         val cophase = phase ("Compiler 052a "^coname)  
                                             Collect.collect  
                         val lcphase = phase ("Compiler 052 "^lcname)  
                                             LContract.lcontract  
                         fun g c = (lcphase c; fcphase(cophase c,fcc))  
               in  
                   Stats.registerStat fcstat;  
                   fcs := (!fcs) @ [g];  
                   g f  
               end *)  
   
       (* f:FLINT.prog   flint codee  
        * r:boot         whether it has gone through reify yet  
106         * l:string       last phase through which it went *)         * l:string       last phase through which it went *)
107        fun runphase (p,(f,fk,l)) =        fun runphase (p,(f,fk,l)) =
108            case (p,fk)            case (p,fk)

Legend:
Removed from v.202  
changed lines
  Added in v.213

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