From 53bf8bae8efea61ef1bb9793d1b06c59f38005e5 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Thu, 27 Dec 2007 16:19:35 +0000 Subject: [PATCH] 3.99.0.7: add prop:equal+hash svn: r8137 --- collects/scheme/private/kw.ss | 4 +- collects/scribblings/inside/misc.scrbl | 3 +- collects/scribblings/reference/data.scrbl | 72 +++- collects/tests/mzscheme/struct.ss | 69 ++++ doc/release-notes/mzscheme/MzScheme_4.txt | 14 +- src/mzscheme/src/bool.c | 67 +++- src/mzscheme/src/cstartup.inc | 462 +++++++++++----------- src/mzscheme/src/hash.c | 366 ++++++++++++----- src/mzscheme/src/list.c | 21 +- src/mzscheme/src/mzhashchk.inc | 14 +- src/mzscheme/src/schminc.h | 2 +- src/mzscheme/src/schpriv.h | 2 + src/mzscheme/src/schvers.h | 4 +- src/mzscheme/src/struct.c | 55 +++ 14 files changed, 799 insertions(+), 356 deletions(-) diff --git a/collects/scheme/private/kw.ss b/collects/scheme/private/kw.ss index 137e5a7df0..6c89100a7b 100644 --- a/collects/scheme/private/kw.ss +++ b/collects/scheme/private/kw.ss @@ -523,13 +523,13 @@ ;; This case only happens when there are no optional arguments (case-lambda [(base ... . rest-id) - (apply fail ... base ... rest)])] + (apply fail ... base ... . rest)])] [(_ (fail ...) (opt-id) (base ...) (done ...) (rest-id . rest) clauses) ;; Handle the last optional argument and the rest args (if any) ;; at the same time. (case-lambda [(base ...) (fail ... base ...)] - [(base ... done ... opt-id . rest-id) (apply fail ... base ... done ... opt-id rest)] + [(base ... done ... opt-id . rest-id) (apply fail ... base ... done ... opt-id . rest)] . clauses)] [(_ (fail ...) (opt-id more ...) (base ...) (done ...) (rest-id . rest) clauses) ;; Handle just one more optional argument: diff --git a/collects/scribblings/inside/misc.scrbl b/collects/scribblings/inside/misc.scrbl index 4c50e9354e..36b96fa633 100644 --- a/collects/scribblings/inside/misc.scrbl +++ b/collects/scribblings/inside/misc.scrbl @@ -188,7 +188,8 @@ set to arbitrary hashing and comparison functions (before any mapping is installed into the table). A hash function should fill @var{h1} with a primary hash value and @var{h2} with a secondary hash value; the values are for double-hashing, where the caller takes appropriate -modulos. +modulos. Either @var{h1} or @var{h2} can be @cpp{NULL} if the +corresponding hash code is not needed. To traverse the hash table content, iterate over @var{keys} and @var{vals} in parallel from @cpp{0} to @cpp{size-1}, and ignore diff --git a/collects/scribblings/reference/data.scrbl b/collects/scribblings/reference/data.scrbl index af130a372d..5c22b91718 100644 --- a/collects/scribblings/reference/data.scrbl +++ b/collects/scribblings/reference/data.scrbl @@ -41,7 +41,7 @@ strings, byte strings, numbers, pairs, mutable pairs, vectors, hash tables, and inspectable structures. In the last five cases, equality is recursively defined; if both @scheme[v1] and @scheme[v2] contain reference cycles, they are equal when the infinite unfoldings of the -values would be equal.} +values would be equal. See also @scheme[prop:equal+hash].} @defproc[(eqv? [v1 any/c] [v2 any/c]) boolean?]{ @@ -64,6 +64,69 @@ object, @scheme[#f] otherwise. See also @secref["model-eq"].} Returns @scheme[#t] if @scheme[v] is an immutable string, byte string, vector, or box, @scheme[#f] otherwise.} +@defthing[prop:equal+hash struct-type-property?]{ + +A @tech{structure type property} (see @secref["structprops"]) that +supplies an equality predicate and hashing functions for a structure +type. The property value must be a list of three procedures: + +@itemize{ + + @item{@scheme[_equal-proc : (any/c any/c (any/c any/c . -> + . boolean?) . -> . any/c)] --- tests whether the first two + arguments are equal, where both values are instances of the + structure type to which the property is associated (or a + subtype of the structure type). + + The third argument is an @scheme[equal?] predicate to use for + recursive equality checks; use the given predicate instead of + @scheme[equal?] to ensure that data cycles are handled + properly. + + The @scheme[_equal-proc] is called for a pair of structures + only when they are not @scheme[eq?], and only when they both + have a @scheme[prop:equal+hash] value inherited from the same + structure type. With this strategy, the order in which + @scheme[equal?] receives two structures does not matter. It + also means that, by default, a structure sub-type inherits the + equality predicate of its parent, if any.} + + @item{@scheme[_hash-proc : (any/c (any/c . -> . exact-integer?) . -> + . exact-integer?)] --- computes a hash code for the given + structure, like @scheme[equal-hash-code]. The first argument is + an instance of the structure type (or one of its subtypes) to + which the property is associated. + + The second argument is a @scheme[equal-hash-code]-like + procedure to use for recursive hash-code computation; use the + given procedure instead of @scheme[equal-hash-code] to ensure + that data cycles are handled properly.} + + @item{@scheme[_hash2-proc : (any/c (any/c . -> . exact-integer?) . -> + . exact-integer?)] --- computes a secondary hash code for the + given structure. This procedure is like @scheme[_hash-proc], + but analogous to @scheme[equal-secondary-hash-code].} + +} + +Take care to ensure that @scheme[_hash-proc] and @scheme[_hash2-proc] +are consistent with @scheme[_equal-proc]. Specifically, +@scheme[_hash-proc] and @scheme[_hash2-proc] should produce the same +value for any two structures for which @scheme[_equal-proc] produces a +true value. + +When a structure type has no @scheme[prop:equal+hash] property, then +transparent structures (i.e., structures with an @tech{inspector} that +is controlled by the current @tech{inspector}) are @scheme[equal?] +when they are instances of the same structure type (not counting +sub-types), and when they have @scheme[equal?] field values. For +transparent structures, @scheme[equal-hash-code] and +@scheme[equal-secondary-hash-code] derive hash code using the field +values. For opaque structure types, @scheme[equal?] is the same as +@scheme[eq?], and @scheme[equal-hash-code] and +@scheme[equal-secondary-hash-code] results are based only on +@scheme[eq-hash-code].} + @; ------------------------------------------------------------ @include-section["numbers.scrbl"] @@ -556,7 +619,12 @@ returned integer is the same. Furthermore, for the result integer @scheme[k] and any other exact integer @scheme[j], @scheme[(= k j)] implies @scheme[(eq? k j)]. A has code is computed even when @scheme[v] contains a cycle through pairs, vectors, boxes, and/or -inspectable structure fields.} +inspectable structure fields. See also @scheme[prop:equal+hash].} + +@defproc[(equal-secondary-hash-code [v any/c]) exact-integer?]{ + +Like @scheme[equal-hash-code], but computes a secondary value suitable +for use in double hashing.} @; ---------------------------------------------------------------------- @include-section["sequences.scrbl"] diff --git a/collects/tests/mzscheme/struct.ss b/collects/tests/mzscheme/struct.ss index 922503dbb3..61e3f4529d 100644 --- a/collects/tests/mzscheme/struct.ss +++ b/collects/tests/mzscheme/struct.ss @@ -728,4 +728,73 @@ ;; ---------------------------------------- +(let () + (define-struct t1 (a b) #:transparent) + (define-struct t2 (c d) #:transparent #:mutable) + (define-struct o (x y z) + #:property prop:equal+hash (list + (lambda (a b equal?) + (and (equal? (o-x a) (o-x b)) + (equal? (o-z a) (o-z b)))) + (lambda (a hash) + (+ (hash (o-x a)) (* 9 (hash (o-z a))))) + (lambda (a hash) + (+ (hash (o-x a)) (hash (o-z a))))) + #:mutable) + + (test #f equal? (make-t1 0 1) (make-t2 0 1)) + (test #t equal? (make-t1 0 1) (make-t1 0 1)) + (test #t equal? (make-t2 0 1) (make-t2 0 1)) + (test #t equal? + (shared ([t (make-t2 0 t)]) t) + (shared ([t (make-t2 0 t)]) t)) + (test #f equal? + (shared ([t (make-t2 0 t)]) t) + (shared ([t (make-t2 1 t)]) t)) + (test #t = + (equal-hash-code (make-t1 0 1)) + (equal-hash-code (make-t1 0 1))) + (test #t = + (equal-hash-code (shared ([t (make-t2 0 t)]) t)) + (equal-hash-code (shared ([t (make-t2 0 t)]) t))) + (test #t = + (equal-secondary-hash-code (make-t1 0 1)) + (equal-secondary-hash-code (make-t1 0 1))) + (test #t = + (equal-secondary-hash-code (shared ([t (make-t2 0 t)]) t)) + (equal-secondary-hash-code (shared ([t (make-t2 0 t)]) t))) + + (test #t equal? (make-o 1 2 3) (make-o 1 20 3)) + (test #f equal? (make-o 10 2 3) (make-o 1 2 3)) + (test #f equal? (make-o 1 2 3) (make-o 1 2 30)) + (test #t equal? + (shared ([t (make-o t 0 t)]) t) + (shared ([t (make-o t 0 t)]) t)) + (test #t equal? + (shared ([t (make-o t 0 t)]) t) + (shared ([t (make-o t 1 t)]) t)) + (test #f equal? + (shared ([t (make-o t 0 0)]) t) + (shared ([t (make-o t 0 1)]) t)) + + (test #t = + (equal-hash-code (make-o 1 2 3)) + (equal-hash-code (make-o 1 20 3))) + (test #t = + (equal-hash-code (shared ([t (make-o t 0 t)]) t)) + (equal-hash-code (shared ([t (make-o t 0 t)]) t))) + (test #t = + (equal-hash-code (shared ([t (make-o t 1 t)]) t)) + (equal-hash-code (shared ([t (make-o t 1 t)]) t))) + (test #t = + (equal-secondary-hash-code (shared ([t (make-o t 0 t)]) t)) + (equal-secondary-hash-code (shared ([t (make-o t 0 t)]) t))) + (test #t = + (equal-secondary-hash-code (shared ([t (make-o t 1 t)]) t)) + (equal-secondary-hash-code (shared ([t (make-o t 1 t)]) t))) + + (void)) + +;; ---------------------------------------- + (report-errs) diff --git a/doc/release-notes/mzscheme/MzScheme_4.txt b/doc/release-notes/mzscheme/MzScheme_4.txt index 31cf841053..4e9e5117f3 100644 --- a/doc/release-notes/mzscheme/MzScheme_4.txt +++ b/doc/release-notes/mzscheme/MzScheme_4.txt @@ -109,12 +109,16 @@ in several significant ways: native-code extensions is no longer supported. - Windows console binary names are converted like Unix binary names: - downcased with " " replaced by "-". + downcased and " " replaced by "-". - - The contract library (in scheme/contract) no longer - exports object or mixin contracts. Instead they are - exported from scheme/class. (The libraries in mzlib - remain the same as before.) + - The `equal?' and hashing functions work on cyclic data, and a new + `prop:equal+hash' property allows customization of `equal?' for a + structure type. + + - The contract library (in `scheme/contract') no longer exports + object or mixin contracts. Instead they are exported from + `scheme/class'. (The libraries in "mzlib" remain the same as + before.) ====================================================================== Immutable and Mutable Pairs diff --git a/src/mzscheme/src/bool.c b/src/mzscheme/src/bool.c index f766d2761d..5f86fff975 100644 --- a/src/mzscheme/src/bool.c +++ b/src/mzscheme/src/bool.c @@ -53,6 +53,7 @@ typedef struct Equal_Info { long depth; /* always odd */ long car_depth; /* always odd */ Scheme_Hash_Table *ht; + Scheme_Object *recur; } Equal_Info; static int is_equal (Scheme_Object *obj1, Scheme_Object *obj2, Equal_Info *eql); @@ -128,6 +129,7 @@ equal_prim (int argc, Scheme_Object *argv[]) eql.depth = 1; eql.car_depth = 1; eql.ht = NULL; + eql.recur = NULL; return (is_equal(argv[0], argv[1], &eql) ? scheme_true : scheme_false); } @@ -219,6 +221,7 @@ int scheme_equal (Scheme_Object *obj1, Scheme_Object *obj2) eql.depth = 1; eql.car_depth = 1; eql.ht = NULL; + eql.recur = NULL; return is_equal(obj1, obj2, &eql); } @@ -283,6 +286,15 @@ static Scheme_Object *equal_k() return is_equal(v1, v2, eql) ? scheme_true : scheme_false; } +static Scheme_Object *equal_recur(int argc, Scheme_Object **argv, Scheme_Object *prim) +{ + Equal_Info *eql = (Equal_Info *)SCHEME_PRIM_CLOSURE_ELS(prim)[0]; + + return (is_equal(argv[0], argv[1], eql) + ? scheme_true + : scheme_false); +} + static int is_equal_overflow(Scheme_Object *obj1, Scheme_Object *obj2, Equal_Info *eql) { Scheme_Thread *p = scheme_current_thread; @@ -359,9 +371,60 @@ int is_equal (Scheme_Object *obj1, Scheme_Object *obj2, Equal_Info *eql) return ((l1 == l2) && !memcmp(SCHEME_CHAR_STR_VAL(obj1), SCHEME_CHAR_STR_VAL(obj2), l1 * sizeof(mzchar))); } else if (SCHEME_STRUCTP(obj1)) { - if (SCHEME_STRUCT_TYPE(obj1) != SCHEME_STRUCT_TYPE(obj2)) + Scheme_Struct_Type *st1, *st2; + Scheme_Object *procs1, *procs2; + + st1 = SCHEME_STRUCT_TYPE(obj1); + st2 = SCHEME_STRUCT_TYPE(obj2); + + procs1 = scheme_struct_type_property_ref(scheme_equal_property, (Scheme_Object *)st1); + if (procs1 && (st1 != st2)) { + procs2 = scheme_struct_type_property_ref(scheme_equal_property, (Scheme_Object *)st2); + if (!procs2 + || !SAME_OBJ(SCHEME_VEC_ELS(procs1)[0], SCHEME_VEC_ELS(procs2)[0])) + procs1 = NULL; + } + + if (procs1) { + /* Has an equality property: */ + Scheme_Object *a[3], *recur; + Equal_Info *eql2; +# include "mzeqchk.inc" + + if (union_check(obj1, obj2, eql)) + return 1; + + /* Create/cache closure to use for recursive equality checks: */ + if (eql->recur) { + recur = eql->recur; + eql2 = (Equal_Info *)SCHEME_PRIM_CLOSURE_ELS(recur)[0]; + } else { + eql2 = (Equal_Info *)scheme_malloc(sizeof(Equal_Info)); + a[0] = (Scheme_Object *)eql2; + recur = scheme_make_prim_closure_w_arity(equal_recur, + 1, a, + "equal?/recur", + 2, 2); + eql->recur = recur; + } + memcpy(eql2, eql, sizeof(Equal_Info)); + + a[0] = obj1; + a[1] = obj2; + a[2] = recur; + + procs1 = SCHEME_VEC_ELS(procs1)[1]; + + recur = _scheme_apply(procs1, 3, a); + + memcpy(eql, eql2, sizeof(Equal_Info)); + + return SCHEME_TRUEP(recur); + } else if (st1 != st2) { return 0; - else { + } else { + /* Same types, but doesn't have an equality property, + so check transparency: */ Scheme_Object *insp; insp = scheme_get_param(scheme_current_config(), MZCONFIG_INSPECTOR); if (scheme_inspector_sees_part(obj1, insp, -2) diff --git a/src/mzscheme/src/cstartup.inc b/src/mzscheme/src/cstartup.inc index ee832a4f0a..ba30fea9ca 100644 --- a/src/mzscheme/src/cstartup.inc +++ b/src/mzscheme/src/cstartup.inc @@ -1,13 +1,13 @@ { - static MZCOMPILED_STRING_FAR unsigned char expr[] = {35,126,8,51,46,57,57,46,48,46,54,50,0,0,0,1,0,0,6,0,9, -0,14,0,18,0,23,0,36,0,41,0,45,0,52,0,55,0,62,0,69,0, + static MZCOMPILED_STRING_FAR unsigned char expr[] = {35,126,8,51,46,57,57,46,48,46,55,50,0,0,0,1,0,0,6,0,9, +0,14,0,18,0,23,0,28,0,32,0,39,0,42,0,55,0,62,0,69,0, 78,0,84,0,98,0,112,0,115,0,119,0,121,0,132,0,134,0,148,0,155, 0,177,0,179,0,193,0,203,0,209,0,227,0,26,1,36,1,53,1,86,1, 119,1,178,1,223,1,45,2,90,2,95,2,115,2,245,2,9,3,57,3,123, 3,6,4,148,4,191,4,202,4,25,5,0,0,29,7,0,0,65,98,101,103, -105,110,29,11,11,64,108,101,116,42,63,108,101,116,64,119,104,101,110,72,112, -97,114,97,109,101,116,101,114,105,122,101,64,99,111,110,100,63,97,110,100,66, -108,101,116,114,101,99,62,111,114,66,100,101,102,105,110,101,66,117,110,108,101, +105,110,29,11,11,64,108,101,116,42,63,108,101,116,64,119,104,101,110,64,99, +111,110,100,63,97,110,100,66,108,101,116,114,101,99,62,111,114,72,112,97,114, +97,109,101,116,101,114,105,122,101,66,100,101,102,105,110,101,66,117,110,108,101, 115,115,68,104,101,114,101,45,115,116,120,65,113,117,111,116,101,29,94,2,14, 68,35,37,112,97,114,97,109,122,11,29,94,2,14,68,35,37,107,101,114,110, 101,108,11,62,105,102,63,115,116,120,61,115,70,108,101,116,45,118,97,108,117, @@ -16,56 +16,56 @@ 110,45,107,101,121,61,118,73,100,101,102,105,110,101,45,118,97,108,117,101,115, 95,8,240,48,117,0,0,11,16,0,95,8,193,11,16,0,96,35,11,93,158, 2,16,34,16,2,2,13,159,2,2,35,2,13,97,10,34,11,94,158,2,15, -34,158,2,16,34,16,20,2,10,2,2,2,3,2,2,2,4,2,2,2,5, -2,2,2,6,2,2,2,7,2,2,2,8,2,2,2,9,2,2,2,11,2, +34,158,2,16,34,16,20,2,9,2,2,2,3,2,2,2,4,2,2,2,5, +2,2,2,10,2,2,2,7,2,2,2,8,2,2,2,6,2,2,2,11,2, 2,2,12,2,2,13,16,4,34,29,11,11,2,2,11,18,98,64,104,101,114, -101,8,31,8,30,8,29,8,28,8,27,27,248,22,176,3,195,249,22,169,3, +101,8,31,8,30,8,29,8,28,8,27,27,248,22,177,3,195,249,22,170,3, 80,158,37,34,251,22,73,2,17,248,22,88,199,12,249,22,63,2,1,248,22, -90,201,27,248,22,176,3,195,249,22,169,3,80,158,37,34,251,22,73,2,17, -248,22,88,199,249,22,63,2,1,248,22,90,201,12,27,248,22,65,248,22,176, +90,201,27,248,22,177,3,195,249,22,170,3,80,158,37,34,251,22,73,2,17, +248,22,88,199,249,22,63,2,1,248,22,90,201,12,27,248,22,65,248,22,177, 3,196,28,248,22,71,193,20,15,159,35,34,35,28,248,22,71,248,22,65,194, -248,22,64,193,249,22,169,3,80,158,37,34,251,22,73,2,17,248,22,64,199, -249,22,63,2,8,248,22,65,201,11,18,100,10,8,31,8,30,8,29,8,28, -8,27,16,4,11,11,2,18,3,1,7,101,110,118,54,55,54,57,16,4,11, -11,2,19,3,1,7,101,110,118,54,55,55,48,27,248,22,65,248,22,176,3, +248,22,64,193,249,22,170,3,80,158,37,34,251,22,73,2,17,248,22,64,199, +249,22,63,2,7,248,22,65,201,11,18,100,10,8,31,8,30,8,29,8,28, +8,27,16,4,11,11,2,18,3,1,7,101,110,118,54,55,55,49,16,4,11, +11,2,19,3,1,7,101,110,118,54,55,55,50,27,248,22,65,248,22,177,3, 196,28,248,22,71,193,20,15,159,35,34,35,28,248,22,71,248,22,65,194,248, -22,64,193,249,22,169,3,80,158,37,34,250,22,73,2,20,248,22,73,249,22, +22,64,193,249,22,170,3,80,158,37,34,250,22,73,2,20,248,22,73,249,22, 73,248,22,73,2,21,248,22,64,201,251,22,73,2,17,2,21,2,21,249,22, -63,2,10,248,22,65,204,18,100,11,8,31,8,30,8,29,8,28,8,27,16, -4,11,11,2,18,3,1,7,101,110,118,54,55,55,50,16,4,11,11,2,19, -3,1,7,101,110,118,54,55,55,51,248,22,176,3,193,27,248,22,176,3,194, -249,22,63,248,22,73,248,22,64,196,248,22,65,195,27,248,22,65,248,22,176, -3,196,249,22,169,3,80,158,37,34,28,248,22,51,248,22,170,3,248,22,64, -197,27,249,22,2,32,0,89,162,8,36,35,41,9,222,33,39,248,22,176,3, +63,2,9,248,22,65,204,18,100,11,8,31,8,30,8,29,8,28,8,27,16, +4,11,11,2,18,3,1,7,101,110,118,54,55,55,52,16,4,11,11,2,19, +3,1,7,101,110,118,54,55,55,53,248,22,177,3,193,27,248,22,177,3,194, +249,22,63,248,22,73,248,22,64,196,248,22,65,195,27,248,22,65,248,22,177, +3,196,249,22,170,3,80,158,37,34,28,248,22,51,248,22,171,3,248,22,64, +197,27,249,22,2,32,0,89,162,8,36,35,41,9,222,33,39,248,22,177,3, 248,22,88,199,250,22,73,2,22,248,22,73,249,22,73,248,22,73,248,22,64, 203,250,22,74,2,23,249,22,2,22,64,203,248,22,90,205,249,22,63,248,22, 64,201,249,22,2,22,88,199,250,22,74,2,20,249,22,2,32,0,89,162,34, -35,45,9,222,33,40,248,22,176,3,248,22,64,201,248,22,65,198,27,248,22, -176,3,194,249,22,63,248,22,73,248,22,64,196,248,22,65,195,27,248,22,65, -248,22,176,3,196,249,22,169,3,80,158,37,34,250,22,74,2,22,249,22,2, -32,0,89,162,34,35,45,9,222,33,42,248,22,176,3,248,22,64,201,248,22, -65,198,27,248,22,65,248,22,176,3,196,27,248,22,176,3,248,22,64,195,249, -22,169,3,80,158,38,34,28,248,22,71,195,250,22,74,2,20,9,248,22,65, +35,45,9,222,33,40,248,22,177,3,248,22,64,201,248,22,65,198,27,248,22, +177,3,194,249,22,63,248,22,73,248,22,64,196,248,22,65,195,27,248,22,65, +248,22,177,3,196,249,22,170,3,80,158,37,34,250,22,74,2,22,249,22,2, +32,0,89,162,34,35,45,9,222,33,42,248,22,177,3,248,22,64,201,248,22, +65,198,27,248,22,65,248,22,177,3,196,27,248,22,177,3,248,22,64,195,249, +22,170,3,80,158,38,34,28,248,22,71,195,250,22,74,2,20,9,248,22,65, 199,250,22,73,2,4,248,22,73,248,22,64,199,250,22,74,2,3,248,22,65, -201,248,22,65,202,27,248,22,65,248,22,176,3,196,27,249,22,1,22,77,249, -22,2,22,176,3,248,22,176,3,248,22,64,199,249,22,169,3,80,158,38,34, +201,248,22,65,202,27,248,22,65,248,22,177,3,196,27,249,22,1,22,77,249, +22,2,22,177,3,248,22,177,3,248,22,64,199,249,22,170,3,80,158,38,34, 251,22,73,1,22,119,105,116,104,45,99,111,110,116,105,110,117,97,116,105,111, 110,45,109,97,114,107,2,24,250,22,74,1,23,101,120,116,101,110,100,45,112, 97,114,97,109,101,116,101,114,105,122,97,116,105,111,110,21,95,1,27,99,111, 110,116,105,110,117,97,116,105,111,110,45,109,97,114,107,45,115,101,116,45,102, 105,114,115,116,11,2,24,201,250,22,74,2,20,9,248,22,65,203,27,248,22, -65,248,22,176,3,196,28,248,22,71,193,20,15,159,35,34,35,249,22,169,3, -80,158,37,34,27,248,22,176,3,248,22,64,197,28,249,22,135,8,62,61,62, -248,22,170,3,248,22,88,196,250,22,73,2,20,248,22,73,249,22,73,21,93, -2,25,248,22,64,199,250,22,74,2,7,249,22,73,2,25,249,22,73,248,22, -97,203,2,25,248,22,65,202,251,22,73,2,17,28,249,22,135,8,248,22,170, +65,248,22,177,3,196,28,248,22,71,193,20,15,159,35,34,35,249,22,170,3, +80,158,37,34,27,248,22,177,3,248,22,64,197,28,249,22,136,8,62,61,62, +248,22,171,3,248,22,88,196,250,22,73,2,20,248,22,73,249,22,73,21,93, +2,25,248,22,64,199,250,22,74,2,6,249,22,73,2,25,249,22,73,248,22, +97,203,2,25,248,22,65,202,251,22,73,2,17,28,249,22,136,8,248,22,171, 3,248,22,64,200,64,101,108,115,101,10,248,22,64,197,250,22,74,2,20,9, -248,22,65,200,249,22,63,2,7,248,22,65,202,99,8,31,8,30,8,29,8, -28,8,27,16,4,11,11,2,18,3,1,7,101,110,118,54,55,57,53,16,4, -11,11,2,19,3,1,7,101,110,118,54,55,57,54,18,158,94,10,64,118,111, -105,100,8,47,27,248,22,65,248,22,176,3,196,249,22,169,3,80,158,37,34, -28,248,22,51,248,22,170,3,248,22,64,197,250,22,73,2,26,248,22,73,248, -22,64,199,248,22,88,198,27,248,22,170,3,248,22,64,197,250,22,73,2,26, +248,22,65,200,249,22,63,2,6,248,22,65,202,99,8,31,8,30,8,29,8, +28,8,27,16,4,11,11,2,18,3,1,7,101,110,118,54,55,57,55,16,4, +11,11,2,19,3,1,7,101,110,118,54,55,57,56,18,158,94,10,64,118,111, +105,100,8,47,27,248,22,65,248,22,177,3,196,249,22,170,3,80,158,37,34, +28,248,22,51,248,22,171,3,248,22,64,197,250,22,73,2,26,248,22,73,248, +22,64,199,248,22,88,198,27,248,22,171,3,248,22,64,197,250,22,73,2,26, 248,22,73,248,22,64,197,250,22,74,2,23,248,22,65,199,248,22,65,202,159, 34,20,102,159,34,16,1,20,24,2,1,16,0,83,158,40,20,99,131,69,35, 37,109,105,110,45,115,116,120,2,2,10,11,10,10,10,10,34,80,158,34,34, @@ -77,17 +77,17 @@ 20,102,159,34,16,0,16,1,33,32,10,16,5,93,2,12,89,162,8,36,35, 51,9,223,0,33,33,34,20,102,159,34,16,1,20,25,159,35,2,2,2,13, 16,0,11,16,5,93,2,5,89,162,8,36,35,51,9,223,0,33,34,34,20, -102,159,34,16,1,20,25,159,35,2,2,2,13,16,0,11,16,5,93,2,8, +102,159,34,16,1,20,25,159,35,2,2,2,13,16,0,11,16,5,93,2,7, 89,162,8,36,35,51,9,223,0,33,35,34,20,102,159,34,16,1,20,25,159, -35,2,2,2,13,16,1,33,36,11,16,5,93,2,10,89,162,8,36,35,54, +35,2,2,2,13,16,1,33,36,11,16,5,93,2,9,89,162,8,36,35,54, 9,223,0,33,37,34,20,102,159,34,16,1,20,25,159,35,2,2,2,13,16, 1,33,38,11,16,5,93,2,4,89,162,8,36,35,56,9,223,0,33,41,34, 20,102,159,34,16,1,20,25,159,35,2,2,2,13,16,0,11,16,5,93,2, -9,89,162,8,36,35,51,9,223,0,33,43,34,20,102,159,34,16,1,20,25, +8,89,162,8,36,35,51,9,223,0,33,43,34,20,102,159,34,16,1,20,25, 159,35,2,2,2,13,16,0,11,16,5,93,2,3,89,162,8,36,35,52,9, 223,0,33,44,34,20,102,159,34,16,1,20,25,159,35,2,2,2,13,16,0, -11,16,5,93,2,6,89,162,8,36,35,53,9,223,0,33,45,34,20,102,159, -34,16,1,20,25,159,35,2,2,2,13,16,0,11,16,5,93,2,7,89,162, +11,16,5,93,2,10,89,162,8,36,35,53,9,223,0,33,45,34,20,102,159, +34,16,1,20,25,159,35,2,2,2,13,16,0,11,16,5,93,2,6,89,162, 8,36,35,56,9,223,0,33,46,34,20,102,159,34,16,1,20,25,159,35,2, 2,2,13,16,1,33,48,11,16,5,93,2,11,89,162,8,36,35,52,9,223, 0,33,49,34,20,102,159,34,16,1,20,25,159,35,2,2,2,13,16,0,11, @@ -95,7 +95,7 @@ EVAL_ONE_SIZED_STR((char *)expr, 1943); } { - static MZCOMPILED_STRING_FAR unsigned char expr[] = {35,126,8,51,46,57,57,46,48,46,54,61,0,0,0,1,0,0,3,0,16, + static MZCOMPILED_STRING_FAR unsigned char expr[] = {35,126,8,51,46,57,57,46,48,46,55,61,0,0,0,1,0,0,3,0,16, 0,21,0,38,0,53,0,71,0,87,0,97,0,115,0,135,0,151,0,169,0, 200,0,229,0,251,0,9,1,15,1,29,1,34,1,44,1,52,1,80,1,112, 1,157,1,202,1,226,1,9,2,11,2,20,2,71,2,87,3,96,3,126,3, @@ -128,134 +128,134 @@ 97,110,110,111,116,32,97,100,100,32,97,32,115,117,102,102,105,120,32,116,111, 32,97,32,114,111,111,116,32,112,97,116,104,58,32,5,0,68,35,37,107,101, 114,110,101,108,27,20,14,159,80,158,35,49,250,80,158,38,50,249,22,27,11, -80,158,40,49,22,134,12,10,248,22,184,4,195,28,248,22,162,5,193,12,87, -94,248,22,138,8,193,248,80,159,36,53,35,195,28,248,22,71,194,9,27,248, -22,64,195,27,28,248,22,179,12,194,193,28,248,22,178,12,194,249,22,180,12, -195,250,80,158,41,47,248,22,130,13,2,20,11,10,250,80,158,39,47,248,22, -130,13,2,20,196,10,28,192,249,22,63,248,22,182,12,249,22,180,12,197,247, -22,131,13,27,248,22,65,199,28,248,22,71,193,9,27,248,22,64,194,27,28, -248,22,179,12,194,193,28,248,22,178,12,194,249,22,180,12,195,250,80,158,46, -47,248,22,130,13,2,20,11,10,250,80,158,44,47,248,22,130,13,2,20,196, -10,28,192,249,22,63,248,22,182,12,249,22,180,12,197,247,22,131,13,248,80, +80,158,40,49,22,136,12,10,248,22,185,4,195,28,248,22,163,5,193,12,87, +94,248,22,139,8,193,248,80,159,36,53,35,195,28,248,22,71,194,9,27,248, +22,64,195,27,28,248,22,181,12,194,193,28,248,22,180,12,194,249,22,182,12, +195,250,80,158,41,47,248,22,132,13,2,20,11,10,250,80,158,39,47,248,22, +132,13,2,20,196,10,28,192,249,22,63,248,22,184,12,249,22,182,12,197,247, +22,133,13,27,248,22,65,199,28,248,22,71,193,9,27,248,22,64,194,27,28, +248,22,181,12,194,193,28,248,22,180,12,194,249,22,182,12,195,250,80,158,46, +47,248,22,132,13,2,20,11,10,250,80,158,44,47,248,22,132,13,2,20,196, +10,28,192,249,22,63,248,22,184,12,249,22,182,12,197,247,22,133,13,248,80, 159,44,52,35,248,22,65,198,248,80,159,42,52,35,248,22,65,196,27,248,22, -65,197,28,248,22,71,193,9,27,248,22,64,194,27,28,248,22,179,12,194,193, -28,248,22,178,12,194,249,22,180,12,195,250,80,158,44,47,248,22,130,13,2, -20,11,10,250,80,158,42,47,248,22,130,13,2,20,196,10,28,192,249,22,63, -248,22,182,12,249,22,180,12,197,247,22,131,13,248,80,159,42,52,35,248,22, +65,197,28,248,22,71,193,9,27,248,22,64,194,27,28,248,22,181,12,194,193, +28,248,22,180,12,194,249,22,182,12,195,250,80,158,44,47,248,22,132,13,2, +20,11,10,250,80,158,42,47,248,22,132,13,2,20,196,10,28,192,249,22,63, +248,22,184,12,249,22,182,12,197,247,22,133,13,248,80,159,42,52,35,248,22, 65,198,248,80,159,40,52,35,248,22,65,196,249,80,159,36,37,35,2,7,195, -27,248,22,155,12,194,28,192,192,28,248,22,131,6,194,27,248,22,177,12,195, -28,192,192,248,22,178,12,195,11,87,94,28,28,248,22,156,12,194,10,27,248, -22,155,12,195,28,192,192,28,248,22,131,6,195,27,248,22,177,12,196,28,192, -192,248,22,178,12,196,11,12,250,22,165,8,76,110,111,114,109,97,108,45,112, +27,248,22,157,12,194,28,192,192,28,248,22,132,6,194,27,248,22,179,12,195, +28,192,192,248,22,180,12,195,11,87,94,28,28,248,22,158,12,194,10,27,248, +22,157,12,195,28,192,192,28,248,22,132,6,195,27,248,22,179,12,196,28,192, +192,248,22,180,12,196,11,12,250,22,166,8,76,110,111,114,109,97,108,45,112, 97,116,104,45,99,97,115,101,6,42,42,112,97,116,104,32,40,102,111,114,32, 97,110,121,32,115,121,115,116,101,109,41,32,111,114,32,118,97,108,105,100,45, -112,97,116,104,32,115,116,114,105,110,103,196,28,28,248,22,156,12,194,249,22, -135,8,248,22,157,12,196,2,21,249,22,135,8,247,22,150,7,2,21,27,28, -248,22,131,6,195,194,248,22,140,7,248,22,160,12,196,28,249,22,143,13,0, +112,97,116,104,32,115,116,114,105,110,103,196,28,28,248,22,158,12,194,249,22, +136,8,248,22,159,12,196,2,21,249,22,136,8,247,22,151,7,2,21,27,28, +248,22,132,6,195,194,248,22,141,7,248,22,162,12,196,28,249,22,145,13,0, 21,35,114,120,34,94,91,92,92,93,91,92,92,93,91,63,93,91,92,92,93, -34,194,28,248,22,131,6,195,248,22,163,12,195,194,27,248,22,170,6,194,249, -22,164,12,248,22,143,7,250,22,149,13,0,6,35,114,120,34,47,34,28,249, -22,143,13,0,22,35,114,120,34,91,47,92,92,93,91,46,32,93,43,91,47, -92,92,93,42,36,34,200,198,250,22,149,13,0,19,35,114,120,34,91,32,46, +34,194,28,248,22,132,6,195,248,22,165,12,195,194,27,248,22,171,6,194,249, +22,166,12,248,22,144,7,250,22,151,13,0,6,35,114,120,34,47,34,28,249, +22,145,13,0,22,35,114,120,34,91,47,92,92,93,91,46,32,93,43,91,47, +92,92,93,42,36,34,200,198,250,22,151,13,0,19,35,114,120,34,91,32,46, 93,43,40,91,47,92,92,93,42,41,36,34,201,6,2,2,92,49,80,158,42, -35,2,21,28,248,22,131,6,194,248,22,163,12,194,193,87,94,28,27,248,22, -155,12,195,28,192,192,28,248,22,131,6,195,27,248,22,177,12,196,28,192,192, -248,22,178,12,196,11,12,250,22,165,8,195,2,22,196,28,248,22,177,12,194, -12,248,22,179,10,249,22,188,9,248,22,160,6,250,22,179,6,2,23,199,200, -247,22,23,87,94,28,27,248,22,155,12,195,28,192,192,28,248,22,131,6,195, -27,248,22,177,12,196,28,192,192,248,22,178,12,196,11,12,250,22,165,8,195, -2,22,196,28,248,22,177,12,194,12,248,22,179,10,249,22,188,9,248,22,160, -6,250,22,179,6,2,23,199,200,247,22,23,87,94,87,94,28,27,248,22,155, -12,195,28,192,192,28,248,22,131,6,195,27,248,22,177,12,196,28,192,192,248, -22,178,12,196,11,12,250,22,165,8,195,2,22,196,28,248,22,177,12,194,12, -248,22,179,10,249,22,188,9,248,22,160,6,250,22,179,6,2,23,199,200,247, -22,23,249,22,3,89,162,34,35,48,9,223,2,33,36,196,248,22,179,10,249, -22,154,10,195,247,22,23,87,94,87,94,249,80,159,36,37,35,2,7,195,249, +35,2,21,28,248,22,132,6,194,248,22,165,12,194,193,87,94,28,27,248,22, +157,12,195,28,192,192,28,248,22,132,6,195,27,248,22,179,12,196,28,192,192, +248,22,180,12,196,11,12,250,22,166,8,195,2,22,196,28,248,22,179,12,194, +12,248,22,181,10,249,22,190,9,248,22,161,6,250,22,180,6,2,23,199,200, +247,22,23,87,94,28,27,248,22,157,12,195,28,192,192,28,248,22,132,6,195, +27,248,22,179,12,196,28,192,192,248,22,180,12,196,11,12,250,22,166,8,195, +2,22,196,28,248,22,179,12,194,12,248,22,181,10,249,22,190,9,248,22,161, +6,250,22,180,6,2,23,199,200,247,22,23,87,94,87,94,28,27,248,22,157, +12,195,28,192,192,28,248,22,132,6,195,27,248,22,179,12,196,28,192,192,248, +22,180,12,196,11,12,250,22,166,8,195,2,22,196,28,248,22,179,12,194,12, +248,22,181,10,249,22,190,9,248,22,161,6,250,22,180,6,2,23,199,200,247, +22,23,249,22,3,89,162,34,35,48,9,223,2,33,36,196,248,22,181,10,249, +22,156,10,195,247,22,23,87,94,87,94,249,80,159,36,37,35,2,7,195,249, 22,3,80,159,36,51,35,196,251,80,159,38,40,35,2,7,32,0,89,162,34, 35,43,9,222,33,38,197,198,32,40,89,162,34,40,57,65,99,108,111,111,112, -222,33,41,28,248,22,71,198,248,195,251,22,179,6,2,24,198,28,248,22,71, -202,200,250,22,1,22,173,12,203,204,197,27,249,22,173,12,248,22,64,201,198, -28,248,22,168,12,193,27,250,22,1,22,173,12,196,201,28,248,22,168,12,193, -192,27,248,22,65,201,28,248,22,71,193,248,198,251,22,179,6,2,24,201,28, -248,22,71,205,203,250,22,1,22,173,12,206,23,15,200,27,249,22,173,12,248, -22,64,196,201,28,248,22,168,12,193,27,250,22,1,22,173,12,196,204,28,248, -22,168,12,193,192,253,2,40,203,204,205,206,23,15,248,22,65,201,253,2,40, +222,33,41,28,248,22,71,198,248,195,251,22,180,6,2,24,198,28,248,22,71, +202,200,250,22,1,22,175,12,203,204,197,27,249,22,175,12,248,22,64,201,198, +28,248,22,170,12,193,27,250,22,1,22,175,12,196,201,28,248,22,170,12,193, +192,27,248,22,65,201,28,248,22,71,193,248,198,251,22,180,6,2,24,201,28, +248,22,71,205,203,250,22,1,22,175,12,206,23,15,200,27,249,22,175,12,248, +22,64,196,201,28,248,22,170,12,193,27,250,22,1,22,175,12,196,204,28,248, +22,170,12,193,192,253,2,40,203,204,205,206,23,15,248,22,65,201,253,2,40, 202,203,204,205,206,248,22,65,200,27,248,22,65,200,28,248,22,71,193,248,197, -251,22,179,6,2,24,200,28,248,22,71,204,202,250,22,1,22,173,12,205,206, -199,27,249,22,173,12,248,22,64,196,200,28,248,22,168,12,193,27,250,22,1, -22,173,12,196,203,28,248,22,168,12,193,192,253,2,40,202,203,204,205,206,248, -22,65,201,253,2,40,201,202,203,204,205,248,22,65,200,27,247,22,132,13,253, -2,40,198,199,200,201,202,198,87,95,28,28,248,22,156,12,193,10,27,248,22, -155,12,194,28,192,192,28,248,22,131,6,194,27,248,22,177,12,195,28,192,192, -248,22,178,12,195,11,12,252,22,165,8,199,2,25,34,197,198,28,28,248,22, -131,6,194,10,248,22,183,6,194,12,252,22,165,8,199,2,26,35,197,198,91, -159,37,11,90,161,37,34,11,248,22,176,12,196,87,94,28,192,12,250,22,166, +251,22,180,6,2,24,200,28,248,22,71,204,202,250,22,1,22,175,12,205,206, +199,27,249,22,175,12,248,22,64,196,200,28,248,22,170,12,193,27,250,22,1, +22,175,12,196,203,28,248,22,170,12,193,192,253,2,40,202,203,204,205,206,248, +22,65,201,253,2,40,201,202,203,204,205,248,22,65,200,27,247,22,134,13,253, +2,40,198,199,200,201,202,198,87,95,28,28,248,22,158,12,193,10,27,248,22, +157,12,194,28,192,192,28,248,22,132,6,194,27,248,22,179,12,195,28,192,192, +248,22,180,12,195,11,12,252,22,166,8,199,2,25,34,197,198,28,28,248,22, +132,6,194,10,248,22,184,6,194,12,252,22,166,8,199,2,26,35,197,198,91, +159,37,11,90,161,37,34,11,248,22,178,12,196,87,94,28,192,12,250,22,167, 8,200,2,27,198,249,22,7,194,195,91,159,36,11,90,161,36,34,11,87,95, -28,28,248,22,156,12,195,10,27,248,22,155,12,196,28,192,192,28,248,22,131, -6,196,27,248,22,177,12,197,28,192,192,248,22,178,12,197,11,12,252,22,165, -8,2,10,2,25,34,199,200,28,28,248,22,131,6,196,10,248,22,183,6,196, -12,252,22,165,8,2,10,2,26,35,199,200,91,159,37,11,90,161,37,34,11, -248,22,176,12,198,87,94,28,192,12,250,22,166,8,2,10,2,27,200,249,22, -7,194,195,27,249,22,165,12,250,22,148,13,0,18,35,114,120,35,34,40,91, -46,93,91,94,46,93,42,124,41,36,34,248,22,161,12,200,28,248,22,131,6, -202,249,22,143,7,203,8,63,201,28,248,22,156,12,198,248,22,157,12,198,247, -22,158,12,28,248,22,155,12,194,249,22,173,12,195,194,192,91,159,36,11,90, -161,36,34,11,87,95,28,28,248,22,156,12,195,10,27,248,22,155,12,196,28, -192,192,28,248,22,131,6,196,27,248,22,177,12,197,28,192,192,248,22,178,12, -197,11,12,252,22,165,8,2,11,2,25,34,199,200,28,28,248,22,131,6,196, -10,248,22,183,6,196,12,252,22,165,8,2,11,2,26,35,199,200,91,159,37, -11,90,161,37,34,11,248,22,176,12,198,87,94,28,192,12,250,22,166,8,2, -11,2,27,200,249,22,7,194,195,27,249,22,165,12,249,22,129,7,250,22,149, -13,0,9,35,114,120,35,34,91,46,93,34,248,22,161,12,202,6,1,1,95, -28,248,22,131,6,201,249,22,143,7,202,8,63,200,28,248,22,156,12,198,248, -22,157,12,198,247,22,158,12,28,248,22,155,12,194,249,22,173,12,195,194,192, -249,247,22,182,5,194,11,248,80,158,35,45,9,27,247,22,134,13,249,80,158, -37,46,28,194,27,248,22,148,7,6,11,11,80,76,84,67,79,76,76,69,67, -84,83,28,192,192,6,0,0,6,0,0,27,28,195,250,22,173,12,248,22,130, -13,69,97,100,100,111,110,45,100,105,114,247,22,146,7,6,8,8,99,111,108, +28,28,248,22,158,12,195,10,27,248,22,157,12,196,28,192,192,28,248,22,132, +6,196,27,248,22,179,12,197,28,192,192,248,22,180,12,197,11,12,252,22,166, +8,2,10,2,25,34,199,200,28,28,248,22,132,6,196,10,248,22,184,6,196, +12,252,22,166,8,2,10,2,26,35,199,200,91,159,37,11,90,161,37,34,11, +248,22,178,12,198,87,94,28,192,12,250,22,167,8,2,10,2,27,200,249,22, +7,194,195,27,249,22,167,12,250,22,150,13,0,18,35,114,120,35,34,40,91, +46,93,91,94,46,93,42,124,41,36,34,248,22,163,12,200,28,248,22,132,6, +202,249,22,144,7,203,8,63,201,28,248,22,158,12,198,248,22,159,12,198,247, +22,160,12,28,248,22,157,12,194,249,22,175,12,195,194,192,91,159,36,11,90, +161,36,34,11,87,95,28,28,248,22,158,12,195,10,27,248,22,157,12,196,28, +192,192,28,248,22,132,6,196,27,248,22,179,12,197,28,192,192,248,22,180,12, +197,11,12,252,22,166,8,2,11,2,25,34,199,200,28,28,248,22,132,6,196, +10,248,22,184,6,196,12,252,22,166,8,2,11,2,26,35,199,200,91,159,37, +11,90,161,37,34,11,248,22,178,12,198,87,94,28,192,12,250,22,167,8,2, +11,2,27,200,249,22,7,194,195,27,249,22,167,12,249,22,130,7,250,22,151, +13,0,9,35,114,120,35,34,91,46,93,34,248,22,163,12,202,6,1,1,95, +28,248,22,132,6,201,249,22,144,7,202,8,63,200,28,248,22,158,12,198,248, +22,159,12,198,247,22,160,12,28,248,22,157,12,194,249,22,175,12,195,194,192, +249,247,22,183,5,194,11,248,80,158,35,45,9,27,247,22,136,13,249,80,158, +37,46,28,194,27,248,22,149,7,6,11,11,80,76,84,67,79,76,76,69,67, +84,83,28,192,192,6,0,0,6,0,0,27,28,195,250,22,175,12,248,22,132, +13,69,97,100,100,111,110,45,100,105,114,247,22,147,7,6,8,8,99,111,108, 108,101,99,116,115,11,27,248,80,159,40,52,35,249,22,77,201,248,22,73,248, -22,130,13,72,99,111,108,108,101,99,116,115,45,100,105,114,28,193,249,22,63, -195,194,192,32,49,89,162,34,37,49,2,19,222,33,50,27,249,22,141,13,196, +22,132,13,72,99,111,108,108,101,99,116,115,45,100,105,114,28,193,249,22,63, +195,194,192,32,49,89,162,34,37,49,2,19,222,33,50,27,249,22,143,13,196, 197,28,192,27,248,22,88,194,27,250,2,49,198,199,248,22,97,198,28,249,22, -189,6,195,2,28,249,22,77,197,194,249,22,63,248,22,164,12,196,194,28,249, -22,189,6,197,2,28,249,22,77,195,9,249,22,63,248,22,164,12,198,9,87, -95,28,28,248,22,183,6,194,10,248,22,131,6,194,12,250,22,165,8,2,14, +190,6,195,2,28,249,22,77,197,194,249,22,63,248,22,166,12,196,194,28,249, +22,190,6,197,2,28,249,22,77,195,9,249,22,63,248,22,166,12,198,9,87, +95,28,28,248,22,184,6,194,10,248,22,132,6,194,12,250,22,166,8,2,14, 6,21,21,98,121,116,101,32,115,116,114,105,110,103,32,111,114,32,115,116,114, -105,110,103,196,28,28,248,22,72,195,249,22,4,22,155,12,196,11,12,250,22, -165,8,2,14,6,13,13,108,105,115,116,32,111,102,32,112,97,116,104,115,197, -250,2,49,197,195,28,248,22,131,6,197,248,22,142,7,197,196,32,52,89,162, +105,110,103,196,28,28,248,22,72,195,249,22,4,22,157,12,196,11,12,250,22, +166,8,2,14,6,13,13,108,105,115,116,32,111,102,32,112,97,116,104,115,197, +250,2,49,197,195,28,248,22,132,6,197,248,22,143,7,197,196,32,52,89,162, 8,36,38,56,2,19,222,33,55,32,53,89,162,8,36,37,53,70,102,111,117, 110,100,45,101,120,101,99,222,33,54,28,192,91,159,37,11,90,161,37,34,11, -248,22,176,12,198,27,28,197,27,248,22,181,12,200,28,249,22,137,8,194,201, -11,28,248,22,177,12,193,250,2,53,200,201,249,22,173,12,199,197,250,2,53, -200,201,195,11,28,192,192,27,28,248,22,155,12,195,27,249,22,173,12,197,200, -28,28,248,22,168,12,193,10,248,22,167,12,193,192,11,11,28,192,192,28,198, -11,27,248,22,181,12,201,28,249,22,137,8,194,202,11,28,248,22,177,12,193, -250,2,53,201,202,249,22,173,12,200,197,250,2,53,201,202,195,194,28,248,22, -71,196,11,27,248,22,180,12,248,22,64,198,27,249,22,173,12,195,196,28,248, -22,167,12,193,250,2,53,198,199,195,27,248,22,65,199,28,248,22,71,193,11, -27,248,22,180,12,248,22,64,195,27,249,22,173,12,195,199,28,248,22,167,12, +248,22,178,12,198,27,28,197,27,248,22,183,12,200,28,249,22,138,8,194,201, +11,28,248,22,179,12,193,250,2,53,200,201,249,22,175,12,199,197,250,2,53, +200,201,195,11,28,192,192,27,28,248,22,157,12,195,27,249,22,175,12,197,200, +28,28,248,22,170,12,193,10,248,22,169,12,193,192,11,11,28,192,192,28,198, +11,27,248,22,183,12,201,28,249,22,138,8,194,202,11,28,248,22,179,12,193, +250,2,53,201,202,249,22,175,12,200,197,250,2,53,201,202,195,194,28,248,22, +71,196,11,27,248,22,182,12,248,22,64,198,27,249,22,175,12,195,196,28,248, +22,169,12,193,250,2,53,198,199,195,27,248,22,65,199,28,248,22,71,193,11, +27,248,22,182,12,248,22,64,195,27,249,22,175,12,195,199,28,248,22,169,12, 193,250,2,53,201,202,195,27,248,22,65,196,28,248,22,71,193,11,27,248,22, -180,12,248,22,64,195,27,249,22,173,12,195,202,28,248,22,167,12,193,250,2, -53,204,205,195,251,2,52,204,205,206,248,22,65,199,87,95,28,27,248,22,155, -12,195,28,192,192,28,248,22,131,6,195,27,248,22,177,12,196,28,192,192,248, -22,178,12,196,11,12,250,22,165,8,2,15,6,25,25,112,97,116,104,32,111, +182,12,248,22,64,195,27,249,22,175,12,195,202,28,248,22,169,12,193,250,2, +53,204,205,195,251,2,52,204,205,206,248,22,65,199,87,95,28,27,248,22,157, +12,195,28,192,192,28,248,22,132,6,195,27,248,22,179,12,196,28,192,192,248, +22,180,12,196,11,12,250,22,166,8,2,15,6,25,25,112,97,116,104,32,111, 114,32,115,116,114,105,110,103,32,40,115,97,110,115,32,110,117,108,41,196,28, -28,194,28,27,248,22,155,12,196,28,192,192,28,248,22,131,6,196,27,248,22, -177,12,197,28,192,192,248,22,178,12,197,11,248,22,177,12,195,11,10,12,250, -22,165,8,2,15,6,29,29,35,102,32,111,114,32,114,101,108,97,116,105,118, +28,194,28,27,248,22,157,12,196,28,192,192,28,248,22,132,6,196,27,248,22, +179,12,197,28,192,192,248,22,180,12,197,11,248,22,179,12,195,11,10,12,250, +22,166,8,2,15,6,29,29,35,102,32,111,114,32,114,101,108,97,116,105,118, 101,32,112,97,116,104,32,111,114,32,115,116,114,105,110,103,197,28,28,248,22, -177,12,194,91,159,37,11,90,161,37,34,11,248,22,176,12,197,249,22,135,8, -194,68,114,101,108,97,116,105,118,101,11,27,248,22,148,7,6,4,4,80,65, +179,12,194,91,159,37,11,90,161,37,34,11,248,22,178,12,197,249,22,136,8, +194,68,114,101,108,97,116,105,118,101,11,27,248,22,149,7,6,4,4,80,65, 84,72,251,2,52,198,199,200,28,196,27,249,80,158,42,46,199,9,28,249,22, -135,8,247,22,150,7,2,21,249,22,63,248,22,164,12,5,1,46,194,192,9, -27,248,22,180,12,195,28,248,22,167,12,193,250,2,53,198,199,195,11,250,80, -158,37,47,196,197,11,250,80,158,37,47,196,11,11,87,94,249,22,187,5,247, -22,164,4,195,248,22,138,5,249,22,150,3,34,249,22,134,3,197,198,27,248, -22,130,13,2,20,27,249,80,158,38,47,195,11,27,27,248,22,153,3,198,28, -192,192,34,27,27,248,22,153,3,200,28,192,192,34,27,249,22,181,4,197,89, -162,8,36,34,46,9,224,4,3,33,59,27,248,22,168,4,194,87,94,248,22, -132,4,21,94,2,17,2,29,248,80,159,41,53,35,193,159,34,20,102,159,34, +136,8,247,22,151,7,2,21,249,22,63,248,22,166,12,5,1,46,194,192,9, +27,248,22,182,12,195,28,248,22,169,12,193,250,2,53,198,199,195,11,250,80, +158,37,47,196,197,11,250,80,158,37,47,196,11,11,87,94,249,22,188,5,247, +22,165,4,195,248,22,139,5,249,22,151,3,34,249,22,135,3,197,198,27,248, +22,132,13,2,20,27,249,80,158,38,47,195,11,27,27,248,22,154,3,198,28, +192,192,34,27,27,248,22,154,3,200,28,192,192,34,27,249,22,182,4,197,89, +162,8,36,34,46,9,224,4,3,33,59,27,248,22,169,4,194,87,94,248,22, +133,4,21,94,2,17,2,29,248,80,159,41,53,35,193,159,34,20,102,159,34, 16,1,20,24,65,98,101,103,105,110,16,0,83,158,40,20,99,131,67,35,37, 117,116,105,108,115,2,1,11,10,10,10,10,10,41,80,158,34,34,20,102,159, 37,16,17,30,2,1,2,2,193,30,2,1,2,3,193,30,2,1,2,4,193, @@ -274,7 +274,7 @@ 34,16,2,89,162,34,35,54,2,19,223,0,33,31,80,159,34,52,35,83,158, 34,16,2,89,162,8,36,35,43,9,223,0,33,32,80,159,34,51,35,83,158, 34,16,2,32,0,89,162,34,35,43,2,2,222,33,33,80,159,34,34,35,83, -158,34,16,2,249,22,133,6,7,92,7,92,80,159,34,35,35,83,158,34,16, +158,34,16,2,249,22,134,6,7,92,7,92,80,159,34,35,35,83,158,34,16, 2,89,162,34,35,52,2,4,223,0,33,34,80,159,34,36,35,83,158,34,16, 2,32,0,89,162,34,36,48,2,5,222,33,35,80,159,34,37,35,83,158,34, 16,2,32,0,89,162,34,37,49,2,6,222,33,37,80,159,34,38,35,83,158, @@ -286,8 +286,8 @@ 34,43,35,83,158,34,16,2,32,0,89,162,34,35,42,2,12,222,33,46,80, 159,34,44,35,83,158,34,16,2,83,158,37,20,96,95,2,13,89,162,34,34, 41,9,223,0,33,47,89,162,34,35,51,9,223,0,33,48,80,159,34,45,35, -83,158,34,16,2,27,248,22,137,13,248,22,142,7,27,28,249,22,135,8,247, -22,150,7,2,21,6,1,1,59,6,1,1,58,250,22,179,6,6,14,14,40, +83,158,34,16,2,27,248,22,139,13,248,22,143,7,27,28,249,22,136,8,247, +22,151,7,2,21,6,1,1,59,6,1,1,58,250,22,180,6,6,14,14,40, 91,94,126,97,93,42,41,126,97,40,46,42,41,195,195,89,162,34,36,46,2, 14,223,0,33,51,80,159,34,46,35,83,158,34,16,2,83,158,37,20,96,96, 2,15,89,162,8,36,37,52,9,223,0,33,56,89,162,34,36,45,9,223,0, @@ -298,7 +298,7 @@ EVAL_ONE_SIZED_STR((char *)expr, 4179); } { - static MZCOMPILED_STRING_FAR unsigned char expr[] = {35,126,8,51,46,57,57,46,48,46,54,7,0,0,0,1,0,0,6,0,19, + static MZCOMPILED_STRING_FAR unsigned char expr[] = {35,126,8,51,46,57,57,46,48,46,55,7,0,0,0,1,0,0,6,0,19, 0,34,0,48,0,62,0,76,0,0,0,245,0,0,0,65,113,117,111,116,101, 29,94,2,1,67,35,37,117,116,105,108,115,11,29,94,2,1,69,35,37,110, 101,116,119,111,114,107,11,29,94,2,1,68,35,37,112,97,114,97,109,122,11, @@ -315,7 +315,7 @@ EVAL_ONE_SIZED_STR((char *)expr, 281); } { - static MZCOMPILED_STRING_FAR unsigned char expr[] = {35,126,8,51,46,57,57,46,48,46,54,52,0,0,0,1,0,0,3,0,14, + static MZCOMPILED_STRING_FAR unsigned char expr[] = {35,126,8,51,46,57,57,46,48,46,55,52,0,0,0,1,0,0,3,0,14, 0,41,0,47,0,60,0,74,0,96,0,122,0,134,0,152,0,172,0,184,0, 200,0,223,0,3,1,8,1,13,1,18,1,23,1,54,1,58,1,66,1,74, 1,82,1,163,1,199,1,216,1,245,1,17,2,47,2,57,2,87,2,97,2, @@ -337,39 +337,39 @@ 107,64,108,111,111,112,1,29,115,116,97,110,100,97,114,100,45,109,111,100,117, 108,101,45,110,97,109,101,45,114,101,115,111,108,118,101,114,63,108,105,98,67, 105,103,110,111,114,101,100,249,22,14,195,80,158,36,44,249,80,159,36,47,35, -195,10,27,28,194,28,249,22,135,8,196,80,158,37,45,80,158,35,46,27,248, -22,147,4,196,28,248,22,155,12,193,91,159,37,11,90,161,37,34,11,248,22, -176,12,196,87,95,83,160,36,11,80,158,39,45,198,83,160,36,11,80,158,39, -46,192,192,11,11,28,192,192,27,247,22,183,5,28,192,192,247,22,131,13,20, -14,159,80,158,34,38,250,80,158,37,39,249,22,27,11,80,158,39,38,22,183, -5,28,248,22,155,12,197,196,247,22,131,13,247,194,250,22,173,12,196,198,249, -80,158,41,37,197,5,3,46,122,111,252,22,173,12,198,200,6,6,6,110,97, -116,105,118,101,247,22,151,7,249,80,158,43,37,199,80,158,43,34,27,193,27, -250,22,190,12,196,11,32,0,89,162,8,44,34,39,9,222,11,28,192,249,22, -63,195,194,11,27,248,194,195,27,250,22,190,12,196,11,32,0,89,162,8,44, -34,39,9,222,11,28,192,249,22,63,195,194,11,249,247,22,136,13,248,22,64, -195,195,27,248,194,195,27,250,22,190,12,196,11,32,0,89,162,8,44,34,39, -9,222,11,28,192,249,22,63,195,194,11,249,247,22,181,5,248,22,64,195,195, -249,247,22,181,5,194,195,87,94,28,248,80,158,35,36,194,12,250,22,165,8, +195,10,27,28,194,28,249,22,136,8,196,80,158,37,45,80,158,35,46,27,248, +22,148,4,196,28,248,22,157,12,193,91,159,37,11,90,161,37,34,11,248,22, +178,12,196,87,95,83,160,36,11,80,158,39,45,198,83,160,36,11,80,158,39, +46,192,192,11,11,28,192,192,27,247,22,184,5,28,192,192,247,22,133,13,20, +14,159,80,158,34,38,250,80,158,37,39,249,22,27,11,80,158,39,38,22,184, +5,28,248,22,157,12,197,196,247,22,133,13,247,194,250,22,175,12,196,198,249, +80,158,41,37,197,5,3,46,122,111,252,22,175,12,198,200,6,6,6,110,97, +116,105,118,101,247,22,152,7,249,80,158,43,37,199,80,158,43,34,27,193,27, +250,22,128,13,196,11,32,0,89,162,8,44,34,39,9,222,11,28,192,249,22, +63,195,194,11,27,248,194,195,27,250,22,128,13,196,11,32,0,89,162,8,44, +34,39,9,222,11,28,192,249,22,63,195,194,11,249,247,22,138,13,248,22,64, +195,195,27,248,194,195,27,250,22,128,13,196,11,32,0,89,162,8,44,34,39, +9,222,11,28,192,249,22,63,195,194,11,249,247,22,182,5,248,22,64,195,195, +249,247,22,182,5,194,195,87,94,28,248,80,158,35,36,194,12,250,22,166,8, 77,108,111,97,100,47,117,115,101,45,99,111,109,112,105,108,101,100,6,25,25, 112,97,116,104,32,111,114,32,118,97,108,105,100,45,112,97,116,104,32,115,116, -114,105,110,103,196,91,159,40,11,90,161,35,34,11,28,248,22,179,12,200,199, -27,247,22,183,5,28,192,249,22,180,12,202,194,200,90,161,37,35,11,248,22, -176,12,193,90,161,35,38,11,28,249,22,135,8,195,68,114,101,108,97,116,105, -118,101,2,17,193,90,161,35,39,11,247,22,133,13,27,89,162,34,35,48,62, +114,105,110,103,196,91,159,40,11,90,161,35,34,11,28,248,22,181,12,200,199, +27,247,22,184,5,28,192,249,22,182,12,202,194,200,90,161,37,35,11,248,22, +178,12,193,90,161,35,38,11,28,249,22,136,8,195,68,114,101,108,97,116,105, +118,101,2,17,193,90,161,35,39,11,247,22,135,13,27,89,162,34,35,48,62, 122,111,225,7,5,3,33,27,27,89,162,34,35,50,9,225,8,6,4,33,28, 27,249,22,5,89,162,34,35,46,9,223,5,33,29,202,27,28,194,27,249,22, 5,89,162,34,35,46,9,223,5,33,30,204,27,28,195,11,193,28,192,192,28, -193,28,195,28,249,22,146,3,248,22,65,196,248,22,65,198,193,11,11,11,11, +193,28,195,28,249,22,147,3,248,22,65,196,248,22,65,198,193,11,11,11,11, 28,192,249,80,159,46,53,35,202,89,162,34,34,44,9,224,14,2,33,31,27, 28,196,27,249,22,5,89,162,34,35,46,9,223,7,33,32,205,27,28,196,11, -193,28,192,192,28,193,28,196,28,249,22,146,3,248,22,65,196,248,22,65,199, +193,28,192,192,28,193,28,196,28,249,22,147,3,248,22,65,196,248,22,65,199, 193,11,11,11,11,28,192,249,80,159,47,53,35,203,89,162,34,34,44,9,224, 15,2,33,33,249,80,159,47,53,35,203,89,162,34,34,43,9,224,15,7,33, 34,32,36,89,162,34,35,53,2,19,222,33,38,0,17,35,114,120,34,94,40, -46,42,63,41,47,40,46,42,41,36,34,27,249,22,141,13,2,37,195,28,192, -249,22,63,248,22,88,195,27,248,22,97,196,27,249,22,141,13,2,37,195,28, -192,249,22,63,248,22,88,195,27,248,22,97,196,27,249,22,141,13,2,37,195, +46,42,63,41,47,40,46,42,41,36,34,27,249,22,143,13,2,37,195,28,192, +249,22,63,248,22,88,195,27,248,22,97,196,27,249,22,143,13,2,37,195,28, +192,249,22,63,248,22,88,195,27,248,22,97,196,27,249,22,143,13,2,37,195, 28,192,249,22,63,248,22,88,195,248,2,36,248,22,97,196,248,22,73,194,248, 22,73,194,248,22,73,194,32,39,89,162,34,35,53,2,19,222,33,40,28,248, 22,71,248,22,65,194,249,22,7,9,248,22,64,195,91,159,36,11,90,161,36, @@ -378,80 +378,80 @@ 22,65,194,249,22,7,9,248,22,64,195,91,159,36,11,90,161,36,34,11,248, 2,39,248,22,65,196,249,22,7,249,22,63,248,22,64,199,196,195,249,22,7, 249,22,63,248,22,64,199,196,195,249,22,7,249,22,63,248,22,64,199,196,195, -27,248,2,36,194,28,194,192,248,2,39,193,87,95,28,248,22,145,4,195,12, -250,22,165,8,2,20,6,20,20,114,101,115,111,108,118,101,100,45,109,111,100, +27,248,2,36,194,28,194,192,248,2,39,193,87,95,28,248,22,146,4,195,12, +250,22,166,8,2,20,6,20,20,114,101,115,111,108,118,101,100,45,109,111,100, 117,108,101,45,112,97,116,104,197,28,207,248,208,195,12,27,27,250,22,126,80, -158,40,41,248,22,159,13,247,22,143,11,11,28,192,192,27,247,22,120,87,94, -250,22,125,80,158,41,41,248,22,159,13,247,22,143,11,195,192,250,22,125,195, -198,66,97,116,116,97,99,104,251,211,197,198,199,10,28,192,250,22,164,8,11, -196,195,248,22,162,8,194,28,249,22,137,6,194,6,1,1,46,2,17,28,249, -22,137,6,194,6,2,2,46,46,62,117,112,192,28,249,22,137,8,248,22,65, -199,196,28,249,22,135,8,248,22,64,199,195,251,22,162,8,2,20,6,26,26, +158,40,41,248,22,161,13,247,22,145,11,11,28,192,192,27,247,22,120,87,94, +250,22,125,80,158,41,41,248,22,161,13,247,22,145,11,195,192,250,22,125,195, +198,66,97,116,116,97,99,104,251,211,197,198,199,10,28,192,250,22,165,8,11, +196,195,248,22,163,8,194,28,249,22,138,6,194,6,1,1,46,2,17,28,249, +22,138,6,194,6,2,2,46,46,62,117,112,192,28,249,22,138,8,248,22,65, +199,196,28,249,22,136,8,248,22,64,199,195,251,22,163,8,2,20,6,26,26, 99,121,99,108,101,32,105,110,32,108,111,97,100,105,110,103,32,97,116,32,126, 101,58,32,126,101,199,249,22,2,22,65,248,22,78,249,22,63,205,201,12,12, -247,192,20,14,159,80,158,38,43,249,22,63,247,22,143,11,196,20,14,159,80, -158,38,38,250,80,158,41,39,249,22,27,11,80,158,43,38,22,129,4,195,249, -247,22,182,5,197,248,22,52,248,22,159,12,197,87,94,28,28,248,22,155,12, -196,10,248,22,150,4,196,12,28,197,250,22,164,8,11,6,15,15,98,97,100, -32,109,111,100,117,108,101,32,112,97,116,104,200,250,22,165,8,2,20,6,19, +247,192,20,14,159,80,158,38,43,249,22,63,247,22,145,11,196,20,14,159,80, +158,38,38,250,80,158,41,39,249,22,27,11,80,158,43,38,22,130,4,195,249, +247,22,183,5,197,248,22,52,248,22,161,12,197,87,94,28,28,248,22,157,12, +196,10,248,22,151,4,196,12,28,197,250,22,165,8,11,6,15,15,98,97,100, +32,109,111,100,117,108,101,32,112,97,116,104,200,250,22,166,8,2,20,6,19, 19,109,111,100,117,108,101,45,112,97,116,104,32,111,114,32,112,97,116,104,198, -28,28,248,22,61,196,249,22,135,8,248,22,64,198,2,4,11,248,22,146,4, -248,22,88,197,28,28,248,22,61,196,249,22,135,8,248,22,64,198,66,112,108, +28,28,248,22,61,196,249,22,136,8,248,22,64,198,2,4,11,248,22,147,4, +248,22,88,197,28,28,248,22,61,196,249,22,136,8,248,22,64,198,66,112,108, 97,110,101,116,11,87,94,28,207,12,20,14,159,80,158,36,38,250,80,158,39, -39,249,22,27,11,80,158,41,38,22,143,11,196,90,161,35,34,10,249,22,130, +39,249,22,27,11,80,158,41,38,22,145,11,196,90,161,35,34,10,249,22,131, 4,21,94,2,21,6,18,18,112,108,97,110,101,116,47,114,101,115,111,108,118, 101,114,46,115,115,1,27,112,108,97,110,101,116,45,109,111,100,117,108,101,45, 110,97,109,101,45,114,101,115,111,108,118,101,114,12,251,211,199,200,201,202,27, 89,162,34,35,44,79,115,104,111,119,45,99,111,108,108,101,99,116,105,111,110, 45,101,114,114,223,6,33,44,27,28,248,22,51,198,27,250,22,126,80,158,42, -42,249,22,63,203,247,22,132,13,11,28,192,192,91,159,36,11,90,161,36,34, +42,249,22,63,203,247,22,134,13,11,28,192,192,91,159,36,11,90,161,36,34, 11,249,80,159,43,47,35,248,22,54,203,11,27,251,80,158,46,49,2,20,201, 28,248,22,71,198,198,248,22,64,198,28,248,22,71,198,9,248,22,65,198,249, -22,173,12,194,28,248,22,71,196,6,7,7,109,97,105,110,46,115,115,249,22, -154,6,198,6,3,3,46,115,115,28,248,22,131,6,198,27,248,80,159,40,54, +22,175,12,194,28,248,22,71,196,6,7,7,109,97,105,110,46,115,115,249,22, +155,6,198,6,3,3,46,115,115,28,248,22,132,6,198,27,248,80,159,40,54, 35,200,27,250,22,126,80,158,43,42,249,22,63,204,198,11,28,192,192,91,159, -36,11,90,161,36,34,11,249,80,159,44,47,35,203,11,250,22,1,22,173,12, +36,11,90,161,36,34,11,249,80,159,44,47,35,203,11,250,22,1,22,175,12, 198,249,22,77,249,22,2,32,0,89,162,8,36,35,42,9,222,33,45,199,248, -22,73,199,28,248,22,155,12,198,28,248,22,178,12,198,197,248,22,73,6,26, +22,73,199,28,248,22,157,12,198,28,248,22,180,12,198,197,248,22,73,6,26, 26,32,40,97,32,112,97,116,104,32,109,117,115,116,32,98,101,32,97,98,115, -111,108,117,116,101,41,28,249,22,135,8,248,22,64,200,2,21,27,250,22,126, -80,158,42,42,249,22,63,203,247,22,132,13,11,28,192,192,91,159,37,11,90, +111,108,117,116,101,41,28,249,22,136,8,248,22,64,200,2,21,27,250,22,126, +80,158,42,42,249,22,63,203,247,22,134,13,11,28,192,192,91,159,37,11,90, 161,36,34,11,249,80,159,44,47,35,248,22,88,204,11,90,161,35,36,11,28, -248,22,71,248,22,90,203,28,248,22,71,193,249,22,143,13,0,8,35,114,120, +248,22,71,248,22,90,203,28,248,22,71,193,249,22,145,13,0,8,35,114,120, 34,91,46,93,34,195,11,10,27,27,28,196,249,22,77,28,248,22,71,248,22, 90,23,15,21,93,6,5,5,109,122,108,105,98,249,22,1,22,77,249,22,2, 80,159,50,55,35,248,22,90,23,18,196,28,248,22,71,195,248,22,73,196,194, -251,80,158,48,49,2,20,203,248,22,64,197,248,22,65,197,249,22,173,12,194, +251,80,158,48,49,2,20,203,248,22,64,197,248,22,65,197,249,22,175,12,194, 28,197,196,28,248,22,71,196,6,7,7,109,97,105,110,46,115,115,28,249,22, -143,13,0,8,35,114,120,34,91,46,93,34,198,196,249,22,154,6,198,6,3, -3,46,115,115,28,249,22,135,8,248,22,64,200,64,102,105,108,101,249,22,180, -12,248,22,88,200,248,80,159,41,54,35,201,12,87,94,28,28,248,22,155,12, -193,10,248,22,153,7,193,12,28,199,250,22,164,8,67,114,101,113,117,105,114, -101,249,22,179,6,6,17,17,98,97,100,32,109,111,100,117,108,101,32,112,97, -116,104,126,97,28,197,248,22,64,198,6,0,0,202,250,22,165,8,2,20,249, -22,179,6,6,13,13,109,111,100,117,108,101,32,112,97,116,104,126,97,28,197, -248,22,64,198,6,0,0,200,27,28,248,22,153,7,194,249,22,158,7,195,34, -249,22,182,12,248,22,183,12,196,11,27,28,248,22,153,7,195,249,22,158,7, -196,35,248,80,158,41,50,194,91,159,37,11,90,161,37,34,11,28,248,22,153, -7,198,250,22,7,2,22,249,22,158,7,202,36,2,22,248,22,176,12,197,27, -28,248,22,153,7,199,249,22,158,7,200,37,249,80,158,46,51,196,5,0,27, -28,248,22,153,7,200,249,22,158,7,201,38,248,22,146,4,199,27,27,250,22, -126,80,158,50,41,248,22,159,13,247,22,143,11,11,28,192,192,27,247,22,120, -87,94,250,22,125,80,158,51,41,248,22,159,13,247,22,143,11,195,192,87,95, +145,13,0,8,35,114,120,34,91,46,93,34,198,196,249,22,155,6,198,6,3, +3,46,115,115,28,249,22,136,8,248,22,64,200,64,102,105,108,101,249,22,182, +12,248,22,88,200,248,80,159,41,54,35,201,12,87,94,28,28,248,22,157,12, +193,10,248,22,154,7,193,12,28,199,250,22,165,8,67,114,101,113,117,105,114, +101,249,22,180,6,6,17,17,98,97,100,32,109,111,100,117,108,101,32,112,97, +116,104,126,97,28,197,248,22,64,198,6,0,0,202,250,22,166,8,2,20,249, +22,180,6,6,13,13,109,111,100,117,108,101,32,112,97,116,104,126,97,28,197, +248,22,64,198,6,0,0,200,27,28,248,22,154,7,194,249,22,159,7,195,34, +249,22,184,12,248,22,185,12,196,11,27,28,248,22,154,7,195,249,22,159,7, +196,35,248,80,158,41,50,194,91,159,37,11,90,161,37,34,11,28,248,22,154, +7,198,250,22,7,2,22,249,22,159,7,202,36,2,22,248,22,178,12,197,27, +28,248,22,154,7,199,249,22,159,7,200,37,249,80,158,46,51,196,5,0,27, +28,248,22,154,7,200,249,22,159,7,201,38,248,22,147,4,199,27,27,250,22, +126,80,158,50,41,248,22,161,13,247,22,145,11,11,28,192,192,27,247,22,120, +87,94,250,22,125,80,158,51,41,248,22,161,13,247,22,145,11,195,192,87,95, 28,23,16,27,250,22,126,196,197,11,28,192,12,87,95,27,27,28,248,22,17, 80,158,50,44,80,158,49,44,247,22,19,250,22,25,248,22,23,196,80,158,52, -43,195,27,247,22,143,11,249,22,3,89,162,34,35,53,9,226,12,11,2,3, +43,195,27,247,22,145,11,249,22,3,89,162,34,35,53,9,226,12,11,2,3, 33,46,195,248,28,248,22,17,80,158,49,44,32,0,89,162,34,35,40,9,222, 33,47,80,159,48,56,35,89,162,34,34,49,9,227,14,9,8,4,3,33,48, -250,22,125,196,197,10,12,28,28,248,22,153,7,201,11,27,248,22,131,6,23, -15,28,192,192,28,248,22,61,23,15,249,22,135,8,248,22,64,23,17,2,21, -11,250,22,125,80,158,49,42,28,248,22,131,6,23,17,249,22,63,23,18,248, -80,159,52,54,35,23,20,249,22,63,23,18,247,22,132,13,252,22,155,7,23, +250,22,125,196,197,10,12,28,28,248,22,154,7,201,11,27,248,22,132,6,23, +15,28,192,192,28,248,22,61,23,15,249,22,136,8,248,22,64,23,17,2,21, +11,250,22,125,80,158,49,42,28,248,22,132,6,23,17,249,22,63,23,18,248, +80,159,52,54,35,23,20,249,22,63,23,18,247,22,134,13,252,22,156,7,23, 15,206,204,202,201,12,193,91,159,36,10,90,161,35,34,10,11,90,161,35,35, 10,83,158,37,20,96,96,2,20,89,162,8,36,35,49,9,224,2,0,33,42, 89,162,34,37,47,9,223,1,33,43,89,162,34,38,8,30,9,225,2,3,0, -33,49,208,87,95,248,22,128,4,248,80,158,36,48,247,22,143,11,248,22,182, -5,80,158,35,35,248,22,129,12,80,159,35,40,35,159,34,20,102,159,34,16, +33,49,208,87,95,248,22,129,4,248,80,158,36,48,247,22,145,11,248,22,183, +5,80,158,35,35,248,22,131,12,80,159,35,40,35,159,34,20,102,159,34,16, 1,20,24,65,98,101,103,105,110,16,0,83,158,40,20,99,131,66,35,37,98, 111,111,116,2,1,11,10,10,10,10,10,36,80,158,34,34,20,102,159,38,16, 19,30,2,1,2,2,193,30,2,1,2,3,193,30,2,5,72,112,97,116,104, @@ -472,7 +472,7 @@ 89,162,8,36,35,43,9,223,0,33,24,80,159,34,55,35,83,158,34,16,2, 89,162,34,35,47,67,103,101,116,45,100,105,114,223,0,33,25,80,159,34,54, 35,83,158,34,16,2,89,162,34,36,47,68,119,105,116,104,45,100,105,114,223, -0,33,26,80,159,34,53,35,83,158,34,16,2,248,22,150,7,69,115,111,45, +0,33,26,80,159,34,53,35,83,158,34,16,2,248,22,151,7,69,115,111,45, 115,117,102,102,105,120,80,159,34,34,35,83,158,34,16,2,89,162,34,36,58, 2,3,223,0,33,35,80,159,34,35,35,83,158,34,16,2,32,0,89,162,8, 36,35,40,2,7,222,192,80,159,34,40,35,83,158,34,16,2,248,22,120,2, diff --git a/src/mzscheme/src/hash.c b/src/mzscheme/src/hash.c index 1230449efd..53ece3621f 100644 --- a/src/mzscheme/src/hash.c +++ b/src/mzscheme/src/hash.c @@ -84,8 +84,10 @@ static void string_hash_indices(void *_key, long *_h, long *_h2) h2 += c; } - *_h = h; - *_h2 = h2; + if (_h) + *_h = h; + if (_h2) + *_h2 = h2; } #ifdef PALMOS_STUFF @@ -104,8 +106,10 @@ static void id_hash_indices(void *_key, long *_h, long *_h2) key = SCHEME_STX_VAL(key); lkey = PTR_TO_LONG((Scheme_Object *)key); - *_h = (lkey >> 2); - *_h2 = (lkey >> 3); + if (_h) + *_h = (lkey >> 2); + if (_h2) + *_h2 = (lkey >> 3); } static int not_stx_bound_eq(char *a, char *b) @@ -156,18 +160,16 @@ static Scheme_Object *do_hash(Scheme_Hash_Table *table, Scheme_Object *key, int mask = table->size - 1; if (table->make_hash_indices) { - table->make_hash_indices((void *)key, (long *)&h, (long *)&h2); + table->make_hash_indices((void *)key, (long *)&h, NULL); h = h & mask; - h2 = h2 & mask; + h2 = 0; } else { unsigned long lkey; lkey = (unsigned long)PTR_TO_LONG((Scheme_Object *)key); h = (lkey >> 2) & mask; - h2 = (lkey >> 3) & mask; + h2 = ((lkey >> 3) & mask) | 1; } - h2 |= 1; - keys = table->keys; if (table->compare) { @@ -190,6 +192,10 @@ static Scheme_Object *do_hash(Scheme_Hash_Table *table, Scheme_Object *key, int return table->vals[h]; } scheme_hash_iteration_count++; + if (!h2) { + table->make_hash_indices((void *)key, NULL, (long *)&h2); + h2 = (h2 & (table->size - 1)) | 1; + } h = (h + h2) & mask; } } else { @@ -846,18 +852,38 @@ END_XFORM_SKIP; /* equal? hashing */ /*========================================================================*/ -static long equal_hash_key(Scheme_Object *o, long k, long depth); -static long equal_hash_key2(Scheme_Object *o, long depth); +typedef struct Hash_Info { + long depth; /* always odd */ + Scheme_Object *recur; +} Hash_Info; + +static long equal_hash_key(Scheme_Object *o, long k, Hash_Info *hi); +static long equal_hash_key2(Scheme_Object *o, Hash_Info *hi); + +static Scheme_Object *hash_recur(int argc, Scheme_Object **argv, Scheme_Object *prim) +{ + long v; + Hash_Info *hi; + + hi = (Hash_Info *)SCHEME_PRIM_CLOSURE_ELS(prim)[0]; + hi->depth += 2; + + v = equal_hash_key(argv[0], 0, hi); + + return scheme_make_integer(v); +} static Scheme_Object *hash_k(void) { Scheme_Thread *p = scheme_current_thread; Scheme_Object *v = (Scheme_Object *)p->ku.k.p1; + Hash_Info *hi = (Hash_Info *)p->ku.k.p2; long nv; p->ku.k.p1 = NULL; + p->ku.k.p2 = NULL; - nv = equal_hash_key(v, p->ku.k.i1, p->ku.k.i2); + nv = equal_hash_key(v, p->ku.k.i1, hi); return scheme_make_integer_value(nv); } @@ -866,15 +892,35 @@ static Scheme_Object *hash_k(void) paying for a stack check. */ #define HASH_COUNT_START 20 -#define MZ_HASH_K hash_k -#define MZ_HASH_I1 (k - t) -#define MZ_HASH_I2 depth +static long overflow_equal_hash_key(Scheme_Object *o, long k, Hash_Info *hi) +{ + Scheme_Object *nv; + long val; + Hash_Info *hi2; + Scheme_Thread *p = scheme_current_thread; + + hi2 = (Hash_Info *)scheme_malloc(sizeof(Hash_Info)); + memcpy(hi2, hi, sizeof(Hash_Info)); + + p->ku.k.p1 = (void *)o; + p->ku.k.p2 = (void *)hi2; + p->ku.k.i1 = k; + + nv = scheme_handle_stack_overflow(hash_k); + scheme_get_int_val(nv, &val); + + memcpy(hi, hi2, sizeof(Hash_Info)); + + return val; +} + +#define OVERFLOW_HASH() overflow_equal_hash_key(o, k - t, hi) /* Based on Bob Jenkins's one-at-a-time hash function at http://www.burtleburtle.net/bob/hash/doobs.html: */ #define MZ_MIX(k) (k += (k << 10), k ^= (k >> 6)) -static long equal_hash_key(Scheme_Object *o, long k, long depth) +static long equal_hash_key(Scheme_Object *o, long k, Hash_Info *hi) { Scheme_Type t; static int hash_counter = HASH_COUNT_START; @@ -883,7 +929,7 @@ static long equal_hash_key(Scheme_Object *o, long k, long depth) t = SCHEME_TYPE(o); k += t; - if (depth > MAX_HASH_DEPTH) + if (hi->depth > (MAX_HASH_DEPTH << 1)) return k; switch(t) { @@ -930,7 +976,7 @@ static long equal_hash_key(Scheme_Object *o, long k, long depth) break; case scheme_rational_type: { - k += equal_hash_key(scheme_rational_numerator(o), 0, depth); + k += equal_hash_key(scheme_rational_numerator(o), 0, hi); o = scheme_rational_denominator(o); break; } @@ -938,23 +984,23 @@ static long equal_hash_key(Scheme_Object *o, long k, long depth) case scheme_complex_izi_type: { Scheme_Complex *c = (Scheme_Complex *)o; - k += equal_hash_key(c->r, 0, depth); + k += equal_hash_key(c->r, 0, hi); o = c->i; break; } case scheme_pair_type: { # include "mzhashchk.inc" - depth++; - k += equal_hash_key(SCHEME_CAR(o), 0, depth); + hi->depth += 2; + k += equal_hash_key(SCHEME_CAR(o), 0, hi); o = SCHEME_CDR(o); break; } case scheme_mutable_pair_type: { # include "mzhashchk.inc" - depth++; - k += equal_hash_key(SCHEME_CAR(o), 0, depth); + hi->depth += 2; + k += equal_hash_key(SCHEME_CAR(o), 0, hi); o = SCHEME_CDR(o); break; } @@ -967,11 +1013,11 @@ static long equal_hash_key(Scheme_Object *o, long k, long depth) if (!len) return k + 1; - depth++; + hi->depth += 2; --len; for (i = 0; i < len; i++) { SCHEME_USE_FUEL(1); - val = equal_hash_key(SCHEME_VEC_ELS(o)[i], 0, depth); + val = equal_hash_key(SCHEME_VEC_ELS(o)[i], 0, hi); k = (k << 5) + k + val; } @@ -1009,32 +1055,74 @@ static long equal_hash_key(Scheme_Object *o, long k, long depth) case scheme_structure_type: case scheme_proc_struct_type: { - Scheme_Object *insp; - insp = scheme_get_param(scheme_current_config(), MZCONFIG_INSPECTOR); - if (scheme_inspector_sees_part(o, insp, -2)) { - int i; - Scheme_Structure *s1 = (Scheme_Structure *)o; - -# include "mzhashchk.inc" - - depth++; + Scheme_Object *procs; - for (i = SCHEME_STRUCT_NUM_SLOTS(s1); i--; ) { - k += equal_hash_key(s1->slots[i], 0, depth); - MZ_MIX(k); - } + procs = scheme_struct_type_property_ref(scheme_equal_property, o); + if (procs) { + Scheme_Object *a[2], *recur, *v; + Hash_Info *hi2; + +# include "mzhashchk.inc" + + /* Create/cache closure to use for recursive hashing: */ + if (hi->recur) { + recur = hi->recur; + hi2 = (Hash_Info *)SCHEME_PRIM_CLOSURE_ELS(recur)[0]; + } else { + hi2 = (Hash_Info *)scheme_malloc(sizeof(Hash_Info)); + a[0] = (Scheme_Object *)hi2; + recur = scheme_make_prim_closure_w_arity(hash_recur, + 1, a, + "equal-hash-code/recur", + 1, 1); + hi->recur = recur; + } + memcpy(hi2, hi, sizeof(Hash_Info)); + + a[0] = o; + a[1] = recur; + + procs = SCHEME_VEC_ELS(procs)[2]; + + v = _scheme_apply(procs, 2, a); + + if (SCHEME_INTP(v)) + return k + SCHEME_INT_VAL(v); + else if (SCHEME_BIGNUMP(v)) { + return k + (long)((Scheme_Bignum *)v)->digits[0]; + } else { + scheme_arg_mismatch("equal-hash-code", + "hash procedure returned a value other than an exact integer: ", + v); + return 0; + } + } else { + Scheme_Object *insp; + insp = scheme_get_param(scheme_current_config(), MZCONFIG_INSPECTOR); + if (scheme_inspector_sees_part(o, insp, -2)) { + int i; + Scheme_Structure *s1 = (Scheme_Structure *)o; - return k; - } else - return k + (PTR_TO_LONG(o) >> 4); - break; +# include "mzhashchk.inc" + + hi->depth += 2; + + for (i = SCHEME_STRUCT_NUM_SLOTS(s1); i--; ) { + k += equal_hash_key(s1->slots[i], 0, hi); + MZ_MIX(k); + } + + return k; + } else + return k + (PTR_TO_LONG(o) >> 4); + } } case scheme_box_type: { SCHEME_USE_FUEL(1); k += 1; o = SCHEME_BOX_VAL(o); - depth++; + hi->depth += 2; break; } case scheme_hash_table_type: @@ -1047,15 +1135,15 @@ static long equal_hash_key(Scheme_Object *o, long k, long depth) # include "mzhashchk.inc" k = (k << 1) + 3; - depth++; + hi->depth += 2; keys = ht->keys; vals = ht->vals; for (i = ht->size; i--; ) { if (vals[i]) { - vk = equal_hash_key(keys[i], 0, depth); + vk = equal_hash_key(keys[i], 0, hi); MZ_MIX(vk); - vk += equal_hash_key(vals[i], 0, depth); + vk += equal_hash_key(vals[i], 0, hi); MZ_MIX(vk); k += vk; /* can't mix k, because the key order shouldn't matter */ } @@ -1075,7 +1163,7 @@ static long equal_hash_key(Scheme_Object *o, long k, long depth) buckets = ht->buckets; weak = ht->weak; - depth++; + hi->depth += 2; k = (k << 1) + 7; @@ -1088,9 +1176,9 @@ static long equal_hash_key(Scheme_Object *o, long k, long depth) key = bucket->key; } if (key) { - vk = equal_hash_key((Scheme_Object *)bucket->val, 0, depth); + vk = equal_hash_key((Scheme_Object *)bucket->val, 0, hi); MZ_MIX(vk); - vk += equal_hash_key((Scheme_Object *)key, 0, depth); + vk += equal_hash_key((Scheme_Object *)key, 0, hi); MZ_MIX(vk); k += vk; /* can't mix k, because the key order shouldn't matter */ } @@ -1133,7 +1221,7 @@ static long equal_hash_key(Scheme_Object *o, long k, long depth) { Scheme_Primary_Hash_Proc h1 = scheme_type_hash1s[t]; if (h1) - return h1(o, k, scheme_make_integer(depth)); + return h1(o, k, hi); else return k + (PTR_TO_LONG(o) >> 4); } @@ -1145,34 +1233,77 @@ static long equal_hash_key(Scheme_Object *o, long k, long depth) long scheme_equal_hash_key(Scheme_Object *o) { - return equal_hash_key(o, 0, 0); + Hash_Info hi; + + hi.depth = 1; + hi.recur = NULL; + + return equal_hash_key(o, 0, &hi); } long scheme_equal_hash_key2(Scheme_Object *o) { - return equal_hash_key2(o, 0); + Hash_Info hi; + + hi.depth = 1; + hi.recur = NULL; + + return equal_hash_key2(o, &hi); +} + +static Scheme_Object *hash2_recur(int argc, Scheme_Object **argv, Scheme_Object *prim) +{ + long v; + Hash_Info *hi; + + hi = (Hash_Info *)SCHEME_PRIM_CLOSURE_ELS(prim)[0]; + hi->depth += 2; + + v = equal_hash_key2(argv[0], hi); + + return scheme_make_integer(v); } static Scheme_Object *hash2_k(void) { Scheme_Thread *p = scheme_current_thread; Scheme_Object *v = (Scheme_Object *)p->ku.k.p1; + Hash_Info *hi = (Hash_Info *)p->ku.k.p2; long nv; p->ku.k.p1 = NULL; + p->ku.k.p2 = NULL; - nv = equal_hash_key2(v, p->ku.k.i2); + nv = equal_hash_key2(v, hi); return scheme_make_integer(nv); } -#undef MZ_HASH_K -#undef MZ_HASH_I1 -#define MZ_HASH_K hash2_k -#define MZ_HASH_I1 0 -#define MZ_HASH_I2 depth +static long overflow_equal_hash_key2(Scheme_Object *o, Hash_Info *hi) +{ + Scheme_Object *nv; + long val; + Hash_Info *hi2; + Scheme_Thread *p = scheme_current_thread; -static long equal_hash_key2(Scheme_Object *o, long depth) + hi2 = (Hash_Info *)scheme_malloc(sizeof(Hash_Info)); + memcpy(hi2, hi, sizeof(Hash_Info)); + + p->ku.k.p1 = (void *)o; + p->ku.k.p2 = (void *)hi2; + + nv = scheme_handle_stack_overflow(hash2_k); + scheme_get_int_val(nv, &val); + + memcpy(hi, hi2, sizeof(Hash_Info)); + + return val; +} + +#undef OVERFLOW_HASH +#define OVERFLOW_HASH() overflow_equal_hash_key2(o, hi) + +static long equal_hash_key2(Scheme_Object *o, Hash_Info *hi) { Scheme_Type t; static int hash_counter = HASH_COUNT_START; @@ -1180,7 +1311,7 @@ static long equal_hash_key2(Scheme_Object *o, long depth) top: t = SCHEME_TYPE(o); - if (depth > MAX_HASH_DEPTH) + if (hi->depth > (MAX_HASH_DEPTH << 1)) return t; switch(t) { @@ -1208,30 +1339,32 @@ static long equal_hash_key2(Scheme_Object *o, long depth) case scheme_bignum_type: return SCHEME_BIGDIG(o)[0]; case scheme_rational_type: - return equal_hash_key2(scheme_rational_numerator(o), depth); + return equal_hash_key2(scheme_rational_numerator(o), hi); case scheme_complex_type: case scheme_complex_izi_type: { long v1, v2; Scheme_Complex *c = (Scheme_Complex *)o; - v1 = equal_hash_key2(c->r, depth); - v2 = equal_hash_key2(c->i, depth); + v1 = equal_hash_key2(c->r, hi); + v2 = equal_hash_key2(c->i, hi); return v1 + v2; } case scheme_pair_type: { long v1, v2; # include "mzhashchk.inc" - v1 = equal_hash_key2(SCHEME_CAR(o), depth + 1); - v2 = equal_hash_key2(SCHEME_CDR(o), depth + 1); + hi->depth += 2; + v1 = equal_hash_key2(SCHEME_CAR(o), hi); + v2 = equal_hash_key2(SCHEME_CDR(o), hi); return v1 + v2; } case scheme_mutable_pair_type: { long v1, v2; # include "mzhashchk.inc" - v1 = equal_hash_key2(SCHEME_CAR(o), depth + 1); - v2 = equal_hash_key2(SCHEME_CDR(o), depth + 1); + hi->depth += 2; + v1 = equal_hash_key2(SCHEME_CAR(o), hi); + v2 = equal_hash_key2(SCHEME_CDR(o), hi); return v1 + v2; } case scheme_vector_type: @@ -1242,11 +1375,11 @@ static long equal_hash_key2(Scheme_Object *o, long depth) # include "mzhashchk.inc" - depth++; + hi->depth += 2; for (i = 0; i < len; i++) { SCHEME_USE_FUEL(1); - k += equal_hash_key2(SCHEME_VEC_ELS(o)[i], depth); + k += equal_hash_key2(SCHEME_VEC_ELS(o)[i], hi); } return k; @@ -1280,28 +1413,71 @@ static long equal_hash_key2(Scheme_Object *o, long depth) case scheme_structure_type: case scheme_proc_struct_type: { - Scheme_Object *insp; - insp = scheme_get_param(scheme_current_config(), MZCONFIG_INSPECTOR); - if (scheme_inspector_sees_part(o, insp, -2)) { - int i; - long k = 0; - Scheme_Structure *s1 = (Scheme_Structure *)o; - -# include "mzhashchk.inc" - - depth++; + Scheme_Object *procs; - for (i = SCHEME_STRUCT_NUM_SLOTS(s1); i--; ) { - k += equal_hash_key2(s1->slots[i], depth); - } + procs = scheme_struct_type_property_ref(scheme_equal_property, o); + if (procs) { + Scheme_Object *a[2], *v, *recur; + Hash_Info *hi2; + +# include "mzhashchk.inc" + + /* Create/cache closure to use for recursive hashing: */ + if (hi->recur) { + recur = hi->recur; + hi2 = (Hash_Info *)SCHEME_PRIM_CLOSURE_ELS(recur)[0]; + } else { + hi2 = (Hash_Info *)scheme_malloc(sizeof(Hash_Info)); + a[0] = (Scheme_Object *)hi2; + recur = scheme_make_prim_closure_w_arity(hash2_recur, + 1, a, + "equal-secondary-hash-code/recur", + 1, 1); + hi->recur = recur; + } + memcpy(hi2, hi, sizeof(Hash_Info)); + + a[0] = o; + a[1] = recur; + + procs = SCHEME_VEC_ELS(procs)[3]; + + v = _scheme_apply(procs, 2, a); + + if (SCHEME_INTP(v)) + return SCHEME_INT_VAL(v); + else if (SCHEME_BIGNUMP(v)) { + return (long)((Scheme_Bignum *)v)->digits[0]; + } else { + scheme_arg_mismatch("equal-secondary-hash-code", + "hash procedure returned a value other than an exact integer: ", + v); + return 0; + } + } else { + Scheme_Object *insp; + insp = scheme_get_param(scheme_current_config(), MZCONFIG_INSPECTOR); + if (scheme_inspector_sees_part(o, insp, -2)) { + int i; + long k = 0; + Scheme_Structure *s1 = (Scheme_Structure *)o; + +# include "mzhashchk.inc" - return k; - } else - return t; + hi->depth += 2; + + for (i = SCHEME_STRUCT_NUM_SLOTS(s1); i--; ) { + k += equal_hash_key2(s1->slots[i], hi); + } + + return k; + } else + return t; + } } case scheme_box_type: o = SCHEME_BOX_VAL(o); - depth++; + hi->depth += 2; goto top; case scheme_hash_table_type: { @@ -1312,14 +1488,14 @@ static long equal_hash_key2(Scheme_Object *o, long depth) # include "mzhashchk.inc" - depth++; + hi->depth += 2; keys = ht->keys; vals = ht->vals; for (i = ht->size; i--; ) { if (vals[i]) { - k += equal_hash_key2(keys[i], depth); - k += equal_hash_key2(vals[i], depth); + k += equal_hash_key2(keys[i], hi); + k += equal_hash_key2(vals[i], hi); } } @@ -1338,7 +1514,7 @@ static long equal_hash_key2(Scheme_Object *o, long depth) buckets = ht->buckets; weak = ht->weak; - depth++; + hi->depth += 2; for (i = ht->size; i--; ) { bucket = buckets[i]; @@ -1349,8 +1525,8 @@ static long equal_hash_key2(Scheme_Object *o, long depth) key = bucket->key; } if (key) { - k += equal_hash_key2((Scheme_Object *)bucket->val, depth); - k += equal_hash_key2((Scheme_Object *)key, depth); + k += equal_hash_key2((Scheme_Object *)bucket->val, hi); + k += equal_hash_key2((Scheme_Object *)key, hi); } } } @@ -1365,7 +1541,7 @@ static long equal_hash_key2(Scheme_Object *o, long depth) { Scheme_Secondary_Hash_Proc h2 = scheme_type_hash2s[t]; if (h2) - return h2(o, scheme_make_integer(depth)); + return h2(o, hi); else return t; } @@ -1374,10 +1550,10 @@ static long equal_hash_key2(Scheme_Object *o, long depth) long scheme_recur_equal_hash_key(Scheme_Object *o, void *cycle_data) { - return equal_hash_key(o, 0, SCHEME_INT_VAL(cycle_data)); + return equal_hash_key(o, 0, (Hash_Info *)cycle_data); } long scheme_recur_equal_hash_key2(Scheme_Object *o, void *cycle_data) { - return equal_hash_key2(o, SCHEME_INT_VAL(cycle_data)); + return equal_hash_key2(o, (Hash_Info *)cycle_data); } diff --git a/src/mzscheme/src/list.c b/src/mzscheme/src/list.c index 52b9079128..048cf2881b 100644 --- a/src/mzscheme/src/list.c +++ b/src/mzscheme/src/list.c @@ -97,6 +97,7 @@ static Scheme_Object *hash_table_iterate_value(int argc, Scheme_Object *argv[]); static Scheme_Object *hash_table_iterate_key(int argc, Scheme_Object *argv[]); static Scheme_Object *eq_hash_code(int argc, Scheme_Object *argv[]); static Scheme_Object *equal_hash_code(int argc, Scheme_Object *argv[]); +static Scheme_Object *equal_hash2_code(int argc, Scheme_Object *argv[]); static Scheme_Object *make_weak_box(int argc, Scheme_Object *argv[]); static Scheme_Object *weak_box_value(int argc, Scheme_Object *argv[]); @@ -495,6 +496,11 @@ scheme_init_list (Scheme_Env *env) "equal-hash-code", 1, 1), env); + scheme_add_global_constant("equal-secondary-hash-code", + scheme_make_noncm_prim(equal_hash2_code, + "equal-secondary-hash-code", + 1, 1), + env); scheme_add_global_constant("make-weak-box", scheme_make_noncm_prim(make_weak_box, @@ -1359,8 +1365,10 @@ static int compare_equal(void *v1, void *v2) static void make_hash_indices_for_equal(void *v, long *_stk_h1, long *_stk_h2) { - *_stk_h1 = scheme_equal_hash_key((Scheme_Object *)v); - *_stk_h2 = scheme_equal_hash_key2((Scheme_Object *)v); + if (_stk_h1) + *_stk_h1 = scheme_equal_hash_key((Scheme_Object *)v); + if (_stk_h2) + *_stk_h2 = scheme_equal_hash_key2((Scheme_Object *)v); } static void check_hash_table_flags(const char *name, int i, int argc, Scheme_Object **argv, int *flags) @@ -1908,6 +1916,15 @@ static Scheme_Object *equal_hash_code(int argc, Scheme_Object *argv[]) return scheme_make_integer(v); } +static Scheme_Object *equal_hash2_code(int argc, Scheme_Object *argv[]) +{ + long v; + + v = scheme_equal_hash_key2(argv[0]); + + return scheme_make_integer(v); +} + Scheme_Object *scheme_make_weak_box(Scheme_Object *v) { #ifdef MZ_PRECISE_GC diff --git a/src/mzscheme/src/mzhashchk.inc b/src/mzscheme/src/mzhashchk.inc index 2c6e8fb97b..5298027645 100644 --- a/src/mzscheme/src/mzhashchk.inc +++ b/src/mzscheme/src/mzhashchk.inc @@ -6,19 +6,7 @@ #ifdef DO_STACK_CHECK { #include "mzstkchk.h" - { - Scheme_Object *nv; - long val; -#ifndef ERROR_ON_OVERFLOW - Scheme_Thread *p = scheme_current_thread; - p->ku.k.p1 = (void *)o; - p->ku.k.i1 = MZ_HASH_I1; - p->ku.k.i2 = MZ_HASH_I2; -#endif - nv = scheme_handle_stack_overflow(MZ_HASH_K); - scheme_get_int_val(nv, &val); - return val; - } + return OVERFLOW_HASH(); } #endif } diff --git a/src/mzscheme/src/schminc.h b/src/mzscheme/src/schminc.h index 4dad94d7e1..024de1626c 100644 --- a/src/mzscheme/src/schminc.h +++ b/src/mzscheme/src/schminc.h @@ -13,7 +13,7 @@ #define USE_COMPILED_STARTUP 1 -#define EXPECTED_PRIM_COUNT 889 +#define EXPECTED_PRIM_COUNT 891 #ifdef MZSCHEME_SOMETHING_OMITTED # undef USE_COMPILED_STARTUP diff --git a/src/mzscheme/src/schpriv.h b/src/mzscheme/src/schpriv.h index 4add2dacb0..2727c5ad75 100644 --- a/src/mzscheme/src/schpriv.h +++ b/src/mzscheme/src/schpriv.h @@ -289,6 +289,8 @@ extern Scheme_Object *scheme_system_idle_channel; extern Scheme_Object *scheme_input_port_property, *scheme_output_port_property; +extern Scheme_Object *scheme_equal_property; + /*========================================================================*/ /* thread state and maintenance */ /*========================================================================*/ diff --git a/src/mzscheme/src/schvers.h b/src/mzscheme/src/schvers.h index 309f4bf96f..6ecc41db39 100644 --- a/src/mzscheme/src/schvers.h +++ b/src/mzscheme/src/schvers.h @@ -10,12 +10,12 @@ The string and the separate X/Y/Z/W numbers must be updated consistently. */ -#define MZSCHEME_VERSION "3.99.0.6" +#define MZSCHEME_VERSION "3.99.0.7" #define MZSCHEME_VERSION_X 3 #define MZSCHEME_VERSION_Y 99 #define MZSCHEME_VERSION_Z 0 -#define MZSCHEME_VERSION_W 6 +#define MZSCHEME_VERSION_W 7 #define MZSCHEME_VERSION_MAJOR ((MZSCHEME_VERSION_X * 100) + MZSCHEME_VERSION_Y) #define MZSCHEME_VERSION_MINOR ((MZSCHEME_VERSION_Z * 1000) + MZSCHEME_VERSION_W) diff --git a/src/mzscheme/src/struct.c b/src/mzscheme/src/struct.c index cdef4e449d..59b4cd594a 100644 --- a/src/mzscheme/src/struct.c +++ b/src/mzscheme/src/struct.c @@ -28,6 +28,7 @@ Scheme_Object *scheme_arity_at_least, *scheme_date; Scheme_Object *scheme_make_arity_at_least; Scheme_Object *scheme_source_property; Scheme_Object *scheme_input_port_property, *scheme_output_port_property; +Scheme_Object *scheme_equal_property; Scheme_Object *scheme_make_struct_type_proc; Scheme_Object *scheme_current_inspector_proc; @@ -64,6 +65,7 @@ static Scheme_Object *current_code_inspector(int argc, Scheme_Object *argv[]); static Scheme_Object *make_struct_type_property(int argc, Scheme_Object *argv[]); static Scheme_Object *struct_type_property_p(int argc, Scheme_Object *argv[]); static Scheme_Object *check_evt_property_value_ok(int argc, Scheme_Object *argv[]); +static Scheme_Object *check_equal_property_value_ok(int argc, Scheme_Object *argv[]); static Scheme_Object *check_write_property_value_ok(int argc, Scheme_Object *argv[]); static Scheme_Object *check_input_port_property_value_ok(int argc, Scheme_Object *argv[]); static Scheme_Object *check_output_port_property_value_ok(int argc, Scheme_Object *argv[]); @@ -282,6 +284,17 @@ scheme_init_struct (Scheme_Env *env) scheme_add_global_constant("prop:procedure", proc_property, env); } + { + Scheme_Object *guard; + guard = scheme_make_prim_w_arity(check_equal_property_value_ok, + "guard-for-prop:equal+hash", + 2, 2); + REGISTER_SO(scheme_equal_property); + scheme_equal_property = scheme_make_struct_type_property_w_guard(scheme_intern_symbol("equal+hash"), + guard); + scheme_add_global_constant("prop:equal+hash", scheme_equal_property, env); + } + { Scheme_Object *guard; REGISTER_SO(scheme_input_port_property); @@ -1016,6 +1029,48 @@ static Scheme_Object *check_output_port_property_value_ok(int argc, Scheme_Objec return check_port_property_value_ok("guard-for-prop:output-port", 0, argc, argv); } +/*========================================================================*/ +/* equal+hash property */ +/*========================================================================*/ + +static Scheme_Object *check_equal_property_value_ok(int argc, Scheme_Object *argv[]) +/* This is the guard for prop:equal+hash */ +{ + Scheme_Object *v, *p; + + v = argv[0]; + + if (scheme_proper_list_length(v) != 3) { + v = NULL; + } else { + v = scheme_make_pair(scheme_make_symbol("tag"), v); + v = scheme_list_to_vector(v); + p = SCHEME_VEC_ELS(v)[1]; + if (!scheme_check_proc_arity(NULL, 3, 0, 1, &p)) { + v = NULL; + } else { + p = SCHEME_VEC_ELS(v)[2]; + if (!scheme_check_proc_arity(NULL, 2, 0, 1, &p)) { + v = NULL; + } else { + p = SCHEME_VEC_ELS(v)[3]; + if (!scheme_check_proc_arity(NULL, 2, 0, 1, &p)) { + v = NULL; + } + } + } + } + + if (!v) { + scheme_arg_mismatch("guard-for-prop:equal+hash", + "expected a list containing a recursive-equality procedure (arity 2)" + " and two recursive hash-code procedures (arity 2), given: ", + argv[0]); + } + + return v; +} + /*========================================================================*/ /* writeable structs */ /*========================================================================*/