From c1bf697ff6bf2b914a40b3e867a84762cf214cf1 Mon Sep 17 00:00:00 2001 From: dos-reis Date: Mon, 22 Aug 2011 02:09:12 +0000 Subject: * interp/database.boot (getConstructorModemap): Rename from getConstructorModemapFromDB. Adjust callers. --- src/ChangeLog | 5 +++++ src/interp/br-con.boot | 2 +- src/interp/br-data.boot | 8 ++++---- src/interp/br-op1.boot | 6 +++--- src/interp/br-prof.boot | 2 +- src/interp/br-saturn.boot | 2 +- src/interp/br-search.boot | 2 +- src/interp/cattable.boot | 2 +- src/interp/daase.lisp | 6 +++--- src/interp/database.boot | 6 +++--- src/interp/define.boot | 11 +++++------ src/interp/g-util.boot | 2 +- src/interp/hashcode.boot | 2 +- src/interp/lisplib.boot | 19 +++++++++---------- src/interp/sys-globals.boot | 3 --- 15 files changed, 39 insertions(+), 39 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index ea06021f..3f40dda5 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2011-08-21 Gabriel Dos Reis + + * interp/database.boot (getConstructorModemap): Rename from + getConstructorModemapFromDB. Adjust callers. + 2011-08-21 Gabriel Dos Reis * interp/database.boot (niladicConstructor?): Rename from diff --git a/src/interp/br-con.boot b/src/interp/br-con.boot index 6eafe370..f2b87dd3 100644 --- a/src/interp/br-con.boot +++ b/src/interp/br-con.boot @@ -131,7 +131,7 @@ kArgPage(htPage,arg) == [op,:args] := conform := htpProperty(htPage,'conform) domname := htpProperty(htPage,'domname) heading := htpProperty(htPage,'heading) - source := getConstructorModemapFromDB(op).mmSource + source := getConstructorModemap(op).mmSource n := position(arg,args) typeForm := sublisFormal(args,source . n) domTypeForm := mkDomTypeForm(typeForm,conform,domname) diff --git a/src/interp/br-data.boot b/src/interp/br-data.boot index 29c3d534..b11b2adf 100644 --- a/src/interp/br-data.boot +++ b/src/interp/br-data.boot @@ -94,7 +94,7 @@ buildLibdb(:options) == --called by buildDatabase (database.boot) removeFile '"temp.text" buildLibdbConEntry conname == - null getConstructorModemapFromDB conname => nil + null getConstructorModemap conname => nil abb:= getConstructorAbbreviationFromDB conname $conname := conname conform := getConstructorFormFromDB conname or [conname] --hack for Category,.. @@ -104,7 +104,7 @@ buildLibdbConEntry conname == $doc := getConstructorDocumentationFromDB conname kind := getConstructorKindFromDB conname if kind = 'domain - and getConstructorModemapFromDB conname is [[.,t,:.],:.] + and getConstructorModemap conname is [[.,t,:.],:.] and t is ['CATEGORY,'package,:.] then kind := 'package $kind := isDefaultPackageName conname => 'x @@ -126,7 +126,7 @@ buildLibdbString [x,:u] == strconc(STRINGIMAGE x,strconc/[strconc('"`",STRINGIMAGE y) for y in u]) libConstructorSig [conname,:argl] == - [[.,:sig],:.] := getConstructorModemapFromDB conname + [[.,:sig],:.] := getConstructorModemap conname formals := TAKE(#argl,$FormalMapVariableList) sig := applySubst(pairList($TriangleVariableList,formals),sig) keys := [g(f,sig,i) for f in formals for i in 1..] where @@ -449,7 +449,7 @@ mkDependentsHashTable() == --called by buildDatabase (database.boot) $depTb getArgumentConstructors con == --called by mkDependentsHashTable - argtypes := IFCDR IFCAR getConstructorModemapFromDB con or return nil + argtypes := IFCDR IFCAR getConstructorModemap con or return nil fn argtypes where fn(u) == "union"/[gn x for x in u] gn(x) == diff --git a/src/interp/br-op1.boot b/src/interp/br-op1.boot index 5fbe9418..72f65fa4 100644 --- a/src/interp/br-op1.boot +++ b/src/interp/br-op1.boot @@ -223,7 +223,7 @@ conform2StringList(form,opFn,argFn,exception) == rest getDualSignatureFromDB op atypes := special => cosig - getConstructorModemapFromDB(op).mmSource + getConstructorModemap(op).mmSource sargl := [fn for x in args for atype in atypes for pred in cosig] where fn() == keyword := x is [":",y,t] => @@ -267,7 +267,7 @@ dbOuttran form == op := form args := nil cosig := rest getDualSignatureFromDB op - atypes := getConstructorModemapFromDB(op).mmSource + atypes := getConstructorModemap(op).mmSource argl := [fn for x in args for atype in atypes for pred in cosig] where fn() == pred => x typ := sublisFormal(args,atype) @@ -891,7 +891,7 @@ evalableConstructor2HtString domform == f is 'QUOTE => first args [f,:[unquote x for x in args]] arg - fargtypes := getConstructorModemapFromDB(conname).mmSource + fargtypes := getConstructorModemap(conname).mmSource --argtypes:= sublisFormal(arglist,fargtypes) form2HtString([conname,:[fn for arg in arglist for x in coSig for ftype in fargtypes]],nil,true) where diff --git a/src/interp/br-prof.boot b/src/interp/br-prof.boot index 5b8d9113..c626ba23 100644 --- a/src/interp/br-prof.boot +++ b/src/interp/br-prof.boot @@ -78,7 +78,7 @@ dbShowInfoOp(htPage,op,sig,alist) == kind = 'category => [makeDefaultPackageName symbolName conname,"$",:rest conform] conform - faTypes := getConstructorModemapFromDB(conname).mmSource + faTypes := getConstructorModemap(conname).mmSource conArgTypes := applySubst(pairList($FormalMapVariableList,IFCDR conform),faTypes) diff --git a/src/interp/br-saturn.boot b/src/interp/br-saturn.boot index 49b5d54c..1cfb4703 100644 --- a/src/interp/br-saturn.boot +++ b/src/interp/br-saturn.boot @@ -1231,7 +1231,7 @@ displayDomainOp(htPage,which,origin,op,sig,predicate, if which = '"operation" then $signature : local := builtinFunctorName? conname => nil - getConstructorModemapFromDB(conname).mmSignature + getConstructorModemap(conname).mmSignature --RDJ: this next line is necessary until compiler bug is fixed --that forgets to substitute #variables for t#variables; --check the signature for SegmentExpansionCategory, e.g. diff --git a/src/interp/br-search.boot b/src/interp/br-search.boot index aa1d3cbe..7ee5c8ca 100644 --- a/src/interp/br-search.boot +++ b/src/interp/br-search.boot @@ -318,7 +318,7 @@ conform2OutputForm(form) == [op,:args] := form null args => form cosig := rest getDualSignatureFromDB op - atypes := getConstructorModemapFromDB(op).mmSource + atypes := getConstructorModemap(op).mmSource sargl := [fn for x in args for atype in atypes for pred in cosig] where fn() == pp [x,atype,pred] pred => conform2OutputForm x diff --git a/src/interp/cattable.boot b/src/interp/cattable.boot index 298e6c56..247caee3 100644 --- a/src/interp/cattable.boot +++ b/src/interp/cattable.boot @@ -203,7 +203,7 @@ genTempCategoryTable() == addToCategoryTable con == -- adds an entry to $tempCategoryTable with key=con and alist entries - u := getConstructorModemapFromDB(con).mmDC --domain + u := getConstructorModemap(con).mmDC --domain alist := getCategoryExtensionAlist u tableValue(_*ANCESTORS_-HASH_*,first u) := alist alist diff --git a/src/interp/daase.lisp b/src/interp/daase.lisp index 4ec36c16..334e444d 100644 --- a/src/interp/daase.lisp +++ b/src/interp/daase.lisp @@ -451,7 +451,7 @@ |Variable| |Vector|)) (dolist (con constructormodemapAndoperationalist) - (|getConstructorModemapFromDB| con) + (|getConstructorModemap| con) (|getConstructorOperationsFromDB| con)) (setq operation '(|+| |-| |*| |/| |**| @@ -725,7 +725,7 @@ (format t "~a: ~a~%" 'operation (|getOperationFromDB| constructor)) (format t "~a: ~%" 'constructormodemap) - (pprint (|getConstructorModemapFromDB| constructor)) + (pprint (|getConstructorModemap| constructor)) (format t "~&~a: ~%" 'constructorcategory) (pprint (|getConstructorCategoryFromDB| constructor)) (format t "~&~a: ~%" 'operationalist) @@ -820,7 +820,7 @@ (when (setq struct (|constructorDB| constructor)) (setq data (database-constructorcategory struct)) (when (null data) ;domain or package then subfield of constructormodemap - (setq data (cadar (|getConstructorModemapFromDB| constructor)))))) + (setq data (cadar (|getConstructorModemap| constructor)))))) (operationalist (setq stream *interp-stream*) (when (setq struct (|constructorDB| constructor)) diff --git a/src/interp/database.boot b/src/interp/database.boot index e4245440..d29882a2 100644 --- a/src/interp/database.boot +++ b/src/interp/database.boot @@ -77,9 +77,9 @@ getConstructorAncestorsFromDB ctor == ++ return the modemap of the constructor or the instantiation ++ of the constructor `form'. -getConstructorModemapFromDB: %Constructor -> %Mode -getConstructorModemapFromDB form == - GETDATABASE(opOf form, 'CONSTRUCTORMODEMAP) +getConstructorModemap: %Constructor -> %Mode +getConstructorModemap ctor == + GETDATABASE(ctor, 'CONSTRUCTORMODEMAP) getConstructorFormFromDB: %Constructor -> %Form getConstructorFormFromDB ctor == diff --git a/src/interp/define.boot b/src/interp/define.boot index f833e7cb..b400eb54 100644 --- a/src/interp/define.boot +++ b/src/interp/define.boot @@ -542,7 +542,7 @@ getExportCategory form == op is 'Union => ['UnionCategory,:argl] op is 'Enumeration => ['EnumerationCategory,:argl] op is 'Mapping => ['MappingCategory,:argl] - [[.,target,:tl],:.] := getConstructorModemapFromDB op + [[.,target,:tl],:.] := getConstructorModemap op applySubst(pairList($FormalMapVariableList,argl),target) NRTextendsCategory1(domform,exCategory,addForm,env) == @@ -1048,10 +1048,9 @@ compDefineCategory2(form,signature,specialCases,body,m,e, -- 6. put modemaps into InteractiveModemapFrame $domainShell := eval [op',:[MKQ f for f in sargl]] + dbConstructorModemap(constructorDB op') := [[parForm,:parSignature],[true,op']] $lisplibCategory:= formalBody if $LISPLIB then - modemap:= [[parForm,:parSignature],[true,op']] - $lisplibModemap:= modemap $lisplibParents := getParentsFor($op,$FormalMapVariableList,$lisplibCategory) $lisplibAncestors := computeAncestorsOf($form,nil) @@ -1437,9 +1436,9 @@ compDefineFunctor1(df is ['DEF,form,signature,nils,body], reportOnFunctorCompilation() -- 5. give operator a 'modemap property + modemap := [[parForm,:parSignature],[true,op']] + dbConstructorModemap(constructorDB op') := modemap if $LISPLIB then - modemap:= [[parForm,:parSignature],[true,op']] - $lisplibModemap:= modemap $lisplibCategory := modemap.mmTarget $lisplibParents := getParentsFor($op,$FormalMapVariableList,$lisplibCategory) @@ -1454,7 +1453,7 @@ compDefineFunctor1(df is ['DEF,form,signature,nils,body], $lisplibFunctionLocations := applySubst($pairlis,$functionLocations) libFn := getConstructorAbbreviationFromDB op' $lookupFunction: local := - NRTgetLookupFunction($functorForm,$lisplibModemap.mmTarget,$NRTaddForm,$e) + NRTgetLookupFunction($functorForm,modemap.mmTarget,$NRTaddForm,$e) --either lookupComplete (for forgetful guys) or lookupIncomplete $byteAddress :local := 0 $byteVec :local := nil diff --git a/src/interp/g-util.boot b/src/interp/g-util.boot index 53926f37..2efeff70 100644 --- a/src/interp/g-util.boot +++ b/src/interp/g-util.boot @@ -238,7 +238,7 @@ get1(x,prop,e) == get2(x,prop) == prop="modemap" and ident? x and constructor? x => - (u := getConstructorModemapFromDB x) => [u] + (u := getConstructorModemap x) => [u] nil nil diff --git a/src/interp/hashcode.boot b/src/interp/hashcode.boot index 0368d4bb..c88c326f 100644 --- a/src/interp/hashcode.boot +++ b/src/interp/hashcode.boot @@ -74,7 +74,7 @@ hashType(type, percentHash) == hash := hashCombine(hashType(arg, percentHash), hash) hash - cmm := getConstructorModemapFromDB(op).mmSource + cmm := getConstructorModemap(op).mmSource cosig := rest getDualSignatureFromDB op for arg in args for c in cosig for ct in cmm repeat if c then diff --git a/src/interp/lisplib.boot b/src/interp/lisplib.boot index 4fbf05db..9d08f95d 100644 --- a/src/interp/lisplib.boot +++ b/src/interp/lisplib.boot @@ -320,7 +320,7 @@ loadLib cname == clearConstructorCache cname updateDatabase(cname,cname,systemdir?) installConstructor(cname,kind) - u := getConstructorModemapFromDB cname + u := getConstructorModemap cname updateCategoryTable(cname,kind) coSig := u => @@ -374,14 +374,14 @@ convertOpAlist2compilerInfo(opalist) == updateCategoryFrameForConstructor(constructor) == opAlist := getConstructorOperationsFromDB constructor - [[dc,:sig],[pred,impl]] := getConstructorModemapFromDB constructor + [[dc,:sig],[pred,impl]] := getConstructorModemap constructor $CategoryFrame := put(constructor,'isFunctor, convertOpAlist2compilerInfo(opAlist), addModemap(constructor, dc, sig, pred, impl, put(constructor, 'mode, ['Mapping,:sig], $CategoryFrame))) updateCategoryFrameForCategory(category) == - [[dc,:sig],[pred,impl]] := getConstructorModemapFromDB category + [[dc,:sig],[pred,impl]] := getConstructorModemap category $CategoryFrame := put(category, 'isCategory, 'T, addModemap(category, dc, sig, pred, impl, $CategoryFrame)) @@ -439,7 +439,6 @@ compConLib1(fun,infileOrNil,outfileOrNil,auxOp,editFlag,traceFlag) == $lisplibPredicates: local := nil $lisplibParents: local := nil $lisplibAncestors: local := nil - $lisplibModemap: local := nil $lisplibModemapAlist: local := nil $lisplibSlot1 : local := nil --used by NRT mechanisms $lisplibOperationAlist: local := nil @@ -468,7 +467,6 @@ compDefineLisplib(df:=["DEF",[op,:.],:.],m,e,prefix,fal,fn) == $lisplibPredicates: local := nil -- set by makePredicateBitVector $lisplibParents: local := nil $lisplibAncestors: local := nil - $lisplibModemap: local := nil $lisplibModemapAlist: local := nil $lisplibSlot1 : local := nil -- used by NRT mechanisms $lisplibOperationAlist: local := nil @@ -571,16 +569,17 @@ leaveIfErrors(libName,kind) == finalizeLisplib(ctor,libName) == kind := dbConstructorKind constructorDB ctor form := dbConstructorForm constructorDB ctor + mm := getConstructorModemap ctor writeConstructorForm(ctor,form,$libFile) writeKind(ctor,kind,$libFile) - writeConstructorModemap(ctor,removeZeroOne $lisplibModemap,$libFile) - $lisplibCategory := $lisplibCategory or $lisplibModemap.mmTarget - -- set to target of modemap for package/domain constructors; + writeConstructorModemap(ctor,removeZeroOne mm,$libFile) + $lisplibCategory := $lisplibCategory or mm.mmTarget + -- set to target of mm for package/domain constructors; -- to the right-hand sides (the definition) for category constructors lisplibWrite('"constructorCategory",$lisplibCategory,$libFile) lisplibWrite('"sourceFile",namestring _/EDITFILE,$libFile) lisplibWrite('"modemaps",removeZeroOne $lisplibModemapAlist,$libFile) - opsAndAtts := getConstructorOpsAndAtts(form,kind,$lisplibModemap) + opsAndAtts := getConstructorOpsAndAtts(form,kind,mm) writeOperations(ctor,removeZeroOne first opsAndAtts,$libFile) if kind='category then $pairlis : local := pairList(form,$FormalMapVariableList) @@ -755,7 +754,7 @@ findDomainSlotNumber(domain,op,sig) == --using slot 1 of the domain getConstructorSignature: %Symbol -> %Form getConstructorSignature ctor == - ([[.,:sig],:.] := getConstructorModemapFromDB ctor) => sig + ([[.,:sig],:.] := getConstructorModemap ctor) => sig -- If we have a local or forward declaration take it. -- Note: constructors are not overloadable. rest getmode(ctor,$e) diff --git a/src/interp/sys-globals.boot b/src/interp/sys-globals.boot index e0ea10f5..e2f7bd5d 100644 --- a/src/interp/sys-globals.boot +++ b/src/interp/sys-globals.boot @@ -169,9 +169,6 @@ $libFile := nil ++ $lisplibModemapAlist := [] -++ -$lisplibModemap := nil - ++ $lisplibOperationAlist := [] -- cgit v1.2.3