1 (* Copyright (C) 2004-2005 Henry Cejtin, Matthew Fluet, Suresh
2 * Jagannathan, and Stephen Weeks.
4 * MLton is released under a BSD-style license.
5 * See the file MLton-LICENSE for details.
8 functor ProfileExp (S: PROFILE_EXP_STRUCTS): PROFILE_EXP =
15 | Leave of SourceInfo.t
18 fn Enter si => concat ["Enter ", SourceInfo.toString si]
19 | Leave si => concat ["Leave " , SourceInfo.toString si]
21 val layout = Layout.str o toString
24 fn (Enter si, Enter si') => SourceInfo.equals (si, si')
25 | (Leave si, Leave si') => SourceInfo.equals (si, si')
29 val newHash = Random.word
30 val enter = newHash ()
31 val leave = newHash ()
34 fn Enter si => Word.xorb (enter, SourceInfo.hash si)
35 | Leave si => Word.xorb (leave, SourceInfo.hash si)