Changes by: Aleksey Nogin (nogin at metaprl.org)
Date: 2007-05-03 10:35:35 -0700 (Thu, 03 May 2007)
Revision: 10614
Log message:

      Split the hash signatures into a separate file.

Changes  Path
+1 -0 libmojave/util/Files
+6 -117 libmojave/util/lm_hash.ml
+10 -107 libmojave/util/lm_hash.mli
Copied libmojave/util/lm_hash_sig.ml (from rev 10568, libmojave/util/lm_hash.mli)
+12 -35 libmojave/util/lm_hash_sig.ml (from rev 10568, libmojave/util/lm_hash.mli)

Changes by: Aleksey Nogin (nogin at metaprl.org)
Date: 2007-05-03 11:36:01 -0700 (Thu, 03 May 2007)
Revision: 10617
Log message:

      Added another variation on the same theme - a HashMarshalEq that is very
     similar to HashMarshal, except that it handles two different equalities -
     "strong" equality that tells whether two items can be cons-hashed together and
     a "weak" one that tells that the two items should be considered equivalent by
     the upper layers, but should not be completely coalesced by the cons-hashing.
     
     This is menat to be used in situations like the case-insensitive
     case-preserving filenames - the case differences should be ignored by the
     filename tables and sets, but should _not_ be erased by cons-hashing.

Changes  Path
+180 -0 libmojave/util/lm_hash.ml
+7 -0 libmojave/util/lm_hash.mli
+50 -0 libmojave/util/lm_hash_sig.ml

Changes by: Jason J. Hickey (jyh at cs.caltech.edu)
Date: 2007-05-03 15:59:09 -0700 (Thu, 03 May 2007)
Revision: 10620
Log message:

      Re-did the hash code a little.
     
     - Renamed "strong" -> "fine" and "weak" -> "coarse".  The latter are
     clear to me, but the former are subject to interpretation.  Sorry
     about that.
     
     - The coarse comparison function was wrong because it used the
     fine hash.
     
        coarse_compare item1 item2 =
           if item1.fine_hash < item2.fine_hash then
              -1
           ...
     
     In fact, _both_ hashes must be computed, and the coarse comparison
     needs to use the coarse hash.
     
        Invariant: fine_hash1 = fine_hash2 => coarse_hash1 = coarse_hash2

Changes  Path
+56 -170 libmojave/util/lm_hash.ml
+4 -3 libmojave/util/lm_hash.mli
+12 -18 libmojave/util/lm_hash_sig.ml

Changes by: Jason J. Hickey (jyh at cs.caltech.edu)
Date: 2007-05-03 18:53:38 -0700 (Thu, 03 May 2007)
Revision: 10626
Log message:

      Include the equality collisions in the collision count.

Changes  Path
+7 -3 libmojave/util/lm_hash.ml

Changes by: Jason J. Hickey (jyh at cs.caltech.edu)
Date: 2007-05-03 20:37:21 -0700 (Thu, 03 May 2007)
Revision: 10631
Log message:

      Perform the "vertical split" in Lm_hash.MakeHashMarshalEq,
     where course values are hash-consed separately.  This
     implementation is transparent (signatures are unchanged).
     
     Here are the current stats from OMake:
     
     Hash statistics:
        Node:fine: reintern = 21, compare = 1077, collisions = 0
        Node:coarse: reintern = 8, compare = 1764785, collisions = 0
        DirList:fine: reintern = 0, compare = 0, collisions = 0
        DirList:coarse: reintern = 0, compare = 3290, collisions = 0
        Dir:fine: reintern = 121, compare = 134868, collisions = 0
        Dir:coarse: reintern = 1, compare = 1328719, collisions = 0
        Symbol: reintern = 659, compare = 2824890, collisions = 0

Changes  Path
+51 -49 libmojave/util/lm_hash.ml

Changes by: Jason J. Hickey (jyh at cs.caltech.edu)
Date: 2007-05-03 20:42:33 -0700 (Thu, 03 May 2007)
Revision: 10632
Log message:

      Minor update to a comment.

Changes  Path
+4 -2 libmojave/util/lm_hash.ml

Changes by: Jason J. Hickey (jyh at cs.caltech.edu)
Date: 2007-05-04 10:41:02 -0700 (Fri, 04 May 2007)
Revision: 10636
Log message:

      Add a "find_key" function that, given a key to a table,
     returns the key that is stored in the table.

Changes  Path
+17 -5 libmojave/stdlib/lm_map.ml
+4 -3 libmojave/stdlib/lm_map_sig.ml

Changes by: Jason J. Hickey (jyh at cs.caltech.edu)
Date: 2007-05-07 11:55:09 -0700 (Mon, 07 May 2007)
Revision: 10656
Log message:

      We were adding a lot of empty strings, which was messing up the shell parser.

Changes  Path
+22 -11 libmojave/stdlib/lm_string_util.ml
+1 -0 libmojave/util/lm_string_hash.ml
+1 -1 libmojave/util/lm_string_hash.mli

Changes by: Jason J. Hickey (jyh at cs.caltech.edu)
Date: 2007-05-07 12:00:50 -0700 (Mon, 07 May 2007)
Revision: 10657
Log message:

      More empty-string cleanup in the string parser.

Changes  Path
+14 -7 libmojave/stdlib/lm_string_util.ml

Changes by: Jason J. Hickey (jyh at cs.caltech.edu)
Date: 2007-05-13 20:12:14 -0700 (Sun, 13 May 2007)
Revision: 10733
Log message:

      Add a (Lm_list_util.sub : 'a list -> int -> int -> 'a list) function.

Changes  Path
+5 -15 libmojave/cutil/lm_dll.c
+17 -23 libmojave/cutil/lm_dll_pointers.h
+27 -3 libmojave/stdlib/lm_list_util.ml
+7 -3 libmojave/stdlib/lm_list_util.mli

Changes by: Jason J. Hickey (jyh at cs.caltech.edu)
Date: 2007-05-14 12:46:07 -0700 (Mon, 14 May 2007)
Revision: 10747
Log message:

      Update the DLL hooks to use nativeint, not int, to represent C integers.

Changes  Path
+3 -1 libmojave/cutil/lm_dll.c
+3 -7 libmojave/cutil/lm_dll.h
+4 -0 libmojave/cutil/lm_dll_hooks.h
+6 -6 libmojave/unix/lm_dll.ml
+23 -4 libmojave/util/lm_hash.ml
+6 -0 libmojave/util/lm_hash_sig.ml

Changes by: Aleksey Nogin (nogin at metaprl.org)
Date: 2007-05-15 12:03:32 -0700 (Tue, 15 May 2007)
Revision: 10763
Log message:

      A warning needs to be disabled in order to be able to compile with Visual Studio 7.0 (AKA 2002 AKA .NET 1.0). Not sure we still care (7.1/2003/.NET 1.1 and 8.0/2005/.NET 2.0 compile fine anyway), but made these changes anyway.

Changes  Path
+1 -1 libmojave/cutil/lm_terminfo.c

Changes by: Jason J. Hickey (jyh at cs.caltech.edu)
Date: 2007-05-21 19:30:39 -0700 (Mon, 21 May 2007)
Revision: 10788
Log message:

      Change the pointer types for int_of_pointer.

Changes  Path
+29 -1 libmojave/cutil/lm_dll.c
+10 -6 libmojave/unix/lm_dll.ml

Changes by: Aleksey Nogin (nogin at metaprl.org)
Date: 2007-05-22 16:46:58 -0700 (Tue, 22 May 2007)
Revision: 10799
Log message:

      In the default reader function, treat the "Broken pipe" error (EPIPE) as EOF. This seem to be needed with OCaml 3.10.0 compiled using VS2005 under Win32 (not sure whether this is VS's "fault" or OCaml's, but seems to be a reasonable thing to do anyway).

Changes  Path
+9 -8 libmojave/util/lm_channel.ml

Changes by: Aleksey Nogin (nogin at metaprl.org)
Date: 2007-05-24 09:52:07 -0700 (Thu, 24 May 2007)
Revision: 10810
Log message:

      Be a bit more careful not to do
     
     try
        ...;
        Unix.close fd;
        ...
     with exn ->
        close fd;
        raise exn
     
     since this may result in closing the same fd twice in case the second "..."
     raises an exception.

Changes  Path
+9 -4 libmojave/unix/lm_unix_util.ml

Changes by: Jason J. Hickey (jyh at cs.caltech.edu)
Date: 2007-05-27 12:16:25 -0700 (Sun, 27 May 2007)
Revision: 10817
Log message:

      Add a "pointer-array" function for an array of pointers.

Changes  Path
+18 -0 libmojave/cutil/lm_dll.c
+2 -0 libmojave/unix/lm_dll.ml

Changes by: Jason J. Hickey (jyh at cs.caltech.edu)
Date: 2007-05-30 14:51:16 -0700 (Wed, 30 May 2007)
Revision: 10831
Log message:

      The buffered and unbuffered I/O were getting out of sync, causing
     the problem with the "Lm_db overwriting entries."  It was actually
     corrupting them.
     
     There is probably a better solution than the double-seek, I'll look at
     it again in an hour or so.

Changes  Path
+2 -0 libmojave/util/lm_db.ml
+1 -0 libmojave/util/lm_db.mli

Changes by: Aleksey Nogin (nogin at metaprl.org)
Date: 2007-05-30 16:19:51 -0700 (Wed, 30 May 2007)
Revision: 10834
Log message:

      When deleting a db entry (using the low-level Unix module calls with the fd),
     we need to create a new in_channel for that fd as the old one may still cache
     some outdated information.

Changes  Path
+16 -17 libmojave/util/lm_db.ml