From 8f2bad3b8cea97189a9e842ed0f78559aa4be795 Mon Sep 17 00:00:00 2001 From: dos-reis Date: Thu, 13 May 2010 14:47:31 +0000 Subject: * interp/sys-utility.boot (hashTable): Define. * interp/word.boot: Use it. * interp/topics.boot: Likewise. * interp/sys-driver.boot: Likewise. * interp/slam.boot: Likewise. * interp/setvars.boot: Likewise. * interp/scan.boot: Likewise. * interp/nrunopt.boot: Likewise. * interp/nruncomp.boot: Likewise. * interp/newfort.boot: Likewise. * interp/mark.boot: Likewise. * interp/interop.boot: Likewise. * interp/i-toplev.boot: Likewise. * interp/i-syscmd.boot: Likewise. * interp/htcheck.boot: Likewise. * interp/guess.boot: Likewise. * interp/g-util.boot: Likewise. * interp/database.boot: Likewise. * interp/compress.boot: Likewise. * interp/clam.boot: Likewise. * interp/cattable.boot: Likewise. * interp/c-util.boot: Likewise. * interp/br-op2.boot: Likewise. * interp/br-op1.boot: Likewise. * interp/br-con.boot: Likewise. * interp/sys-globals.boot ($ConstructorCache): Move elsewhere. ($instantRecord): Likewise. * algebra/newdata.spad.pamphlet: Use EQUAL as equality function for hash table. * algebra/table.spad.pamphlet: Call hashTable builtin function instead of MAKE-HASHTABLE. --- src/algebra/newdata.spad.pamphlet | 2 +- src/algebra/table.spad.pamphlet | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) (limited to 'src/algebra') diff --git a/src/algebra/newdata.spad.pamphlet b/src/algebra/newdata.spad.pamphlet index 78e3bf36..071fc497 100644 --- a/src/algebra/newdata.spad.pamphlet +++ b/src/algebra/newdata.spad.pamphlet @@ -62,7 +62,7 @@ TabulatedComputationPackage(Key ,Entry): Exports == Implementation where Key: SetCategory Entry: SetCategory N ==> NonNegativeInteger - H ==> HashTable(Key, Entry, "UEQUAL") + H ==> HashTable(Key, Entry, "EQUAL") iprintpack ==> InternalPrintPackage() Exports == with diff --git a/src/algebra/table.spad.pamphlet b/src/algebra/table.spad.pamphlet index b6347545..d69d72c2 100644 --- a/src/algebra/table.spad.pamphlet +++ b/src/algebra/table.spad.pamphlet @@ -29,7 +29,7 @@ HashTable(Key, Entry, hashfn): Exports == Implementation where Key, Entry: SetCategory - hashfn: String -- Union("EQ", "UEQUAL", "CVEC", "ID") + hashfn: String -- Union("EQ", "EQL", "EQUAL", "UEQUAL", "CVEC", "ID") Exports ==> TableAggregate(Key, Entry) with finiteAggregate @@ -51,8 +51,7 @@ HashTable(Key, Entry, hashfn): Exports == Implementation where "failed" empty() == - MAKE_-HASHTABLE(INTERN(hashfn)$Lisp, - INTERN("STRONG")$Lisp)$Lisp + hashTable(INTERN(hashfn)$Lisp)$Lisp search(k:Key, t:%) == r := HGET(t, k, failMsg)$Lisp @@ -110,7 +109,7 @@ Table(Key: SetCategory, Entry: SetCategory):Exports == Implementation where finiteAggregate Implementation ==> InnerTable(Key, Entry, - if hashable(Key)$Lisp then HashTable(Key, Entry, "UEQUAL") + if hashable(Key)$Lisp then HashTable(Key, Entry, "EQUAL") else AssociationList(Key, Entry)) @ @@ -152,7 +151,7 @@ EqTable(Key: SetCategory, Entry: SetCategory) == ++ This domain provides tables where the keys are strings. ++ A specialized hash function for strings is used. StringTable(Entry: SetCategory) == - HashTable(String, Entry, "CVEC") + HashTable(String, Entry, "EQUAL") @ \section{domain GSTBL GeneralSparseTable} -- cgit v1.2.3