diff options
-rw-r--r-- | src/ChangeLog | 9 | ||||
-rw-r--r-- | src/interp/c-doc.boot | 5 | ||||
-rw-r--r-- | src/interp/lisplib.boot | 31 |
3 files changed, 35 insertions, 10 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index c0525c47..ffc25246 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,12 @@ +2013-05-30 Gabriel Dos Reis <gdr@integrable-solutions.net> + + * interp/c-doc.boot (finalizeDocumentation): Take a DB parameter. + Adjust callers. + * interp/lisplib.boot (compileDocumentation): Likewise. + (writeSourceFile): New. + (writeInteractiveModemaps): Likewise. + (writeDocumentation): Likewise. + 2013-05-29 Gabriel Dos Reis <gdr@integrable-solutions.net> * interp/lisp-backend.boot (compileLispDefinition): Remove. diff --git a/src/interp/c-doc.boot b/src/interp/c-doc.boot index dc4868db..5c87a1ed 100644 --- a/src/interp/c-doc.boot +++ b/src/interp/c-doc.boot @@ -136,7 +136,8 @@ collectAndDeleteAssoc x == y.rest := s res -finalizeDocumentation ctor == +finalizeDocumentation db == + ctor := dbConstructor db unusedCommentLineNumbers := [x for (x := [n,:r]) in $COMBLOCKLIST | r] docList := substitute("$","%",transDocList($op,$docList)) if u := [sig for [sig,:doc] in docList | null doc] then @@ -178,7 +179,7 @@ finalizeDocumentation ctor == sayKeyedMsg("S2CD0006",[strconc(toString bigcnt,'"."),ctor]) for [n,r] in unusedCommentLineNumbers repeat sayMSG ['" ",:bright n,'" ",r] - form := dbConstructorForm constructorDB ctor + form := dbConstructorForm db hn [[:fn(sig,$e,form.args),:doc] for [sig,:doc] in docList] where fn(x,e,args) == x isnt [.,:.] => [x,nil] diff --git a/src/interp/lisplib.boot b/src/interp/lisplib.boot index b6924f39..74e54194 100644 --- a/src/interp/lisplib.boot +++ b/src/interp/lisplib.boot @@ -409,7 +409,7 @@ compDefineLisplib(db,df:=["DEF",[op,:.],:.],m,e,fal,fn) == libName := dbAbbreviation db if dbSourceFile db = nil then dbSourceFile(db) := namestring $editFile - $compileDocumentation => compileDocumentation(op,libName) + $compileDocumentation => compileDocumentation(db,libName) sayMSG ['" initializing ",$spadLibFT,:bright libName, '"for",:bright op] initializeLisplib(db,libName) @@ -433,11 +433,11 @@ compDefineLisplib(db,df:=["DEF",[op,:.],:.],m,e,fal,fn) == $newConlist := [op, :$newConlist] ----------> bound in function "compiler" res -compileDocumentation(ctor,libName) == - filename := makeInputFilename(libName,$spadLibFT) +compileDocumentation(db,libName) == + filename := libDirname dbLibstream db $FCOPY(filename,[libName,'DOCLB]) stream := RDEFIOSTREAM [['FILE,libName,'DOCLB],['MODE, :'O]] - lisplibWrite('"documentation",finalizeDocumentation ctor,stream) + lisplibWrite('"documentation",finalizeDocumentation db,stream) RSHUT(stream) RPACKFILE([libName,'DOCLB]) $REPLACE([libName,$spadLibFT],[libName,'DOCLB]) @@ -486,6 +486,22 @@ writeConstructorForm db == writeCategory db == writeInfo(db,dbCategory db,'constructorCategory,'dbCategory) +writeSourceFile db == + $buildingSystemAlgebra => + -- source file for system constructor is filled at runtime + -- to reflect the runtime location of the system directory. + lisplibWrite('"sourceFile",dbSourceFile db,dbLibstream db) + writeInfo(db,dbSourceFile db,'sourceFile,'dbSourceFile) + +writeInteractiveModemaps db == + -- Note: these are never used when building the system algebra. + -- But we need them when building the complete set of databases + writeInfo(db,dbModemaps db,'modemaps,'dbModemaps) + +writeDocumentation(db,doc) == + -- FIXME: Do we want to store documentation in object files? + lisplibWrite('"documentation",doc,dbLibstream db) + writeSuperDomain db == writeInfo(db,dbSuperDomain db,'superDomain,'dbSuperDomain) @@ -536,8 +552,8 @@ finalizeLisplib(db,libName) == -- to the right-hand sides (the definition) for category constructors if dbConstructorKind db = 'category then writeCategory db - lisplibWrite('"sourceFile",dbSourceFile db,dbLibstream db) - lisplibWrite('"modemaps",dbModemaps db,dbLibstream db) + writeSourceFile db + writeInteractiveModemaps db opsAndAtts := dbConstructorKind db = 'category => getCategoryOpsAndAtts db getFunctorOpsAndAtts db @@ -553,8 +569,7 @@ finalizeLisplib(db,libName) == writePrincipals db writeAncestors db if not $bootStrapMode then - lisplibWrite('"documentation", - finalizeDocumentation dbConstructor db,dbLibstream db) + writeDocumentation(db,finalizeDocumentation db) if $profileCompiler then profileWrite db leaveIfErrors(libName,dbConstructorKind db) true |