diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/ChangeLog | 10 | ||||
-rw-r--r-- | src/interp/br-data.boot | 4 | ||||
-rw-r--r-- | src/interp/define.boot | 12 | ||||
-rw-r--r-- | src/interp/lisplib.boot | 4 |
4 files changed, 18 insertions, 12 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index e588c073..6dfeef52 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,13 @@ +2011-10-28 Gabriel Dos Reis <gdr@cs.tamu.edu> + + * interp/define.boot ($lisplibCategory): Remove. + (compDefineCategory1): Adjust. + (compDefineCategory2): Likewise. + (compDefineCategory): Likewise. + (compDefineFunctor1): Likewise. + * interp/lisplib.boot (finalizeLisplib): Likewise. + * interp/br-data.boot (getParentsFor): Lose last paramater. + 2011-10-27 Gabriel Dos Reis <gdr@cs.tamu.edu> * interp/sys-globals.boot ($lisplibModemapAlist): Remove. diff --git a/src/interp/br-data.boot b/src/interp/br-data.boot index 204db22a..0837c709 100644 --- a/src/interp/br-data.boot +++ b/src/interp/br-data.boot @@ -493,12 +493,12 @@ getImports conname == --called by mkUsersHashTable --============================================================================ -- Get Hierarchical Information --============================================================================ -getParentsFor(db,formalParams,constructorCategory) == +getParentsFor(db,formalParams) == --called by compDefineFunctor1 acc := nil formals := TAKE(#formalParams,$TriangleVariableList) constructorForm := dbConstructorForm db - for x in folks constructorCategory repeat + for x in folks dbCategory db repeat x := applySubst(pairList(formals,formalParams),x) x := applySubst(pairList(formalParams,IFCDR constructorForm),x) acc := [:explodeIfs x,:acc] diff --git a/src/interp/define.boot b/src/interp/define.boot index d135d4ef..99035a03 100644 --- a/src/interp/define.boot +++ b/src/interp/define.boot @@ -66,7 +66,6 @@ $forceAdd := false $functionStats := nil $functorStats := nil -$lisplibCategory := nil $CheckVectorList := [] $pairlis := [] $functorTarget := nil @@ -940,7 +939,7 @@ compDefineCategory1(df is ['DEF,form,sig,body],m,e,prefix,fal) == if not skipCategoryPackage? categoryCapsule then [.,.,e] := $insideCategoryPackageIfTrue: local := true $categoryPredicateList: local := - makeCategoryPredicates(form,$lisplibCategory) + makeCategoryPredicates(form,dbCategory constructorDB form.op) T := compDefine1(mkCategoryPackage(form,cat,categoryCapsule),$EmptyMode,e) or return stackSemanticError( ['"cannot compile defaults of",:bright opOf form],nil) @@ -1046,6 +1045,7 @@ compDefineCategory2(form,signature,body,m,e,$prefix,$formalArgList) == -- following line causes cats with no with or Join to be fresh copies if opOf(formalBody)~='Join and opOf(formalBody)~='mkCategory then formalBody := ['Join, formalBody] + dbCategory(db) := formalBody body := optFunctorBody compOrCroak(formalBody,signature'.target,e).expr if $extraParms ~= nil then formals := nil @@ -1073,8 +1073,7 @@ compDefineCategory2(form,signature,body,m,e,$prefix,$formalArgList) == dbDualSignature(db) := [isCategoryForm(t,e) for t in dbConstructorModemap(db).mmSource] dbDualSignature(db) := [true,:dbDualSignature db] - $lisplibCategory:= formalBody - dbPrincipals(db) := getParentsFor(db,$FormalMapVariableList,$lisplibCategory) + dbPrincipals(db) := getParentsFor(db,$FormalMapVariableList) dbAncestors(db) := computeAncestorsOf($form,nil) dbModemaps(db) := modemapsFromCategory([op',:sargl],formalBody,signature') dbBeingDefined?(db) := false @@ -1088,7 +1087,6 @@ mkConstructor form == compDefineCategory(df,m,e,prefix,fal) == $domainShell: local := nil -- holds the category of the object being compiled - $lisplibCategory: local := nil -- since we have so many ways to say state the kind of a constructor, -- make sure we do have some minimal internal coherence. lhs := second df @@ -1405,6 +1403,7 @@ compDefineFunctor1(df is ['DEF,form,signature,body], -- 3. give operator a 'modemap property modemap := [[parForm,:parSignature],[true,$op]] dbConstructorModemap(db) := modemap + dbCategory(db) := modemap.mmTarget dbDualSignature(db) := [isCategoryForm(t,$e) for t in modemap.mmSource] dbDualSignature(db) := [false,:dbDualSignature db] @@ -1443,8 +1442,7 @@ compDefineFunctor1(df is ['DEF,form,signature,body], reportOnFunctorCompilation() -- 5. - $lisplibCategory := modemap.mmTarget - dbPrincipals(db) := getParentsFor(db,$FormalMapVariableList,$lisplibCategory) + dbPrincipals(db) := getParentsFor(db,$FormalMapVariableList) dbAncestors(db) := computeAncestorsOf($form,nil) $insideFunctorIfTrue:= false if not $bootStrapMode then diff --git a/src/interp/lisplib.boot b/src/interp/lisplib.boot index f8cf0867..d565a74e 100644 --- a/src/interp/lisplib.boot +++ b/src/interp/lisplib.boot @@ -413,7 +413,6 @@ compDefineLisplib(df:=["DEF",[op,:.],:.],m,e,prefix,fal,fn) == $libFile: local := nil $lisplibVariableAlist: local := nil -- $lisplibRelatedDomains: local := nil --from ++ Related Domains: see c-doc - $lisplibCategory: local := nil --for categories, is rhs of definition; otherwise, is target of functor --will eventually become the "constructorCategory" property in lisplib --set in compDefineCategory1 if category, otherwise in finalizeLisplib @@ -526,11 +525,10 @@ finalizeLisplib(ctor,libName) == writeKind(ctor,kind,$libFile) writeConstructorModemap(ctor,mm,$libFile) writeDualSignature(db,$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 if dbConstructorKind db = 'category then - writeCategory(ctor,$lisplibCategory,$libFile) + writeCategory(ctor,dbCategory db,$libFile) lisplibWrite('"sourceFile",namestring _/EDITFILE,$libFile) lisplibWrite('"modemaps",dbModemaps db,$libFile) opsAndAtts := getConstructorOpsAndAtts(form,kind,mm) |