Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Annotation of /sml/trunk/src/system/Basis/Implementation/NJ/internals.sml
ViewVC logotype

Annotation of /sml/trunk/src/system/Basis/Implementation/NJ/internals.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 675 - (view) (download)

1 : monnier 416 (* internals.sml
2 :     *
3 :     * COPYRIGHT (c) 1996 AT&T Research.
4 :     *
5 :     * This structure (SMLofNJ.Internals) is a gathering place for internal
6 :     * features that need to be exposed outside the boot directory.
7 :     *)
8 :    
9 :     structure Internals : INTERNALS =
10 :     struct
11 :    
12 :     structure CleanUp = CleanUp
13 :     structure ProfControl = ProfControl
14 :     structure GC = GC
15 :    
16 :     val prHook = PrintHook.prHook
17 :    
18 :     val initSigTbl = InternalSignals.initSigTbl
19 :     val clearSigTbl = InternalSignals.clearSigTbl
20 :     val resetSigTbl = InternalSignals.resetSigTbl
21 :    
22 :     val resetTimers = InternalTimer.resetTimers
23 :    
24 : blume 675 structure BTrace = struct
25 :     exception BTrace of unit -> string list
26 :     val mode = let
27 :     val state = ref false
28 :     fun access NONE = !state
29 :     | access (SOME change) = !state before state := change
30 :     in
31 :     access
32 :     end
33 :     local
34 :     val hook = ref { mkid = fn (s: string) => 0,
35 :     reset = fn () => () }
36 :     in
37 :     fun install { corefns, reset, mkid } =
38 :     (hook := { mkid = mkid, reset = reset };
39 :     Core.bt_install corefns)
40 :     fun mkid s = #mkid (!hook) s
41 :     fun reset () = #reset (!hook) ()
42 :     end
43 :     fun report () = Core.bt_report () ()
44 :     fun trigger () = raise BTrace (report ())
45 :     fun save () = Core.bt_save () ()
46 :     end
47 :    
48 : monnier 416 end;

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