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

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

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

revision 629, Wed Apr 26 04:06:41 2000 UTC revision 630, Wed Apr 26 18:40:56 2000 UTC
# Line 1  Line 1 
1  (*  (*
2   * This is a stub providing "slave" functionality for CMB.   * This is a stub providing "slave" functionality for CMB.
3   * (We use dynamic linking technology to avoid loading host-cmb.cm   * (We use dynamic linking technology to avoid loading the target compiler
4   *  on the slave side unless it is really needed.)   *  on the slave side unless it is really needed.)
5   *   *
6   * (C) 1999 Lucent Technologies, Bell Laboratories   * (C) 1999 Lucent Technologies, Bell Laboratories
# Line 9  Line 9 
9   *)   *)
10  structure CMBSlave = struct  structure CMBSlave = struct
11      local      local
12          val initialized = ref false          val loaded = ref StringSet.empty (* remember what we already have *)
13      in      in
14          fun slave make s =          fun slave load arch s = let
15              (if !initialized then ()              val lib = arch ^ ".cm" (* eg. sparc-unix -> sparc-unix.cm *)
16               else if make "host-cmb.cm" then initialized := true          in
17               else raise Fail "dynamic linkage for CMB slave failed";              if StringSet.member (!loaded, lib) then ()
18               CMBSlaveHook.slave s)              else if load lib then loaded := StringSet.add (!loaded, lib)
19                else  raise Fail (concat ["dynamic linkage for CMB slave ",
20                                          arch, " failed"]);
21                CMBSlaveHook.slave arch s
22            end
23      end      end
24  end  end

Legend:
Removed from v.629  
changed lines
  Added in v.630

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