aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2008-04-12 08:36:47 +0000
committerdos-reis <gdr@axiomatics.org>2008-04-12 08:36:47 +0000
commite94336c0a8c400d3aae923dfd9615751b2b65923 (patch)
treeca75b4587897b0bbda2e18974e1229c74ba9c4d1 /src
parent7e086ab1ad79547dc9c93e56f38d0834c9f0080c (diff)
downloadopen-axiom-e94336c0a8c400d3aae923dfd9615751b2b65923.tar.gz
* interp/compiler.boot: Register compiler for Enumeration
instantiations. * interp/modemap.boot (compCat): Move to compiler.boot.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog6
-rw-r--r--src/interp/compiler.boot23
-rw-r--r--src/interp/modemap.boot10
3 files changed, 25 insertions, 14 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 7298ed24..98f67f86 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,9 @@
+2008-04-11 Gabriel Dos Reis <gdr@cs.tamu.edu>
+
+ * interp/compiler.boot: Register compiler for Enumeration
+ instantiations.
+ * interp/modemap.boot (compCat): Move to compiler.boot.
+
2008-04-09 Gabriel Dos Reis <gdr@cs.tamu.edu>
* boot/translator.boot (bpOutItem): Tidy.
diff --git a/src/interp/compiler.boot b/src/interp/compiler.boot
index 12a36c52..d3313980 100644
--- a/src/interp/compiler.boot
+++ b/src/interp/compiler.boot
@@ -1592,6 +1592,20 @@ compilerDoitWithScreenedLisplib(constructor, fun) ==
SEQ(UNEMBED 'RWRITE))
+--% Categories
+
+compCat(form is [functorName,:argl],m,e) ==
+ fn:= GETL(functorName,"makeFunctionList") or return nil
+ [funList,e]:= FUNCALL(fn,form,form,e)
+ catForm:=
+ ["Join",'(SetCategory),["CATEGORY","domain",:
+ [["SIGNATURE",op,sig] for [op,sig,.] in funList | op^="="]]]
+ --RDJ: for coercion purposes, it necessary to know it's a Set; I'm not
+ --sure if it uses any of the other signatures(see extendsCategoryForm)
+ [form,catForm,e]
+
+
+
--% Interface to the backend
compileFileQuietly path ==
@@ -1604,10 +1618,10 @@ compileFileQuietly path ==
--% Register compilers for special forms.
-- Those compilers are on the `SPECIAL' property of the corresponding
-- special form operator symbol.
-for x in [["_|", :"compSuchthat"],_
- ["_@", :"compAtSign"],_
- ["_:", :"compColon"],_
- ["_:_:", :"compCoerce"],_
+for x in [["|", :"compSuchthat"],_
+ ["@", :"compAtSign"],_
+ [":", :"compColon"],_
+ ["::", :"compCoerce"],_
["QUOTE", :"compQuote"],_
["add", :"compAdd"],_
["CAPSULE", :"compCapsule"],_
@@ -1619,6 +1633,7 @@ for x in [["_|", :"compSuchthat"],_
["construct", :"compConstruct"],_
["DEF", :"compDefine"],_
["elt", :"compElt"],_
+ ["Enumeration", :"compCat"],_
["exit", :"compExit"],_
["has", :"compHas"],_
["IF", : "compIf"],_
diff --git a/src/interp/modemap.boot b/src/interp/modemap.boot
index f2ae0fc5..f80df408 100644
--- a/src/interp/modemap.boot
+++ b/src/interp/modemap.boot
@@ -340,16 +340,6 @@ substNames(domainName,viewName,functorForm,opalist) ==
for [:modemapform,[sel,"$",pos]] in
EQSUBSTLIST(KDR functorForm,$FormalMapVariableList, opalist)]
-compCat(form is [functorName,:argl],m,e) ==
- fn:= GETL(functorName,"makeFunctionList") or return nil
- [funList,e]:= FUNCALL(fn,form,form,e)
- catForm:=
- ["Join",'(SetCategory),["CATEGORY","domain",:
- [["SIGNATURE",op,sig] for [op,sig,.] in funList | op^="="]]]
- --RDJ: for coercion purposes, it necessary to know it's a Set; I'm not
- --sure if it uses any of the other signatures(see extendsCategoryForm)
- [form,catForm,e]
-
addConstructorModemaps(name,form is [functorName,:.],e) ==
$InteractiveMode: local:= nil
e:= putDomainsInScope(name,e) --frame