diff options
author | dos-reis <gdr@axiomatics.org> | 2011-05-06 01:52:04 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2011-05-06 01:52:04 +0000 |
commit | 554f0da895913012bc9e029e9312c50650e222b2 (patch) | |
tree | d091568d27e5f01ec9f875224896ff1a4938de29 | |
parent | 104def0e400bbf3a0daed9e490e41485a9213c9d (diff) | |
download | open-axiom-554f0da895913012bc9e029e9312c50650e222b2.tar.gz |
more cleanup
29 files changed, 133 insertions, 136 deletions
diff --git a/src/boot/initial-env.lisp b/src/boot/initial-env.lisp index 6aa71a2b..9596211a 100644 --- a/src/boot/initial-env.lisp +++ b/src/boot/initial-env.lisp @@ -102,9 +102,6 @@ keys)) -(defun HPUT (table key value) - (setf (gethash key table) value)) - (defun strpos (what in start dontcare) (setq what (string what) in (string in)) (if dontcare diff --git a/src/interp/as.boot b/src/interp/as.boot index ec59982d..14bcec7f 100644 --- a/src/interp/as.boot +++ b/src/interp/as.boot @@ -68,7 +68,7 @@ astran asyFile == $asyFile: local := asyFile $asFilename: local := strconc(PATHNAME_-NAME asyFile,'".as") asytran asyFile - conlist := [x for x in HKEYS $conHash | HGET($conHash,x) isnt [.,.,"function",:.]] + conlist := [x for x in HKEYS $conHash | tableValue($conHash,x) isnt [.,.,"function",:.]] $mmAlist : local := [[con,:asyConstructorModemap con] for con in conlist] $docAlist : local := @@ -80,7 +80,7 @@ astran asyFile == tableValue($parentsHash,con) := asyParents con -- for [parent,:pred] in parents repeat -- parentOp := opOf parent --- tableValue($childrenHash,parentOp) := insert([con,:pred],HGET($childrenHash,parentOp)) +-- tableValue($childrenHash,parentOp) := insert([con,:pred],tableValue($childrenHash,parentOp)) $newConlist := union(conlist, $newConlist) [[x,:asMakeAlist x] for x in HKEYS $conHash] @@ -135,7 +135,7 @@ asyMkSignature(con,sig) == ['SIGNATURE,con,sig] asMakeAlist con == - record := HGET($conHash,con) + record := tableValue($conHash,con) [form,sig,predlist,kind,exposure,comments,typeCode,:filename] := first record --TTT in case we put the wrong thing in for niladic catgrs --if atom(form) and kind='category then form:=[form] @@ -146,9 +146,9 @@ asMakeAlist con == property(opOf form,'NILADIC) := 'T modemap := asySubstMapping LASSOC(con,$mmAlist) $constructorCategory :local := modemap.mmTarget - parents := mySort HGET($parentsHash,con) ---children:= mySort HGET($childrenHash,con) - alists := HGET($opHash,con) + parents := mySort tableValue($parentsHash,con) +--children:= mySort tableValue($childrenHash,con) + alists := tableValue($opHash,con) opAlist := applySubst(pairList(KDR form,$FormalMapVariableList),CDDR alists) ancestorAlist := applySubst(pairList(KDR form,$FormalMapVariableList),first alists) @@ -157,7 +157,7 @@ asMakeAlist con == documentation := applySubst(pairList(KDR form,$FormalMapVariableList),LASSOC(con,$docAlist)) filestring := strconc(PATHNAME_-NAME STRINGIMAGE filename,'".as") - constantPart := HGET($constantHash,con) and [['constant,:true]] + constantPart := tableValue($constantHash,con) and [['constant,:true]] niladicPart := symbolMember?(con,$niladics) and [['NILADIC,:true]] falist := TAKE(#KDR form,$FormalMapVariableList) constructorCategory := @@ -200,7 +200,7 @@ asGetExports(kind, conform, catform) == [sig, nil, :pred] asMakeAlistForFunction fn == - record := HGET($conHash,fn) + record := tableValue($conHash,fn) [form,sig,predlist,kind,exposure,comments,typeCode,:filename] := first record modemap := LASSOC(fn,$mmAlist) newsig := asySignature(sig,nil) @@ -302,14 +302,14 @@ asIsCategoryForm m == m = "BasicType" or getConstructorKindFromDB opOf m = "category" asyDocumentation con == - docHash := HGET($docHash,con) + docHash := tableValue($docHash,con) u := [[op,:[fn(x,op) for x in rec]] for op in HKEYS docHash - | rec := HGET(docHash,op)] where fn(x,op) == + | rec := tableValue(docHash,op)] where fn(x,op) == [form,sig,pred,origin,where?,comments,:.] := x ----------> Constants change <-------------- if IDENTP sig then sig := [sig] [asySignature(sig,nil),trimComments comments] - [form,sig,pred,origin,where?,comments] := first HGET($conHash,con) + [form,sig,pred,origin,where?,comments] := first tableValue($conHash,con) --above "first" assumes only one entry comments := trimComments asyExtractDescription comments [:u,['constructor,[nil,comments]]] @@ -330,8 +330,8 @@ asyExportAlist con == -- <sig slotNumberOrNil optPred optELT> -- <sig sig' predOrT "Subsumed"> --!!! asyFile NEED: need to know if function is implemented by domain!!! - docHash := HGET($docHash,con) - [[op,:[fn(x,op) for x in rec]] for op in HKEYS docHash | rec := HGET(docHash,op)] + docHash := tableValue($docHash,con) + [[op,:[fn(x,op) for x in rec]] for op in HKEYS docHash | rec := tableValue(docHash,op)] where fn(x,op) == [form,sig,pred,origin,where?,comments,:.] := x tail := @@ -376,8 +376,8 @@ asyMakeOperationAlist(con,proplist, key) == [[sig],nil,true,'ASCONST] pred => [sig,nil,asyPredTran pred] [sig] - tableValue(ht,id) := [entry,:HGET(ht,id)] - opalist := [[op,:removeDuplicates HGET(ht,op)] for op in HKEYS ht] + tableValue(ht,id) := [entry,:tableValue(ht,id)] + opalist := [[op,:removeDuplicates tableValue(ht,op)] for op in HKEYS ht] --tableValue($opHash,con) := [ancestorAlist,attributeAlist,:opalist] tableValue($opHash,con) := [ancestorAlist,nil,:opalist] @@ -467,7 +467,7 @@ asytranDeclaration(dform,levels,predlist,local?) == ht := levels is '(top) => $conHash $docHashLocal - tableValue(ht,id) := [record,:HGET(ht,id)] + tableValue(ht,id) := [record,:tableValue(ht,id)] if levels is '(top) then asyMakeOperationAlist(id,r, key) ['Declare,id,newsig,r] @@ -497,7 +497,7 @@ asyLooksLikeCatForm? x == -- ht := -- levels is '(top) => $conHash -- $docHashLocal --- tableValue(ht,id) := [record,:HGET(ht,id)] +-- tableValue(ht,id) := [record,:tableValue(ht,id)] -- if levels is '(top) then asyMakeOperationAlist(id,r) -- ['Declare,id,newsig,r] @@ -607,11 +607,11 @@ asytranCategory(form,levels,predlist,local?) == dform := asytranCategoryItem(x,levels,predlist,local?) null dform => nil dform is ['Declare,id,record,r] => - tableValue(catTable,id) := [asyWrap(record,predlist),:HGET(catTable,id)] + tableValue(catTable,id) := [asyWrap(record,predlist),:tableValue(catTable,id)] catList := [asyWrap(dform,predlist),:catList] keys := listSort(function GLESSEQP,HKEYS catTable) right1 := reverse! catList - right2 := [[key,:HGET(catTable,key)] for key in keys] + right2 := [[key,:tableValue(catTable,key)] for key in keys] right := right2 => [:right1,['Exports,:right2]] right1 @@ -656,7 +656,7 @@ extendConstructorDataTable() == -- tb := $constructorDataTable for x in listSort(function GLESSEQP,HKEYS $conHash) repeat -- if LASSOC(x,tb) then tb := DELLASOS(x,tb) - record := HGET($conHash,x) + record := tableValue($conHash,x) [form,sig,predlist,origin,exposure,comments,typeCode,:filename] := first record abb := asyAbbreviation(x,#(rest sig)) kind := 'domain @@ -718,14 +718,14 @@ asyAbbreviation(id,n) == chk(id,main) where --> n = number of arguments abb asyGetAbbrevFromComments con == - docHash := HGET($docHash,con) + docHash := tableValue($docHash,con) u := [[op,:[fn(x,op) for x in rec]] for op in HKEYS docHash - | rec := HGET(docHash,op)] where fn(x,op) == + | rec := tableValue(docHash,op)] where fn(x,op) == [form,sig,pred,origin,where?,comments,:.] := x ----------> Constants change <-------------- if IDENTP sig then sig := [sig] [asySignature(sig,nil),trimComments comments] - [form,sig,pred,origin,where?,comments] := first HGET($conHash,con) + [form,sig,pred,origin,where?,comments] := first tableValue($conHash,con) --above "first" assumes only one entry x := asyExtractAbbreviation comments x => intern x @@ -766,7 +766,7 @@ createAbbreviation s == --Note: modemap property is built when getConstructorModemapFromDB is called asyConstructorModemap con == - HGET($conHash,con) isnt [record,:.] => nil --not there + tableValue($conHash,con) isnt [record,:.] => nil --not there [form,sig,predlist,kind,exposure,comments,typeCode,:filename] := record $kind: local := kind --NOTE: sig has the form (-> source target) or simply (target) diff --git a/src/interp/br-con.boot b/src/interp/br-con.boot index 76f70ce1..00548b03 100644 --- a/src/interp/br-con.boot +++ b/src/interp/br-con.boot @@ -76,7 +76,7 @@ conPageFastPath x == --called by conPage and constructorSearch s := STRINGIMAGE x charPosition(char "*",s,0) < #s => nil --quit if name has * in it name := (string? x => makeSymbol x; x) - entry := HGET($lowerCaseConTb,name) or return nil + entry := tableValue($lowerCaseConTb,name) or return nil lineNumber := LASSQ('dbLineNumber,CDDR entry) => --'dbLineNumbers property is set by function dbAugmentConstructorDataTable dbRead lineNumber --read record for constructor from libdb.text @@ -467,7 +467,7 @@ kcPage(htPage,junk) == if kind ~= '"category" then satBreak() htMakePage [['bcLinks,['"\menuitemstyle{Clients}",'"\tab{12}Constructors",'kcuPage,nil]]] - if HGET($defaultPackageNamesHT,conname) + if tableValue($defaultPackageNamesHT,conname) then htSay('" which {\em may use} this default package") -- htMakePage [['bcLinks,['"files",'"",'kcuPage,true]]] else htSay('" which {\em use} this ",kind) @@ -840,7 +840,7 @@ dbConstructorDoc(conform,$op,$sig) == fn conform where dbDocTable conform == --assumes $docTableHash bound --see dbExpandOpAlistIfNecessary - table := HGET($docTableHash,conform) => table + table := tableValue($docTableHash,conform) => table $docTable : local := hashTable 'EQ --process in reverse order so that closest cover up farthest for x in originsInOrder conform repeat dbAddDocTable x @@ -869,7 +869,7 @@ dbAddDocTable conform == op = '(One) => 1 op for [sig,doc] in alist repeat - tableValue($docTable,op1) := [[conform,:alist],:HGET($docTable,op1)] + tableValue($docTable,op1) := [[conform,:alist],:tableValue($docTable,op1)] --note opOf is needed!!! for some reason, One and Zero appear within prens dbGetDocTable(op,$sig,docTable,$which,aux) == main where @@ -885,7 +885,7 @@ dbGetDocTable(op,$sig,docTable,$which,aux) == main where pred => ['ifp,:aux] first aux [origin,:doc] - or/[gn x for x in HGET(docTable,op)] + or/[gn x for x in tableValue(docTable,op)] gn u == --u is [origin,entry1,...,:code] $conform := first u --origin if atom $conform then $conform := [$conform] diff --git a/src/interp/br-data.boot b/src/interp/br-data.boot index 03d6096a..96ff9ff7 100644 --- a/src/interp/br-data.boot +++ b/src/interp/br-data.boot @@ -422,9 +422,9 @@ mkUsersHashTable() == --called by buildDatabase (database.boot) for conform in getImports x repeat name := opOf conform if not (name in '(QUOTE)) then - tableValue($usersTb,name) := insert(x,HGET($usersTb,name)) + tableValue($usersTb,name) := insert(x,tableValue($usersTb,name)) for k in HKEYS $usersTb repeat - tableValue($usersTb,k) := listSort(function GLESSEQP,HGET($usersTb,k)) + tableValue($usersTb,k) := listSort(function GLESSEQP,tableValue($usersTb,k)) for x in allConstructors() | isDefaultPackageName x repeat tableValue($usersTb,x) := getDefaultPackageClients x $usersTb @@ -448,9 +448,9 @@ mkDependentsHashTable() == --called by buildDatabase (database.boot) $depTb := MAKE_-HASH_-TABLE() for nam in allConstructors() repeat for con in getArgumentConstructors nam repeat - tableValue($depTb,con) := [nam,:HGET($depTb,con)] + tableValue($depTb,con) := [nam,:tableValue($depTb,con)] for k in HKEYS $depTb repeat - tableValue($depTb,k) := listSort(function GLESSEQP,HGET($depTb,k)) + tableValue($depTb,k) := listSort(function GLESSEQP,tableValue($depTb,k)) $depTb getArgumentConstructors con == --called by mkDependentsHashTable @@ -515,7 +515,7 @@ $parentsCache := nil parentsOf con == --called by kcpPage, ancestorsRecur if null $parentsCache then $parentsCache := hashTable 'EQ - HGET($parentsCache,con) or + tableValue($parentsCache,con) or parents := getParentsForDomain con tableValue($parentsCache,con) := parents parents @@ -597,10 +597,10 @@ childArgCheck(argl, nargl) == -- tableValue(hash,childForm) := pred -- for [form,:pred] in descendantsOf(childForm,nil) repeat -- newPred := --- oldPred := HGET(hash,form) => quickOr(oldPred,pred) +-- oldPred := tableValue(hash,form) => quickOr(oldPred,pred) -- pred -- tableValue(hash,form) := newPred --- mySort [[key,:HGET(hash,key)] for key in HKEYS hash] +-- mySort [[key,:tableValue(hash,key)] for key in HKEYS hash] ancestorsOf(conform,domform) == --called by kcaPage, originsInOrder,... "category" = getConstructorKindFromDB(conname := opOf conform) => @@ -620,12 +620,12 @@ computeAncestorsOf(conform,domform) == ancestorsRecur(conform,domform,true,true) acc := nil for op in listSort(function GLESSEQP,HKEYS $if) repeat - for pair in HGET($if,op) repeat acc := [pair,:acc] + for pair in tableValue($if,op) repeat acc := [pair,:acc] reverse! acc ancestorsRecur(conform,domform,pred,firstTime?) == --called by ancestorsOf op := opOf conform - pred = HGET($done,conform) => nil --skip if already processed + pred = tableValue($done,conform) => nil --skip if already processed parents := firstTime? and ($insideCategoryIfTrue or $insideFunctorIfTrue) => $lisplibParents @@ -647,7 +647,7 @@ ancestorsRecur(conform,domform,pred,firstTime?) == --called by ancestorsOf ancestorsAdd(pred,form) == --called by ancestorsRecur null pred => nil op := IFCAR form or form - alist := HGET($if,op) + alist := tableValue($if,op) existingNode := assoc(form,alist) => existingNode.rest := quickOr(rest existingNode,pred) tableValue($if,op) := [[form,:pred],:alist] diff --git a/src/interp/br-op1.boot b/src/interp/br-op1.boot index 6790d805..1d8e6ae7 100644 --- a/src/interp/br-op1.boot +++ b/src/interp/br-op1.boot @@ -92,7 +92,7 @@ dbShowOps(htPage,which,key,:options) == reduceByGroup(htPage,opAlist) == not dbFromConstructor?(htPage) or null $groupChoice => opAlist dbExpandOpAlistIfNecessary(htPage,opAlist,'"operation",true,false) - bitNumber := HGET($topicHash,$groupChoice) + bitNumber := tableValue($topicHash,$groupChoice) res := [[op,:newItems] for [op,:items] in opAlist | newItems] where newItems() == null bitNumber => items @@ -215,7 +215,7 @@ conformString(form) == conform2StringList(form,opFn,argFn,exception) == exception := exception or '"%%%nothing%%%" [op1,:args] := form - op := IFCAR HGET($lowerCaseConTb,op1) or op1 + op := IFCAR tableValue($lowerCaseConTb,op1) or op1 null args => apply(opFn,[op]) special := op in '(Union Record Mapping) cosig := @@ -305,7 +305,7 @@ dbConformGen1(form,opButton?) == args => conform2StringList(form, opFunction,FUNCTION dbConformGen,nil) apply(opFunction,[form]) -unAbbreviateIfNecessary op == IFCAR HGET($lowerCaseConTb, op) or op +unAbbreviateIfNecessary op == IFCAR tableValue($lowerCaseConTb, op) or op conname2StringList form == [PNAME unAbbreviateIfNecessary opOf form] diff --git a/src/interp/br-op2.boot b/src/interp/br-op2.boot index 3fa171eb..625dc62c 100644 --- a/src/interp/br-op2.boot +++ b/src/interp/br-op2.boot @@ -453,12 +453,12 @@ koCatAttrs(catform,domname) == hashTable2Alist $if hashTable2Alist tb == - [[op,:HGET(tb,op)] for op in listSort(function GLESSEQP,HKEYS $if)] + [[op,:tableValue(tb,op)] for op in listSort(function GLESSEQP,HKEYS $if)] koCatAttrsAdd(catform,pred) == for [name,argl,:p] in first getConstructorExports catform repeat npred := quickAnd(pred,p) - exists := HGET($if,name) + exists := tableValue($if,name) if existingPred := LASSOC(argl,exists)_ then npred := quickOr(npred,existingPred) if not (name in '(nil nothing)) _ diff --git a/src/interp/br-search.boot b/src/interp/br-search.boot index 4a6c3e9a..311fd85f 100644 --- a/src/interp/br-search.boot +++ b/src/interp/br-search.boot @@ -85,7 +85,7 @@ isDefaultOpAtt x == x.(1 + dbTickIndex(x,4,0)) = char "x" grepForAbbrev(s,key) == --checks that filter s is not * and is all uppercase; if so, look for abbrevs - u := HGET($lowerCaseConTb,s) => ['Abbreviations,u] --try cheap test first + u := tableValue($lowerCaseConTb,s) => ['Abbreviations,u] --try cheap test first s := STRINGIMAGE s someLowerCaseChar := false someUpperCaseChar := false @@ -99,7 +99,7 @@ grepForAbbrev(s,key) == for x in allConstructors() | test]] where test() == not $includeUnexposed? and not isExposedConstructor x => false a := getConstructorAbbreviationFromDB x - match?(pattern,symbolName a) and not HGET($defaultPackageNamesHT,x) + match?(pattern,symbolName a) and not tableValue($defaultPackageNamesHT,x) applyGrep(x,filename) == atom x => grepFile(x,filename,'i) @@ -661,7 +661,7 @@ constructorSearch(filter,key,kind) == pageName := LASSOC(DOWNCASE filter,'(("union" . DomainUnion)("record" . DomainRecord)("mapping" . DomainMapping) ("enumeration" . DomainEnumeration))) => downlink pageName name := (string? filter => makeSymbol filter; filter) - if u := HGET($lowerCaseConTb,name) then filter := STRINGIMAGE first u + if u := tableValue($lowerCaseConTb,name) then filter := STRINGIMAGE first u line := conPageFastPath DOWNCASE filter => code := dbKind line newkind := @@ -718,16 +718,16 @@ dbWordFrom(l,i) == [buf,k] conLowerCaseConTran x == - IDENTP x => IFCAR HGET($lowerCaseConTb, x) or x + IDENTP x => IFCAR tableValue($lowerCaseConTb, x) or x atom x => x [conLowerCaseConTran y for y in x] string2Constructor x == not string? x => x - IFCAR HGET($lowerCaseConTb, makeSymbol DOWNCASE x) or x + IFCAR tableValue($lowerCaseConTb, makeSymbol DOWNCASE x) or x conLowerCaseConTranTryHarder x == - IDENTP x => IFCAR HGET($lowerCaseConTb,DOWNCASE x) or x + IDENTP x => IFCAR tableValue($lowerCaseConTb,DOWNCASE x) or x atom x => x [conLowerCaseConTranTryHarder y for y in x] diff --git a/src/interp/br-util.boot b/src/interp/br-util.boot index 89600577..38de165d 100644 --- a/src/interp/br-util.boot +++ b/src/interp/br-util.boot @@ -267,7 +267,7 @@ dbConstructorKind x == target := getConstructorModemapFromDB(x).mmTarget target = '(Category) => 'category target is ['CATEGORY,'package,:.] => 'package - HGET($defaultPackageNamesHT,x) => 'default_ package + tableValue($defaultPackageNamesHT,x) => 'default_ package 'domain getConstructorForm name == diff --git a/src/interp/buildom.boot b/src/interp/buildom.boot index b5b3b3f3..508c325c 100644 --- a/src/interp/buildom.boot +++ b/src/interp/buildom.boot @@ -71,7 +71,7 @@ lookupDisplay(op,sig,vectorOrForm,suffix) == '" from ", prefix2String devaluateDeeply vectorOrForm,suffix) isInstantiated [op,:argl] == - u:= lassocShiftWithFunction(argl,HGET($ConstructorCache,op),'domainEqualList) + u:= lassocShiftWithFunction(argl,tableValue($ConstructorCache,op),'domainEqualList) => CDRwithIncrement u nil diff --git a/src/interp/c-doc.boot b/src/interp/c-doc.boot index 2a7bdf16..60fdb741 100644 --- a/src/interp/c-doc.boot +++ b/src/interp/c-doc.boot @@ -356,13 +356,13 @@ checkRecordHash u == and (u := checkLookForRightBrace IFCDR u) and (u := checkLookForLeftBrace IFCDR u) and (u := IFCDR u) then htname := intern IFCAR u - entry := HGET($htHash,htname) or [nil] + entry := tableValue($htHash,htname) or [nil] tableValue($htHash,htname) := [first entry,:[[$name,:$origin],:rest entry]] else if member(x,$HTlisplinks) and (u := checkLookForLeftBrace IFCDR u) and (u := checkLookForRightBrace IFCDR u) and (u := checkLookForLeftBrace IFCDR u) and (u := IFCDR u) then htname := intern checkGetLispFunctionName checkGetStringBeforeRightBrace u - entry := HGET($lispHash,htname) or [nil] + entry := tableValue($lispHash,htname) or [nil] tableValue($lispHash,htname) := [first entry,:[[$name,:$origin],:rest entry]] else if ((p := member(x,'("\gloss" "\spadglos"))) or (q := member(x,'("\glossSee" "\spadglosSee")))) @@ -373,7 +373,7 @@ checkRecordHash u == u := checkLookForLeftBrace IFCDR u u := IFCDR u htname := intern checkGetStringBeforeRightBrace u - entry := HGET($glossHash,htname) or [nil] + entry := tableValue($glossHash,htname) or [nil] tableValue($glossHash,htname) := [first entry,:[[$name,:$origin],:rest entry]] else if x is '"\spadsys" and (u := checkLookForLeftBrace IFCDR u) and (u := IFCDR u) then s := checkGetStringBeforeRightBrace u @@ -385,7 +385,7 @@ checkRecordHash u == atom parse or (parse isnt ['set,arg]) => 'ok ---assume ok not spadSysChoose($setOptions,arg) => checkDocError ['"Incorrect \spadsys: ",s] - entry := HGET($sysHash,htname) or [nil] + entry := tableValue($sysHash,htname) or [nil] tableValue($sysHash,htname) := [first entry,:[[$name,:$origin],:rest entry]] else if x is '"\spadtype" and (u := checkLookForLeftBrace IFCDR u) and (u := IFCDR u) then s := checkGetStringBeforeRightBrace u @@ -973,7 +973,7 @@ checkSplitPunctuation x == [subString(x,0,m - 1),subString(x,m-1)] (k := charPosition($charBack,x,0)) < m => k = 0 => - m = 1 or HGET($htMacroTable,x) or alphabetic? x.1 => [x] + m = 1 or tableValue($htMacroTable,x) or alphabetic? x.1 => [x] v := subString(x,2) [subString(x,0,2),:checkSplitPunctuation v] u := subString(x,0,k) @@ -1038,7 +1038,7 @@ checkBeginEnd u == while u repeat IDENTITY x := first u - string? x and x.0 = $charBack and #x > 2 and not HGET($htMacroTable,x) + string? x and x.0 = $charBack and #x > 2 and not tableValue($htMacroTable,x) and not (x is '"\spadignore") and IFCAR IFCDR u = $charLbrace and not (substring?('"\radiobox",x,0) or substring?('"\inputbox",x,0))=> @@ -1073,7 +1073,7 @@ checkArguments u == while u repeat do x := first u - null (k := HGET($htMacroTable,x)) => 'skip + null (k := tableValue($htMacroTable,x)) => 'skip k = 0 => 'skip k > 0 => checkHTargs(x,rest u,k,nil) checkHTargs(x,rest u,-k,true) diff --git a/src/interp/cattable.boot b/src/interp/cattable.boot index e2597132..a9a9e949 100644 --- a/src/interp/cattable.boot +++ b/src/interp/cattable.boot @@ -44,16 +44,16 @@ hasCat(dom,cat) == showCategoryTable con == [[b,:val] for (key :=[a,:b]) in HKEYS _*HASCATEGORY_-HASH_* - | symbolEq?(a,con) and (val := HGET(_*HASCATEGORY_-HASH_*,key))] + | symbolEq?(a,con) and (val := tableValue(_*HASCATEGORY_-HASH_*,key))] displayCategoryTable(:options) == conList := IFCAR options SETQ($ct,hashTable 'EQ) for (key:=[a,:b]) in HKEYS _*HASCATEGORY_-HASH_* repeat - tableValue($ct,a) := [[b,:HGET(_*HASCATEGORY_-HASH_*,key)],:HGET($ct,a)] + tableValue($ct,a) := [[b,:tableValue(_*HASCATEGORY_-HASH_*,key)],:tableValue($ct,a)] for id in HKEYS $ct | null conList or symbolMember?(id,conList) repeat sayMSG [:bright id,'"extends:"] - PRINT HGET($ct,id) + PRINT tableValue($ct,id) genCategoryTable() == SETQ(_*ANCESTORS_-HASH_*, hashTable 'EQ) @@ -82,7 +82,7 @@ simpTempCategoryTable() == simpCategoryTable() == main where main() == for key in HKEYS _*HASCATEGORY_-HASH_* repeat - entry := HGET(_*HASCATEGORY_-HASH_*,key) + entry := tableValue(_*HASCATEGORY_-HASH_*,key) null entry => HREM(_*HASCATEGORY_-HASH_*,key) change := atom opOf entry => simpHasPred entry @@ -198,7 +198,7 @@ genTempCategoryTable() == getConstructorKindFromDB con is "category" => addToCategoryTable con for id in HKEYS _*ANCESTORS_-HASH_* repeat - item := HGET(_*ANCESTORS_-HASH_*, id) + item := tableValue(_*ANCESTORS_-HASH_*, id) for (u:=[.,:b]) in item repeat u.rest := simpCatPredicate simpBool b tableValue(_*ANCESTORS_-HASH_*,id) := listSort(function GLESSEQP,item) @@ -418,14 +418,14 @@ compressHashTable ht == -- compresses hash table ht, to give maximal sharing of cells sayBrightlyNT '"compressing hash table..." $found: local := hashTable 'EQUAL - for x in HKEYS ht repeat compressSexpr(HGET(ht,x),nil,nil) + for x in HKEYS ht repeat compressSexpr(tableValue(ht,x),nil,nil) sayBrightly "done" ht compressSexpr(x,left,right) == -- recursive version of compressHashTable atom x => nil - u:= HGET($found,x) => + u:= tableValue($found,x) => left => left.first := u right => right.rest := u nil diff --git a/src/interp/clam.boot b/src/interp/clam.boot index 20fb3644..db94674c 100644 --- a/src/interp/clam.boot +++ b/src/interp/clam.boot @@ -222,13 +222,13 @@ compHash(op,argl,body,cacheNameOrNil,eqEtc,countFl) == countFl => ['CDRwithIncrement,g2] g2 getCode:= - null argl => ['HGET,cacheName,MKQ op] + null argl => ['tableValue,cacheName,MKQ op] cacheNameOrNil => eqEtc ~= 'EQUAL => ['lassocShiftWithFunction,cacheArgKey, - ['HGET,cacheNameOrNil,MKQ op],MKQ eqEtc] - ['lassocShift,cacheArgKey,['HGET,cacheNameOrNil,MKQ op]] - ['HGET,cacheName,g1] + ['tableValue,cacheNameOrNil,MKQ op],MKQ eqEtc] + ['lassocShift,cacheArgKey,['tableValue,cacheNameOrNil,MKQ op]] + ['tableValue,cacheName,g1] secondPredPair:= [g2,optSEQ ['SEQ,:hitCountCode,['EXIT,returnFoundValue]]] putCode:= null argl => @@ -297,7 +297,7 @@ compHashGlobal(op,argl,body,cacheName,eqEtc,countFl) == returnFoundValue:= countFl => ['CDRwithIncrement,g2] g2 - getCode:= ['HGET,cacheName,cacheArgKey] + getCode:= ['tableValue,cacheName,cacheArgKey] secondPredPair:= [g2,returnFoundValue] putForm:= ['%pair,MKQ op,g1] putCode:= @@ -322,7 +322,7 @@ CDRwithIncrement x == rest x HGETandCount(ht,prop) == - u:= HGET(ht,prop) or return nil + u:= tableValue(ht,prop) or return nil u.first := first u + 1 u @@ -363,7 +363,7 @@ clearCategoryCache catName == setDynamicBinding(mkCacheName catName,nil) displayHashtable x == - l:= reverse! SORTBY('CAR,[[opOf HGET(x,key),key] for key in HKEYS x]) + l:= reverse! SORTBY('CAR,[[opOf tableValue(x,key),key] for key in HKEYS x]) for [a,b] in l repeat sayBrightlyNT ['"%b",a,'"%d"] pp b @@ -403,7 +403,7 @@ mkCircularCountAlist(cl,len) == reportHashCacheStats fn == infovec:= property(fn,'cacheInfo) ht := eval infovec.cacheName - hashValues:= [HGET(ht,key) for key in HKEYS ht] + hashValues:= [tableValue(ht,key) for key in HKEYS ht] sayBrightly [:bright fn,'"has",:bright(# hashValues),'"values cached."] displayCacheFrequency mkHashCountAlist hashValues TERPRI() @@ -526,7 +526,7 @@ haddProp(ht,op,prop,val) == startTimingProcess 'debug recordInstantiation(op,prop,false) stopTimingProcess 'debug - u:= HGET(ht,op) => --hope that one exists most of the time + u:= tableValue(ht,op) => --hope that one exists most of the time assoc(prop,u) => val --value is already there--must = val; exit now u.rest := [first u,:rest u] u.first := [prop,:val] @@ -555,7 +555,7 @@ recordInstantiation1(op,prop,dropIfTrue) == $instantMmCondCount:= $instantMmCondCount + 1 typeTimePrin ["CONCAT",outputDomainConstructor [op,:prop],trailer,:xtra] null $reportInstantiations => nil - u:= HGET($instantRecord,op) => --hope that one exists most of the time + u:= tableValue($instantRecord,op) => --hope that one exists most of the time v := LASSOC(prop,u) => dropIfTrue => v.rest := 1+rest v v.first := 1+first v @@ -572,7 +572,7 @@ recordInstantiation1(op,prop,dropIfTrue) == reportInstantiations() == --assumed to be a hashtable with reference counts conList:= - [:[[n,m,[key,:argList]] for [argList,n,:m] in HGET($instantRecord,key)] + [:[[n,m,[key,:argList]] for [argList,n,:m] in tableValue($instantRecord,key)] for key in HKEYS $instantRecord] sayBrightly ['"# instantiated/# dropped/domain name", "%l",'"------------------------------------"] @@ -670,7 +670,7 @@ globalHashtableStats(x,sortFn) == --assumed to be a hashtable with reference counts keys:= HKEYS x for key in keys repeat - u:= HGET(x,key) + u:= tableValue(x,key) for [argList,n,:.] in u repeat not integer? n => keyedSystemError("S2GE0013",[x]) argList1:= [constructor2ConstructorForm x for x in argList] diff --git a/src/interp/database.boot b/src/interp/database.boot index f8a9b6ad..787fb40d 100644 --- a/src/interp/database.boot +++ b/src/interp/database.boot @@ -264,14 +264,14 @@ saveUsersHashTable() == _$ERASE('USERS,'DATABASE,'a) stream:= writeLib1('USERS,'DATABASE,'a) for k in MSORT HKEYS $usersTb repeat - rwrite(k, HGET($usersTb, k), stream) + rwrite(k, tableValue($usersTb, k), stream) RSHUT stream saveDependentsHashTable() == _$ERASE('DEPENDENTS,'DATABASE,'a) stream:= writeLib1('DEPENDENTS,'DATABASE,'a) for k in MSORT HKEYS $depTb repeat - rwrite(k, HGET($depTb, k), stream) + rwrite(k, tableValue($depTb, k), stream) RSHUT stream getUsersOfConstructor(con) == diff --git a/src/interp/g-cndata.boot b/src/interp/g-cndata.boot index 541aa188..f5a4492a 100644 --- a/src/interp/g-cndata.boot +++ b/src/interp/g-cndata.boot @@ -57,7 +57,7 @@ augmentLowerCaseConTable x == getCDTEntry(info,isName) == not IDENTP info => nil - (entry := HGET($lowerCaseConTb,info)) => + (entry := tableValue($lowerCaseConTb,info)) => [name,abb,:.] := entry isName and sameObject?(name,info) => entry not isName and sameObject?(abb,info) => entry diff --git a/src/interp/g-util.boot b/src/interp/g-util.boot index 5c1d4605..2bd68b4a 100644 --- a/src/interp/g-util.boot +++ b/src/interp/g-util.boot @@ -196,7 +196,7 @@ ScanOrPairVec(f, ob) == CATCH('ScanOrPairVecAnswer, ScanOrInner(f, ob)) where ScanOrInner(f, ob) == - HGET($seen, ob) => nil + tableValue($seen, ob) => nil cons? ob => tableValue($seen, ob) := true ScanOrInner(f, first ob) diff --git a/src/interp/guess.boot b/src/interp/guess.boot index bf42c23e..8aae3f5a 100644 --- a/src/interp/guess.boot +++ b/src/interp/guess.boot @@ -46,16 +46,16 @@ buildWordTable u == for s in u repeat words := wordsOfString s key := charUpcase stringChar(s,0) - tableValue(table,key) := [[s,:words],:HGET(table,key)] + tableValue(table,key) := [[s,:words],:tableValue(table,key)] for key in HKEYS table repeat tableValue(table,key) := listSort(function GLESSEQP,removeDupOrderedAlist - listSort(function GLESSEQP, HGET(table,key),function first), + listSort(function GLESSEQP, tableValue(table,key),function first), function second) table measureWordTable u == - +/[+/[#entry for entry in HGET(u,key)] for key in HKEYS u] + +/[+/[#entry for entry in tableValue(u,key)] for key in HKEYS u] removeDupOrderedAlist u == -- removes duplicate entries in ordered alist @@ -96,8 +96,8 @@ wordKeys s == add2WordFunctionTable fn == --called from DEF $functionTable and - null LASSOC(s := PNAME fn,HGET($functionTable,(key := UPCASE s.0))) => - tableValue($functionTable,key) := [[s,:wordsOfString s],:HGET($functionTable,key)] + null LASSOC(s := PNAME fn,tableValue($functionTable,(key := UPCASE s.0))) => + tableValue($functionTable,key) := [[s,:wordsOfString s],:tableValue($functionTable,key)] --======================================================================= -- Guess Function Name @@ -160,7 +160,7 @@ findApproximateWords(word,table) == alist:= nil for i in 1..#words repeat $penalty :local := (i = 1 => 0; 1) - wordAlist:= HGET(table,UPCASE (first words).0) + wordAlist:= tableValue(table,UPCASE (first words).0) for [x,:wordList] in wordAlist repeat k := findApproxWordList(words,wordList,n,threshold,#wordList) k => diff --git a/src/interp/i-coerce.boot b/src/interp/i-coerce.boot index 60d86a4e..4c21e80c 100644 --- a/src/interp/i-coerce.boot +++ b/src/interp/i-coerce.boot @@ -926,7 +926,7 @@ coerceSubDomain(val, tSuper, tSub) == nil getSubDomainPredicate(tSuper, tSub, pred) == - predfn := HGET($superHash, [tSuper,:tSub]) => predfn + predfn := tableValue($superHash, [tSuper,:tSub]) => predfn arg := gensym() [predfn] := compileInteractive [gensym(),['LAM,[arg],substitute(arg,"#1", pred)]] diff --git a/src/interp/i-syscmd.boot b/src/interp/i-syscmd.boot index b283da6d..0daaf964 100644 --- a/src/interp/i-syscmd.boot +++ b/src/interp/i-syscmd.boot @@ -289,7 +289,7 @@ clearSpad2Cmd l == clearCmdSortedCaches() == $lookupDefaults: local := false - for [.,.,:domain] in HGET($ConstructorCache,'SortedCache) repeat + for [.,.,:domain] in tableValue($ConstructorCache,'SortedCache) repeat pair := compiledLookupCheck('clearCache,[$Void],domain) SPADCALL pair @@ -2011,7 +2011,7 @@ writify ob == writifyInner ob where writifyInner ob == null ob => nil - (e := HGET($seen, ob)) => e + (e := tableValue($seen, ob)) => e cons? ob => qcar := first ob @@ -2062,7 +2062,7 @@ writify ob == ['HASHTABLE, HASHTABLE_-CLASS ob, writifyInner keys, - [writifyInner HGET(ob,k) for k in keys]] + [writifyInner tableValue(ob,k) for k in keys]] nob PLACEP ob => nob := ['WRITIFIED!!, 'PLACE] @@ -2118,7 +2118,7 @@ dewritify ob == dewritifyInner ob where dewritifyInner ob == null ob => nil - e := HGET($seen, ob) => e + e := tableValue($seen, ob) => e cons? ob and first ob = 'WRITIFIED!! => type := ob.1 diff --git a/src/interp/interop.boot b/src/interp/interop.boot index 383ad048..1bc6739d 100644 --- a/src/interp/interop.boot +++ b/src/interp/interop.boot @@ -272,7 +272,7 @@ depthAssocList u == removeDuplicates ("append"/[depthAssoc(y) for y in u]) depthAssoc x == - y := HGET($depthAssocCache,x) => y + y := tableValue($depthAssocCache,x) => y x is ['Join,:u] or (u := getCatAncestors x) => v := depthAssocList u tableValue($depthAssocCache,x) := [[x,:n],:v] @@ -567,7 +567,7 @@ hashNewLookupInCategories(op,sig,dom,dollar) == packageVec.i := package package ----old world - table := HGET($Slot1DataBase,entry) or systemError nil + table := tableValue($Slot1DataBase,entry) or systemError nil (u := LASSQ(op,table)) and (v := or/[rest x for x in u]) => packageForm := [entry,'$,:rest cat] diff --git a/src/interp/lisplib.boot b/src/interp/lisplib.boot index 6a44b45d..cc4b1a14 100644 --- a/src/interp/lisplib.boot +++ b/src/interp/lisplib.boot @@ -273,7 +273,7 @@ unInstantiate(clist) == killNestedInstantiations(deps) == for key in HKEYS($ConstructorCache) repeat - for [arg,count,:inst] in HGET($ConstructorCache,key) repeat + for [arg,count,:inst] in tableValue($ConstructorCache,key) repeat isNestedInstantiation(inst.0,deps) => HREMPROP($ConstructorCache,key,arg) diff --git a/src/interp/newfort.boot b/src/interp/newfort.boot index 276c3616..295aea7a 100644 --- a/src/interp/newfort.boot +++ b/src/interp/newfort.boot @@ -219,7 +219,7 @@ exp2FortOptimizeCS1 e == -- see if we have been here before not (object2Identifier first e in '(ROW AGGLST)) and - (n := HGET($fortCsHash,e)) => beenHere(e,n) -- where + (n := tableValue($fortCsHash,e)) => beenHere(e,n) -- where -- descend sucessive CARs of CDRs of e f := e @@ -243,7 +243,7 @@ exp2FortOptimizeCS1 e == object2Identifier first e in '(ROW AGGLST) => e -- see if we have already seen this expression - n := HGET($fortCsHash,e) + n := tableValue($fortCsHash,e) null n => n := VECTOR(1,nil,$fortCsExprStack,$fortCsFuncStack) tableValue($fortCsHash,e) := n diff --git a/src/interp/nrunfast.boot b/src/interp/nrunfast.boot index 5d3fba7c..834e2432 100644 --- a/src/interp/nrunfast.boot +++ b/src/interp/nrunfast.boot @@ -346,7 +346,7 @@ newLookupInCategories(op,sig,dom,dollar) == vectorRef(packageVec,i) := package package ----old world - table := HGET($Slot1DataBase,entry) or systemError nil + table := tableValue($Slot1DataBase,entry) or systemError nil (u := LASSQ(op,table)) and (v := or/[rest x for x in u | #sig = #x.0]) => packageForm := [entry,'$,:rest cat] @@ -419,7 +419,7 @@ newLookupInCategories1(op,sig,dom,dollar) == package := evalSlotDomain(packageForm,dom) vectorRef(packageVec,i) := package package - table := HGET($Slot1DataBase,entry) or systemError nil + table := tableValue($Slot1DataBase,entry) or systemError nil (u := LASSQ(op,table)) and (v := or/[rest x for x in u | #sig = #x.0]) => packageForm := [entry,'$,:rest cat] diff --git a/src/interp/profile.boot b/src/interp/profile.boot index f59297f0..78afa963 100644 --- a/src/interp/profile.boot +++ b/src/interp/profile.boot @@ -49,8 +49,8 @@ profileTran alist == for [opSig,:info] in alist repeat op := opOf opSig sig := KAR KDR opSig - tableValue($profileHash,op) := [[sig,:info],:HGET($profileHash,op)] - [[key,:HGET($profileHash,key)] for key in mySort HKEYS $profileHash] + tableValue($profileHash,op) := [[sig,:info],:tableValue($profileHash,op)] + [[key,:tableValue($profileHash,key)] for key in mySort HKEYS $profileHash] profileRecord(label,name,info) == --name: info is var: type or op: sig --$profileAlist is ((op . alist1) ...) where diff --git a/src/interp/scan.boot b/src/interp/scan.boot index 8afc4ba6..8b49fa4a 100644 --- a/src/interp/scan.boot +++ b/src/interp/scan.boot @@ -619,10 +619,10 @@ scanError()== lferror($ln.n) keyword st == - HGET(scanKeyTable,st) + tableValue(scanKeyTable,st) keyword? st == - not null HGET(scanKeyTable,st) + not null tableValue(scanKeyTable,st) subMatch(l,i) == substringMatch(l,scanDict,i) diff --git a/src/interp/slam.boot b/src/interp/slam.boot index 8afcb904..e46f6bcd 100644 --- a/src/interp/slam.boot +++ b/src/interp/slam.boot @@ -218,7 +218,7 @@ reportFunctionCacheAll(op,nam,argl,body) == if null argl then g1:=nil cacheName:= mkCacheName nam g2:= gensym() --value computed by calling function - secondPredPair:= [['%store,g2,["HGET",['%dynval,MKQ cacheName],g1]],g2] + secondPredPair:= [['%store,g2,["tableValue",['%dynval,MKQ cacheName],g1]],g2] thirdPredPair:= ['%otherwise,["HPUT",['%dynval,MKQ cacheName],g1,computeValue]] codeBody:= ["PROG",[g2],["RETURN",['%when,secondPredPair,thirdPredPair]]] lamex:= ["LAM",arg,codeBody] @@ -237,7 +237,7 @@ reportFunctionCacheAll(op,nam,argl,body) == nam hashCount table == - +/[ADD1 nodeCount HGET(table,key) for key in HKEYS table] + +/[ADD1 nodeCount tableValue(table,key) for key in HKEYS table] mkCircularAlist n == l:= [[$failed,:$failed] for i in 1..n] @@ -324,7 +324,7 @@ compileRecurrenceRelation(op,nam,argl,junk,[body,sharpArg,n,:initCode]) == initialResetCode := null extraArguments => nil [["%LET",stateVar,['%or, - ["HGET",stateVar,extraArgumentCode], + ["tableValue",stateVar,extraArgumentCode], ["HPUT",stateVar,extraArgumentCode,tripleCode]]]] mbody := diff --git a/src/interp/sys-utility.boot b/src/interp/sys-utility.boot index 60660ae1..162ab40c 100644 --- a/src/interp/sys-utility.boot +++ b/src/interp/sys-utility.boot @@ -277,7 +277,7 @@ hashTable cmp == minimalise x == min(x,hashTable 'EQUAL) where min(x,ht) == - y := HGET(ht,x) + y := tableValue(ht,x) y => y cons? x => z := min(first x,ht) @@ -292,7 +292,7 @@ minimalise x == string? x => hashCheck(x,ht) x hashCheck(x,ht) == - y := HGET(ht,x) + y := tableValue(ht,x) y => y tableValue(ht,x) := x x diff --git a/src/interp/topics.boot b/src/interp/topics.boot index fbd61ffc..36459714 100644 --- a/src/interp/topics.boot +++ b/src/interp/topics.boot @@ -88,7 +88,7 @@ mkTopicHashTable() == --given $groupAssoc = ((extended . $defaultsHash := hashTable 'EQ --keys are ops, value is list of topic names for [kind,:items] in $topicsDefaults repeat --$topicsDefaults is ((<topic> op ...) ..) for item in items repeat - tableValue($defaultsHash,item) := [kind,:HGET($defaultsHash,item)] + tableValue($defaultsHash,item) := [kind,:tableValue($defaultsHash,item)] $conTopicHash := hashTable 'EQL --key is constructor name; value is instream := inputTextFile '"topics.data" while not EOFP instream repeat @@ -115,16 +115,16 @@ mkTopicHashTable() == --given $groupAssoc = ((extended . --store under each construct an OR of all codes for con in HKEYS $conTopicHash repeat conCode := 0 - for pair in HGET($conTopicHash,con) repeat + for pair in tableValue($conTopicHash,con) repeat pair.rest := code := topicCode rest pair conCode := LOGIOR(conCode,code) tableValue($conTopicHash,con) := - [['constructor,:conCode],:HGET($conTopicHash,con)] + [['constructor,:conCode],:tableValue($conTopicHash,con)] SHUT instream --reduce integers stored under names to 1 + its power of 2 for key in HKEYS $topicHash repeat - tableValue($topicHash,key) := INTEGER_-LENGTH HGET($topicHash,key) + tableValue($topicHash,key) := INTEGER_-LENGTH tableValue($topicHash,key) $conTopicHash --keys are ops or 'constructor', values are codes @@ -144,7 +144,7 @@ string2OpAlist s == acc getDefaultProps name == - u := HGET($defaultsHash,name) + u := tableValue($defaultsHash,name) if stringChar(s := symbolName name,m := maxIndex s) = char "?" then u := ['p,:u] if stringChar(s,m) = char "!" then u := ['destructive,:u] u @@ -165,7 +165,7 @@ topicCode lst == bitIndexList := nil for x in removeDuplicates u repeat bitIndexList := [fn x,:bitIndexList] where fn x == - k := HGET($topicHash,x) => k + k := tableValue($topicHash,x) => k tableValue($topicHash,x) := $topicIndex := $topicIndex * 2 $topicIndex code := +/[i for i in bitIndexList] @@ -175,7 +175,7 @@ topicCode lst == --======================================================================= --called to modify DOCUMENTATION property for each "con" addTopic2Documentation(con,docAlist) == - alist := HGET($conTopicHash,con) or return docAlist + alist := tableValue($conTopicHash,con) or return docAlist [y for x in docAlist] where y() == [op,:pairlist] := x code := LASSOC(op,alist) or 0 @@ -189,36 +189,36 @@ addTopic2Documentation(con,docAlist) == --======================================================================= td con == $topicClasses := ASSOCRIGHT mySort - [[HGET($topicHash,key),:key] for key in HKEYS $topicHash] + [[tableValue($topicHash,key),:key] for key in HKEYS $topicHash] hash := hashTable 'EQ tdAdd(con,hash) tdPrint hash tdAdd(con,hash) == - v := HGET($conTopicHash,con) + v := tableValue($conTopicHash,con) u := addTopic2Documentation(con,v) --u := getConstructorDocumentationFromDB con for pair in u | integer? (code := myLastAtom pair) and (op := first pair) ~= 'construct repeat for x in (names := code2Classes code) repeat - tableValue(hash,x) := insert(op,HGET(hash,x)) + tableValue(hash,x) := insert(op,tableValue(hash,x)) tdPrint hash == for key in mySort HKEYS hash repeat sayBrightly [key,'":"] sayBrightlyNT '" " - for x in HGET(hash,key) repeat sayBrightlyNT ['" ",x] + for x in tableValue(hash,key) repeat sayBrightlyNT ['" ",x] TERPRI() topics con == --assumes that DOCUMENTATION property already has #s added $topicClasses := ASSOCRIGHT mySort - [[HGET($topicHash,key),:key] for key in HKEYS $topicHash] + [[tableValue($topicHash,key),:key] for key in HKEYS $topicHash] hash := hashTable 'EQ tdAdd(con,hash) for x in removeDuplicates [CAAR y for y in ancestorsOf(getConstructorForm con,nil)] repeat tdAdd(x,hash) for x in HKEYS hash repeat - tableValue(hash,x) := mySort HGET(hash,x) + tableValue(hash,x) := mySort tableValue(hash,x) tdPrint hash code2Classes cc == @@ -248,7 +248,7 @@ transferCodeCon(con,opAlist) == --======================================================================= filterByTopic(opAlist,topic) == - bitNumber := HGET($topicHash,topic) + bitNumber := tableValue($topicHash,topic) [x for x in opAlist | integer? (code := myLastAtom x) and LOGBITP(bitNumber,code)] @@ -257,5 +257,5 @@ listOfTopics(conname) == u := ASSOC('constructor,doc) or return nil code := myLastAtom u --not integer? code => nil - mySort [key for key in HKEYS($topicHash) | LOGBITP(HGET($topicHash,key),code)] + mySort [key for key in HKEYS($topicHash) | LOGBITP(tableValue($topicHash,key),code)] diff --git a/src/interp/trace.boot b/src/interp/trace.boot index dc1874f1..4fbac122 100644 --- a/src/interp/trace.boot +++ b/src/interp/trace.boot @@ -542,7 +542,7 @@ traceDomainConstructor(domainConstructor,options) == traceDomainLocalOps(domainConstructor,listOfLocalOps, [opt for opt in options | opt isnt ['LOCAL,:.]]) listOfLocalOps and not getOption("OPS",options) => nil - for [argl,.,:domain] in HGET($ConstructorCache,domainConstructor) + for [argl,.,:domain] in tableValue($ConstructorCache,domainConstructor) repeat spadTrace(domain,options) SETQ(_/TRACENAMES,[domainConstructor,:_/TRACENAMES]) innerDomainConstructor := makeSymbol strconc(domainConstructor,'";") diff --git a/src/interp/word.boot b/src/interp/word.boot index 576e3035..b0b5f5e5 100644 --- a/src/interp/word.boot +++ b/src/interp/word.boot @@ -43,11 +43,11 @@ buildWordTable u == table:= hashTable 'EQ for s in u repeat key := charUpcase stringChar(s,0) - tableValue(table,key) := [[s,:wordsOfString s],:HGET(table,key)] + tableValue(table,key) := [[s,:wordsOfString s],:tableValue(table,key)] for key in HKEYS table repeat tableValue(table,key) := listSort(function GLESSEQP,removeDupOrderedAlist - listSort(function GLESSEQP, HGET(table,key),function first), + listSort(function GLESSEQP, tableValue(table,key),function first), function second) table @@ -67,7 +67,7 @@ writeFunctionTable(filemode,name,dicts) == if not $functionTable then $functionTable:= buildFunctionTable dicts for key in HKEYS $functionTable repeat - rwrite(object2Identifier key,HGET($functionTable,key),stream) + rwrite(object2Identifier key,tableValue($functionTable,key),stream) RSHUT stream 'done @@ -132,8 +132,8 @@ isBreakCharacter x == null SMALL__LITER x add2WordFunctionTable fn == --called from DEF $functionTable and - null LASSOC(s := PNAME fn,HGET($functionTable,(key := UPCASE s.0))) => - tableValue($functionTable,key) := [[s,:wordsOfString s],:HGET($functionTable,key)] + null LASSOC(s := PNAME fn,tableValue($functionTable,(key := UPCASE s.0))) => + tableValue($functionTable,key) := [[s,:wordsOfString s],:tableValue($functionTable,key)] --======================================================================= -- Guess Function Name @@ -198,9 +198,9 @@ bootSearch word == hasWildCard? key => pattern := patternTran key -- converts * to & pattern.0 ~= char "&" => - [x for [x,:.] in HGET($functionTable,UPCASE pattern.0)| + [x for [x,:.] in tableValue($functionTable,UPCASE pattern.0)| match?(pattern,COPY x)] - "append"/[[x for [x,:.] in HGET($functionTable,k)| match?(pattern,COPY x)] + "append"/[[x for [x,:.] in tableValue($functionTable,k)| match?(pattern,COPY x)] for k in HKEYS $functionTable] findApproximateWords(PNAME word,$functionTable) list @@ -212,7 +212,7 @@ findApproximateWords(word,table) == threshold:= n = 1 => 3 4 - alist:= HGET(table,UPCASE word.0) + alist:= tableValue(table,UPCASE word.0) --first try to break up as list of words firstTry := [x for [x,:wordList] in alist | p] where p == |