aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2011-11-09 14:16:25 +0000
committerdos-reis <gdr@axiomatics.org>2011-11-09 14:16:25 +0000
commitc684b87671ae86f1697e3d86d8cea7952fe777a3 (patch)
treee811df89d4a79759036bb75315c93bbb56bc52d6
parent2a7a7e349eb557f49e865d8ecf47aca4d0fd49dd (diff)
downloadopen-axiom-c684b87671ae86f1697e3d86d8cea7952fe777a3.tar.gz
* interp/define.boot (compDefineFunctor1): Clear dbTemplate before
compilation starts. * interp/lisplib.boot (writeLoadInfo): New. (writeTemplate): Likewise. (finalizeLisplib): Use it to write template.
-rw-r--r--src/ChangeLog8
-rw-r--r--src/interp/define.boot1
-rw-r--r--src/interp/lisplib.boot18
3 files changed, 26 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index e72ac886..b69f0ed2 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,11 @@
+2011-11-09 Gabriel Dos Reis <gdr@cse.tamu.edu>
+
+ * interp/define.boot (compDefineFunctor1): Clear dbTemplate before
+ compilation starts.
+ * interp/lisplib.boot (writeLoadInfo): New.
+ (writeTemplate): Likewise.
+ (finalizeLisplib): Use it to write template.
+
2011-11-08 Gabriel Dos Reis <gdr@cs.tamu.edu>
* interp/define.boot (compFunctorBody): First argument is now a DB.
diff --git a/src/interp/define.boot b/src/interp/define.boot
index 72014231..873ee80e 100644
--- a/src/interp/define.boot
+++ b/src/interp/define.boot
@@ -1381,6 +1381,7 @@ compDefineFunctor1(df is ['DEF,form,signature,body],
dbConstructorForm(db) := form
dbCompilerData(db) := makeCompilationData()
dbFormalSubst(db) := pairList(form.args,$FormalMapVariableList)
+ dbTemplate(db) := nil
deduceImplicitParameters(db,$e)
$formalArgList:= [:argl,:$formalArgList]
-- all defaulting packages should have caching turned off
diff --git a/src/interp/lisplib.boot b/src/interp/lisplib.boot
index 9866b245..9449eff4 100644
--- a/src/interp/lisplib.boot
+++ b/src/interp/lisplib.boot
@@ -469,7 +469,22 @@ writeInfo(ctor,info,key,prop,file) ==
insn := ['%store,[prop,mkCtorDBForm ctor],quote info]
LAM_,FILEACTQ(key,expandToVMForm insn)
lisplibWrite(symbolName key,info,file)
-
+
+++ Like writeInfo, but only write to the load unit.
+writeLoadInfo(ctor,info,key,prop,file) ==
+ info = nil => nil
+ insn := ['%store,[prop,mkCtorDBForm ctor],info]
+ LAM_,FILEACTQ(key,expandToVMForm insn)
+
+literalData x ==
+ x = nil => nil
+ quote x
+
+writeTemplate(db,file) ==
+ dbConstructorKind db = 'category => nil
+ writeLoadInfo(dbConstructor db,literalData dbTemplate db,
+ 'template,'dbTemplate,file)
+
writeKind(ctor,kind,file) ==
writeInfo(ctor,kind,'constructorKind,'dbConstructorKind,file)
@@ -525,6 +540,7 @@ finalizeLisplib(ctor,libName) ==
kind := dbConstructorKind db
form := dbConstructorForm db
mm := getConstructorModemap ctor
+ writeTemplate(db,$libFile)
writeConstructorForm(ctor,form,$libFile)
writeKind(ctor,kind,$libFile)
writeConstructorModemap(ctor,mm,$libFile)