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/compiler/TopLevel/main/compile.sml
ViewVC logotype

Diff of /sml/trunk/compiler/TopLevel/main/compile.sml

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

revision 675, Fri Jun 23 09:18:18 2000 UTC revision 698, Mon Aug 21 22:05:47 2000 UTC
# Line 124  Line 124 
124  (** take the flint code and generate the machine binary code *)  (** take the flint code and generate the machine binary code *)
125  local  local
126      val inline = LSplitInline.inline      val inline = LSplitInline.inline
     (* fun inline (flint, imports, symenv) = flint *)  
 (*  
     let val importExps = map (SymbolicEnv.look symenv) (map #1 imports)  
      in (* optimize flint based on the knowledge of importExps *)  
         bug "inline not implemented yet"  
     end  
 *)  
   
   fun split (flint, enable) =  
     if false (* enable *) then (case NONE (* FLINTSplit.split flint *)  
                                  of NONE => (flint, NONE)  
                                   | SOME x => x)  
     else (flint, NONE)  
   
   
127    val addCode = ST.addStat (ST.makeStat "Code Size")    val addCode = ST.addStat (ST.makeStat "Code Size")
128  in  in
129      fun codegen { flint: flint, imports: import list, symenv: symenv,      fun codegen { flint: flint, imports: import list, symenv: symenv,
130                    splitting: bool, compInfo: compInfo } = let                    splitting: bool, compInfo: compInfo } = let
131          (* hooks for cross-module inlining and specialization *)          (* hooks for cross-module inlining and specialization *)
132          val (flint, revisedImports) = inline (flint, imports, symenv)          val (flint, revisedImports) = inline (flint, imports, symenv)
         (* val (flint, inlineExp : flint option) = split(flint, splitting) *)  
133    
134          (* from optimized FLINT code, generate the machine code *)          (* from optimized FLINT code, generate the machine code.  *)
135          val (csegs,inlineExp) = M.flintcomp(flint, compInfo)          val (csegs,inlineExp) = M.flintcomp(flint, compInfo)
136            (* Obey the nosplit directive used during bootstrapping.  *)
137            val inlineExp = if splitting then inlineExp else NONE
138          val codeSz =          val codeSz =
139                List.foldl                List.foldl
140                  (fn (co, n) => n + CodeObj.size co)                  (fn (co, n) => n + CodeObj.size co)

Legend:
Removed from v.675  
changed lines
  Added in v.698

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