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 1078, Tue Feb 19 21:26:48 2002 UTC revision 1137, Tue Mar 12 22:28:55 2002 UTC
# Line 14  Line 14 
14      type pickle     = CC.pickle         (* pickled format *)      type pickle     = CC.pickle         (* pickled format *)
15      type hash       = CC.hash           (* environment hash id *)      type hash       = CC.hash           (* environment hash id *)
16      type pid        = CC.pid      type pid        = CC.pid
17        type guid       = CC.guid
18    
19      (*************************************************************************      (*************************************************************************
20       *                             ELABORATION                               *       *                             ELABORATION                               *
# Line 34  Line 35 
35    
36      (** take ast, do semantic checks,      (** take ast, do semantic checks,
37       ** and output the new env, absyn and pickles *)       ** and output the new env, absyn and pickles *)
38      fun elaborate {ast, statenv=senv, compInfo=cinfo, uniquepid} = let      fun elaborate {ast, statenv=senv, compInfo=cinfo, guid} = let
39    
40          val (absyn, nenv) = ElabTop.elabTop(ast, senv, cinfo)          val (absyn, nenv) = ElabTop.elabTop(ast, senv, cinfo)
41          val (absyn, nenv) =          val (absyn, nenv) =
42              if CompInfo.anyErrors cinfo then              if CompInfo.anyErrors cinfo then
43                  (Absyn.SEQdec nil, StaticEnv.empty)                  (Absyn.SEQdec nil, StaticEnv.empty)
44              else (absyn, nenv)              else (absyn, nenv)
45          val { pid, fingerprint, pepper, pickle, exportLvars,          val { pid, pickle, exportLvars, exportPid, newenv } =
46                exportPid, newenv } =              pickUnpick { context = senv, env = nenv, guid = guid }
             pickUnpick { context = senv, env = nenv, uniquepid = uniquepid }  
47      in {absyn=absyn, newstatenv=newenv, exportPid=exportPid,      in {absyn=absyn, newstatenv=newenv, exportPid=exportPid,
48          exportLvars=exportLvars, staticPid = pid, fingerprint = fingerprint,          exportLvars=exportLvars, staticPid = pid, pickle = pickle }
         pepper = pepper, pickle=pickle }  
49      end (* function elaborate *)      end (* function elaborate *)
50    
51      val elaborate =      val elaborate =
# Line 142  Line 141 
141       *************************************************************************)       *************************************************************************)
142      (** compiling the ast into the binary code = elab + translate + codegen *)      (** compiling the ast into the binary code = elab + translate + codegen *)
143      fun compile {source, ast, statenv, symenv, compInfo=cinfo,      fun compile {source, ast, statenv, symenv, compInfo=cinfo,
144                   checkErr=check, splitting, uniquepid } =                   checkErr=check, splitting, guid } =
145          let val {absyn, newstatenv, exportLvars, exportPid,          let val {absyn, newstatenv, exportLvars, exportPid,
146                   staticPid, fingerprint, pepper, pickle } =                   staticPid, pickle } =
147                  elaborate {ast=ast, statenv=statenv, compInfo=cinfo,                  elaborate {ast=ast, statenv=statenv, compInfo=cinfo,
148                             uniquepid = uniquepid}                             guid = guid}
149                  before (check "elaborate")                  before (check "elaborate")
150    
151              val absyn = instrument {source=source, senv = statenv,              val absyn = instrument {source=source, senv = statenv,
# Line 176  Line 175 
175                exportPid = exportPid,                exportPid = exportPid,
176                exportLvars = exportLvars,                exportLvars = exportLvars,
177                staticPid = staticPid,                staticPid = staticPid,
               fingerprint = fingerprint,  
               pepper = pepper,  
178                pickle = pickle,                pickle = pickle,
179                inlineExp = inlineExp,                inlineExp = inlineExp,
180                imports = revisedImports }                imports = revisedImports }

Legend:
Removed from v.1078  
changed lines
  Added in v.1137

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