aboutsummaryrefslogtreecommitdiff
path: root/src/interp
diff options
context:
space:
mode:
Diffstat (limited to 'src/interp')
-rw-r--r--src/interp/bootlex.lisp4
-rw-r--r--src/interp/br-con.boot4
-rw-r--r--src/interp/br-op1.boot8
-rw-r--r--src/interp/br-saturn.boot4
-rw-r--r--src/interp/br-search.boot2
-rw-r--r--src/interp/c-doc.boot2
-rw-r--r--src/interp/c-util.boot14
-rw-r--r--src/interp/clammed.boot2
-rw-r--r--src/interp/daase.lisp2
-rw-r--r--src/interp/database.boot13
-rw-r--r--src/interp/g-util.boot6
-rw-r--r--src/interp/i-coerce.boot2
-rw-r--r--src/interp/i-eval.boot2
-rw-r--r--src/interp/i-funsel.boot2
-rw-r--r--src/interp/i-resolv.boot4
-rw-r--r--src/interp/lisplib.boot13
-rw-r--r--src/interp/metalex.lisp4
-rw-r--r--src/interp/nruncomp.boot2
-rw-r--r--src/interp/nrunfast.boot6
-rw-r--r--src/interp/parsing.lisp4
-rw-r--r--src/interp/sys-constants.boot5
21 files changed, 49 insertions, 56 deletions
diff --git a/src/interp/bootlex.lisp b/src/interp/bootlex.lisp
index 2032c0c8..31022c0a 100644
--- a/src/interp/bootlex.lisp
+++ b/src/interp/bootlex.lisp
@@ -319,7 +319,7 @@ or the chracters ?, !, ' or %"
;; digits forming that integer token.
(defun get-integer-in-radix (buf r)
(unless (> r 1)
- (meta-syntax-error))
+ (spad_syntax_error))
(let ((mark (1+ (size buf))))
(tagbody lp
(suffix (current-char) buf)
@@ -327,7 +327,7 @@ or the chracters ?, !, ' or %"
(dig (|rdigit?| nxt)))
(when dig
(unless (< dig r)
- (meta-syntax-error))
+ (spad_syntax_error))
(advance-char)
(go lp))))
(parse-integer buf :start mark :radix r)))
diff --git a/src/interp/br-con.boot b/src/interp/br-con.boot
index 50776276..63c27d71 100644
--- a/src/interp/br-con.boot
+++ b/src/interp/br-con.boot
@@ -578,7 +578,7 @@ kDomainName(htPage,kind,name,nargs) ==
htpSetProperty(htPage,'inputAreaList,inputAreaList)
conname := makeSymbol name
args := [kArgumentCheck(domain?,x) or nil for x in inputAreaList
- for domain? in rest getDualSignatureFromDB conname]
+ for domain? in rest getDualSignature conname]
or/[null x for x in args] =>
(n := +/[1 for x in args | x]) > 0 =>
['error,nil,'"\centerline{You gave values for only {\em ",n,'" } of the {\em ",#args,'"}}",'"\centerline{parameters of {\sf ",name,'"}}\vspace{1}\centerline{Please enter either {\em all} or {\em none} of the type parameters}"]
@@ -624,7 +624,7 @@ kisValidType typeForm ==
kCheckArgumentNumbers t ==
[conname,:args] := t
- cosig := KDR getDualSignatureFromDB conname
+ cosig := KDR getDualSignature conname
#cosig ~= #args => false
and/[foo for domain? in cosig for x in args] where foo() ==
domain? => kCheckArgumentNumbers x
diff --git a/src/interp/br-op1.boot b/src/interp/br-op1.boot
index 5144fba7..0aab1e84 100644
--- a/src/interp/br-op1.boot
+++ b/src/interp/br-op1.boot
@@ -197,7 +197,7 @@ fromHeading htPage ==
upOp := symbolName opOf updomain
['" {\em from} ",:dbConformGen dnForm,'" {\em under} \ops{",upOp,'"}{",:$pn,:upFence,'"}"]
domname := htpProperty(htPage,'domname)
- numberOfUnderlyingDomains := #[x for x in rest getDualSignatureFromDB(opOf domname) | x]
+ numberOfUnderlyingDomains := #[x for x in rest getDualSignature(opOf domname) | x]
-- numberOfUnderlyingDomains = 1 and
-- KDR domname and (dn := dbExtractUnderlyingDomain domname) =>
-- ['" {\em from} ",:pickitForm(domname,dn)]
@@ -220,7 +220,7 @@ conform2StringList(form,opFn,argFn,exception) ==
special := op in '(Union Record Mapping)
cosig :=
special => ['T for x in args]
- rest getDualSignatureFromDB op
+ rest getDualSignature op
atypes :=
special => cosig
getConstructorModemap(op).mmSource
@@ -266,7 +266,7 @@ dbOuttran form ==
else
op := form
args := nil
- cosig := rest getDualSignatureFromDB op
+ cosig := rest getDualSignature op
atypes := getConstructorModemap(op).mmSource
argl := [fn for x in args for atype in atypes for pred in cosig] where fn() ==
pred => x
@@ -882,7 +882,7 @@ getRegistry(op,sig) ==
evalableConstructor2HtString domform ==
if vector? domform then domform := devaluate domform
conname := first domform
- coSig := rest getDualSignatureFromDB conname
+ coSig := rest getDualSignature conname
--entries are T for arguments which are domains; NIL for computational objects
and/[x for x in coSig] => form2HtString(domform,nil,true)
arglist := [unquote x for x in rest domform] where
diff --git a/src/interp/br-saturn.boot b/src/interp/br-saturn.boot
index 547b193c..a06b0f8f 100644
--- a/src/interp/br-saturn.boot
+++ b/src/interp/br-saturn.boot
@@ -938,7 +938,7 @@ addParameterTemplates(page, conform) ==
kPageArgs([op,:args],[.,.,:source]) ==
htSaySaturn '"\begin{tabular}{p{.25in}lp{0in}}"
firstTime := true
- coSig := rest getDualSignatureFromDB op
+ coSig := rest getDualSignature op
for x in args for t in source for pred in coSig repeat
if firstTime then firstTime := false
else
@@ -1170,7 +1170,7 @@ operationIsNiladicConstructor op ==
++ Like operationIsNiladicConstructor() except that we just want
++ to know whether `op' is a constructor, arity is unimportant.
operationIsConstructor op ==
- ident? op => getDualSignatureFromDB op
+ ident? op => getDualSignature op
nil
--------------> NEW DEFINITION (see br-op2.boot.pamphlet)
diff --git a/src/interp/br-search.boot b/src/interp/br-search.boot
index 7ee5c8ca..026ff895 100644
--- a/src/interp/br-search.boot
+++ b/src/interp/br-search.boot
@@ -317,7 +317,7 @@ mkGrepPattern1(x,:options) == --called by mkGrepPattern (and grepConstructName?)
conform2OutputForm(form) ==
[op,:args] := form
null args => form
- cosig := rest getDualSignatureFromDB op
+ cosig := rest getDualSignature op
atypes := getConstructorModemap(op).mmSource
sargl := [fn for x in args for atype in atypes for pred in cosig] where fn() ==
pp [x,atype,pred]
diff --git a/src/interp/c-doc.boot b/src/interp/c-doc.boot
index a77aab7c..100ee96d 100644
--- a/src/interp/c-doc.boot
+++ b/src/interp/c-doc.boot
@@ -432,7 +432,7 @@ checkIsValidType form == main where
[op,:args] := form
conname := (constructor? op => op; abbreviation? op)
null conname => nil
- fn(form,getDualSignatureFromDB conname)
+ fn(form,getDualSignature conname)
fn(form,coSig) ==
#form ~= #coSig => form
or/[null checkIsValidType x for x in rest form for flag in rest coSig | flag]
diff --git a/src/interp/c-util.boot b/src/interp/c-util.boot
index be49e6fc..75a8ec60 100644
--- a/src/interp/c-util.boot
+++ b/src/interp/c-util.boot
@@ -683,24 +683,12 @@ TrimCF() ==
--%
-isKnownCategory: (%Mode,%Env) -> %Boolean
-isKnownCategory(c,e) ==
- c = $Type => true
- c = $Category => true
- [ctor,:args] := c
- ctor = "Join" => true -- don't check arguments yet.
- ctor = "SubsetCategory" => true -- ditto
- get(ctor,"isCategory",e) => true
- false
-
---TRACE isKnownCategory
-
++ Returns non-nil if `t' is a known type in the environement `e'.
diagnoseUnknownType(t,e) ==
t isnt [.,:.] =>
t in '($ constant) => t
t' := assoc(t,getDomainsInScope e) => t'
- (m := getmode(t,e)) and isKnownCategory(m,$CategoryFrame) => t
+ (m := getmode(t,e)) and isCategoryForm(m,$CategoryFrame) => t
string? t => t
-- ??? We should not to check for $$ at this stage.
-- ??? This is a bug in the compiler that needs to be fixed.
diff --git a/src/interp/clammed.boot b/src/interp/clammed.boot
index 022c31f9..79e9e788 100644
--- a/src/interp/clammed.boot
+++ b/src/interp/clammed.boot
@@ -109,7 +109,7 @@ isValidType form ==
form is ['Expression, ['Kernel, . ]] => nil
form is [op,:argl] =>
not constructor? op => nil
- cosig := getDualSignatureFromDB op
+ cosig := getDualSignature op
cosig and null rest cosig => -- niladic constructor
null argl => true
false
diff --git a/src/interp/daase.lisp b/src/interp/daase.lisp
index cd43e7d8..d434ba69 100644
--- a/src/interp/daase.lisp
+++ b/src/interp/daase.lisp
@@ -761,7 +761,7 @@
(format t "~&~a: ~a~%" 'constructorkind
(|getConstructorKindFromDB| constructor))
(format t "~a: ~a~%" 'cosig
- (|getDualSignatureFromDB| constructor))
+ (|getDualSignature| constructor))
(format t "~a: ~a~%" 'operation
(|getOperationFromDB| constructor))
(format t "~a: ~%" 'constructormodemap)
diff --git a/src/interp/database.boot b/src/interp/database.boot
index 22af0aac..632867f3 100644
--- a/src/interp/database.boot
+++ b/src/interp/database.boot
@@ -113,13 +113,14 @@ getConstructorArgsFromDB ctor ==
++ returns a list of Boolean values indicating whether the
++ parameter type at the corresponding position is a category.
-getDualSignatureFromDB: %Constructor -> %Form
-getDualSignatureFromDB ctor ==
- GETDATABASE(ctor,"COSIG")
+getDualSignature: %Constructor -> %Form
+getDualSignature ctor ==
+ db := constructorDB ctor or return nil
+ dbDualSignature db or GETDATABASE(ctor,'COSIG)
getConstructorPredicates: %Constructor -> %List %Thing
getConstructorPredicates ctor ==
- dbPredicates loadDBIfnecessary constructorDB ctor
+ dbPredicates loadDBIfNecessary constructorDB ctor
getConstructorParentsFromDB: %Constructor -> %List %Constructor
getConstructorParentsFromDB ctor ==
@@ -131,7 +132,7 @@ getSuperDomainFromDB ctor ==
getConstructorAttributes: %Constructor -> %Form
getConstructorAttributes ctor ==
- dbAttributes loadDBIfnecessary constructorDB ctor
+ dbAttributes loadDBIfNecessary constructorDB ctor
niladicConstructor?: %Constructor -> %Boolean
niladicConstructor? ctor ==
@@ -829,7 +830,7 @@ printAllInitdbInfo(srcdir,dbfile) ==
dbLoaded? db ==
dbLoadPath db ~= nil
-loadDBIfnecessary db ==
+loadDBIfNecessary db ==
ctor := dbConstructor db
dbLoaded? db => db
loadLib ctor or return nil
diff --git a/src/interp/g-util.boot b/src/interp/g-util.boot
index c1e8e281..6b76c32e 100644
--- a/src/interp/g-util.boot
+++ b/src/interp/g-util.boot
@@ -119,9 +119,9 @@ superType: %Mode -> %Maybe %Mode
superType dom ==
dom = "$" => superType $functorForm
dom isnt [ctor,:args] => nil
- [super,.] :=
- (db := constructorDB ctor) and dbBeingDefined? db =>
- dbSuperDomain db or return nil
+ [super,.] :=
+ db := constructorDB ctor or return nil
+ dbBeingDefined? db => dbSuperDomain db or return nil
getSuperDomainFromDB ctor or return nil
sublisFormal(args,super,$AtVariables)
diff --git a/src/interp/i-coerce.boot b/src/interp/i-coerce.boot
index 2c7e4283..1a0e5ec0 100644
--- a/src/interp/i-coerce.boot
+++ b/src/interp/i-coerce.boot
@@ -1067,7 +1067,7 @@ coerceIntByMapInner(arg,[u1,:u2]) == coerceOrThrowFailure(arg,u1,u2)
valueArgsEqual?(t1, t2) ==
-- returns true if the object-valued arguments to t1 and t2 are the same
-- under coercion
- coSig := rest getDualSignatureFromDB first t1
+ coSig := rest getDualSignature first t1
constrSig := rest getConstructorSignature first t1
tl1 := replaceSharps(constrSig, t1)
tl2 := replaceSharps(constrSig, t2)
diff --git a/src/interp/i-eval.boot b/src/interp/i-eval.boot
index 8b10a9ac..c6fafef5 100644
--- a/src/interp/i-eval.boot
+++ b/src/interp/i-eval.boot
@@ -59,7 +59,7 @@ mkEvalable form ==
constructor? op and argl = nil => form
loadIfNecessary op
kind:= getConstructorKindFromDB op
- cosig := getDualSignatureFromDB op =>
+ cosig := getDualSignature op =>
[op,:[val for x in argl for typeFlag in rest cosig]] where val() ==
typeFlag =>
kind = "category" => MKQ x
diff --git a/src/interp/i-funsel.boot b/src/interp/i-funsel.boot
index a09c86d4..9b1bd614 100644
--- a/src/interp/i-funsel.boot
+++ b/src/interp/i-funsel.boot
@@ -1250,7 +1250,7 @@ coerceTypeArgs(t1, t2, SL) ==
-- if needed.
t1 isnt [con1, :args1] or t2 isnt [con2, :args2] => t2
con1 ~= con2 => t2
- coSig := rest getDualSignatureFromDB first t1
+ coSig := rest getDualSignature first t1
and/coSig => t2
csub1 := constructSubst t1
csub2 := constructSubst t2
diff --git a/src/interp/i-resolv.boot b/src/interp/i-resolv.boot
index bada82b8..217d81ad 100644
--- a/src/interp/i-resolv.boot
+++ b/src/interp/i-resolv.boot
@@ -341,7 +341,7 @@ resolveTTRed3(t) ==
(and/[member(x,a) for x in b] and "and"/[member(x,b) for x in a]) and a
[(x isnt [.,:.] and x ) or ((not cs and x and not interpOp? x and x)
or resolveTTRed3 x) or return nil
- for x in t for cs in getDualSignatureFromDB first t ]
+ for x in t for cs in getDualSignature t.op ]
interpOp?(op) ==
cons?(op) and
@@ -755,7 +755,7 @@ replaceLast(A,t) ==
destructT(functor)==
-- provides a list of booleans, which indicate whether the arguments
-- to the functor are category forms or not
- getDualSignatureFromDB opOf functor
+ getDualSignature opOf functor
constructTowerT(t,TL) ==
-- t is a type, TL a list of constructors and argument lists
diff --git a/src/interp/lisplib.boot b/src/interp/lisplib.boot
index b992cc6c..abdf8e04 100644
--- a/src/interp/lisplib.boot
+++ b/src/interp/lisplib.boot
@@ -610,7 +610,8 @@ finalizeLisplib(ctor,libName) ==
writeAbbreviation(db,$libFile)
writePrincipals(ctor,removeZeroOne dbPrincipals db,$libFile)
writeAncestors(ctor,removeZeroOne dbAncestors db,$libFile)
- lisplibWrite('"documentation",finalizeDocumentation ctor,$libFile)
+ if not $bootStrapMode then
+ lisplibWrite('"documentation",finalizeDocumentation ctor,$libFile)
if $profileCompiler then profileWrite()
leaveIfErrors(libName,kind)
true
@@ -803,12 +804,10 @@ isFunctor x ==
op in '(SubDomain Union Record Enumeration) => true
--FIXME: above should use builtinFunctionName?. Change when
--FIXME: Mapping acquire first class functorship.
- getConstructorAbbreviationFromDB op =>
- if getConstructorKindFromDB op = "category"
- then updateCategoryFrameForCategory op
- else updateCategoryFrameForConstructor op
- get(op,'isFunctor,$CategoryFrame)
- nil
+ kind := getConstructorKindFromDB op
+ kind = nil or kind = 'category => false
+ updateCategoryFrameForConstructor op
+ get(op,'isFunctor,$CategoryFrame)
--%
diff --git a/src/interp/metalex.lisp b/src/interp/metalex.lisp
index a5ab0393..6ba27c7c 100644
--- a/src/interp/metalex.lisp
+++ b/src/interp/metalex.lisp
@@ -684,7 +684,7 @@ as keywords.")
(#\Return
(moan "String should fit on one line!")
(advance-char)
- (meta-syntax-error)
+ (spad_syntax_error)
(return nil))
(t (suffix (current-char) buf)
(advance-char))))))))
@@ -707,7 +707,7 @@ as keywords.")
(#\Return
(moan "String should fit on one line!")
(advance-char)
- (meta-syntax-error)
+ (spad_syntax_error)
(return nil))
(t (suffix (current-char) buf)
(advance-char))))))))
diff --git a/src/interp/nruncomp.boot b/src/interp/nruncomp.boot
index 65ada6f5..0215f047 100644
--- a/src/interp/nruncomp.boot
+++ b/src/interp/nruncomp.boot
@@ -303,7 +303,7 @@ NRTaddInner x ==
builtinConstructor? x.op or x.op is "[||]" =>
for y in x.args repeat
NRTinnerGetLocalIndex y
- cosig := getDualSignatureFromDB x.op =>
+ cosig := getDualSignature x.op =>
for y in x.args for t in cosig.source | y isnt '$ and t repeat
NRTinnerGetLocalIndex y
keyedSystemError("S2NR0003",[x])
diff --git a/src/interp/nrunfast.boot b/src/interp/nrunfast.boot
index e6dcba83..f5afe44c 100644
--- a/src/interp/nrunfast.boot
+++ b/src/interp/nrunfast.boot
@@ -391,7 +391,7 @@ lazyMatch(source,lazyt,dollar,domain) ==
for [.,stag,s] in sargl for [.,atag,a] in argl]
generalizedBuiltinConstructor? op =>
and/[lazyMatchArg(s,a,dollar,domain) for s in sargl for a in argl]
- coSig := getDualSignatureFromDB op
+ coSig := getDualSignature op
null coSig => error ["bad Constructor op", op]
and/[lazyMatchArg2(s,a,dollar,domain,flag)
for s in sargl for a in argl for flag in rest coSig]
@@ -409,7 +409,7 @@ lazyMatch(source,lazyt,dollar,domain) ==
lazyMatchArgDollarCheck(s,d,dollarName,domainName) ==
#s ~= #d => nil
- scoSig := getDualSignatureFromDB opOf s or return nil
+ scoSig := getDualSignature opOf s or return nil
if opOf s in '(Union Mapping Record) then
scoSig := [true for x in s]
and/[fn for x in rest s for arg in rest d for xt in rest scoSig] where
@@ -471,7 +471,7 @@ newExpandLocalTypeForm([functorName,:argl],dollar,domain) ==
functorName is "QUOTE" => [functorName,:argl]
builtinConstructor? functorName =>
[functorName,:[newExpandLocalTypeArgs(a,dollar,domain,true) for a in argl]]
- coSig := getDualSignatureFromDB functorName or
+ coSig := getDualSignature functorName or
error ["unknown constructor name", functorName]
[functorName,:[newExpandLocalTypeArgs(a,dollar,domain,flag)
for a in argl for flag in rest coSig]]
diff --git a/src/interp/parsing.lisp b/src/interp/parsing.lisp
index 81d34c83..52374f11 100644
--- a/src/interp/parsing.lisp
+++ b/src/interp/parsing.lisp
@@ -148,7 +148,7 @@ the stack, then stack a NIL. Return the value of prod."
prodvalue)))))
(defmacro must (dothis &optional (this-is nil) (in-rule nil))
- `(or ,dothis (meta-syntax-error ,this-is ,in-rule)))
+ `(or ,dothis (spad_syntax_error ,this-is ,in-rule)))
; Optional means that if it is present in the token stream, that is a good thing,
; otherwise don't worry (like [ foo ] in BNF notation).
@@ -250,7 +250,7 @@ the stack, then stack a NIL. Return the value of prod."
(or (funcall procfun (pop-stack-1))))
(go top))
((compfin) (return 't)) )
- (meta-syntax-error)
+ (spad_syntax_error)
(go top)))
(defun termchr () "Is CHR a terminating character?"
diff --git a/src/interp/sys-constants.boot b/src/interp/sys-constants.boot
index bc2366ec..2aefc81d 100644
--- a/src/interp/sys-constants.boot
+++ b/src/interp/sys-constants.boot
@@ -702,3 +702,8 @@ $OperatorFunctionNames ==
"+", "-", ">", ">=", "=", "~=", "<", "<=", "#", "~", "not",
"case", "and", "or", "<<", ">>", "/\", "\/" ]
+--%
+%categoryKind == 'category
+%domainKind == 'domain
+%packageKind == 'package
+