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/cm/bootstrap/cmb-slave-stub.sml
ViewVC logotype

Diff of /sml/trunk/src/cm/bootstrap/cmb-slave-stub.sml

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

revision 463, Fri Nov 5 08:31:08 1999 UTC revision 464, Tue Nov 9 06:49:52 1999 UTC
# Line 9  Line 9 
9   *)   *)
10  structure CMBSlave = struct  structure CMBSlave = struct
11      local      local
12          val lib = "target-compilers.cm"          val loaded = ref StringSet.empty
         val loaded = ref false  
         val table =  
             foldl StringMap.insert' StringMap.empty  
             [("alpha32-unix", "Alpha32UnixCMB.make"),  
              ("hppa-unix", "HppaUnixCMB.make"),  
              ("ppc-macos", "PPCMacOSCMB.make"),  
              ("ppc-unix", "PPCUnixCMB.make"),  
              ("sparc-unix", "SparcUnixCMB.make"),  
              ("x86-unix", "X86UnixCMB.make"),  
              ("x86-win32", "X86Win32CMB.make")]  
13      in      in
14          (* "load" is supposed to be CM.autoload and "touch" should be          fun slave load arch s = let
15           * (Compiler.Interact.useStream o TextIO.openString) *)              val lib = arch ^ ".cm"
16          fun slave { load, touch } arch s =          in
17              case StringMap.find (table, arch) of              if StringSet.member (!loaded, lib) then ()
18                  NONE => NONE              else if load lib then loaded := StringSet.add (!loaded, lib)
               | SOME cmd =>  
                     (if !loaded then ()  
                      else if load lib then loaded := true  
19                       else raise Fail (concat ["dynamic linkage for CMB slave ",                       else raise Fail (concat ["dynamic linkage for CMB slave ",
20                                                arch, " failed"]);                                                arch, " failed"]);
21                       touch cmd;              CMBSlaveHook.slave arch s
22                       CMBSlaveHook.slave arch s)          end
23      end      end
24  end  end

Legend:
Removed from v.463  
changed lines
  Added in v.464

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