aboutsummaryrefslogtreecommitdiff
path: root/src/interp
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2010-07-18 03:59:54 +0000
committerdos-reis <gdr@axiomatics.org>2010-07-18 03:59:54 +0000
commit6f895d0aed70b3a0ff95f19a5f3e4472c65bfd0d (patch)
treeb805dc5dc54812fe61efb039f15087a9d9b6c5be /src/interp
parent667ec69af3090bccd576e23e56a229168f8733b7 (diff)
downloadopen-axiom-6f895d0aed70b3a0ff95f19a5f3e4472c65bfd0d.tar.gz
More cleanups
Diffstat (limited to 'src/interp')
-rw-r--r--src/interp/br-op1.boot4
-rw-r--r--src/interp/buildom.boot4
-rw-r--r--src/interp/c-util.boot4
-rw-r--r--src/interp/category.boot4
-rw-r--r--src/interp/clam.boot2
-rw-r--r--src/interp/define.boot15
-rw-r--r--src/interp/functor.boot18
-rw-r--r--src/interp/i-analy.boot2
-rw-r--r--src/interp/i-coerfn.boot2
-rw-r--r--src/interp/i-eval.boot4
-rw-r--r--src/interp/i-intern.boot4
-rw-r--r--src/interp/i-map.boot4
-rw-r--r--src/interp/i-object.boot38
-rw-r--r--src/interp/i-output.boot6
-rw-r--r--src/interp/i-spec1.boot4
-rw-r--r--src/interp/i-spec2.boot10
-rw-r--r--src/interp/i-syscmd.boot8
-rw-r--r--src/interp/interop.boot18
-rw-r--r--src/interp/lisplib.boot2
-rw-r--r--src/interp/msgdb.boot10
-rw-r--r--src/interp/nruncomp.boot2
-rw-r--r--src/interp/nrunfast.boot30
-rw-r--r--src/interp/nrungo.boot10
-rw-r--r--src/interp/nrunopt.boot12
-rw-r--r--src/interp/posit.boot2
-rw-r--r--src/interp/showimp.boot10
-rw-r--r--src/interp/sys-utility.boot2
-rw-r--r--src/interp/trace.boot6
-rw-r--r--src/interp/wi2.boot2
29 files changed, 124 insertions, 115 deletions
diff --git a/src/interp/br-op1.boot b/src/interp/br-op1.boot
index a7520da8..d00f19e1 100644
--- a/src/interp/br-op1.boot
+++ b/src/interp/br-op1.boot
@@ -880,7 +880,7 @@ getRegistry(op,sig) ==
'""
evalableConstructor2HtString domform ==
- if VECP domform then domform := devaluate domform
+ if vector? domform then domform := devaluate domform
conname := first domform
coSig := rest getDualSignatureFromDB conname
--entries are T for arguments which are domains; NIL for computational objects
@@ -956,7 +956,7 @@ getDomainOpTable(dom,fromIfTrue,:options) ==
f = 'makeSpadConstant => 'constant
f = function IDENTITY => 'constant
f = 'newGoGet => substitute('_$,domname,devaluate first r)
- not VECP r => systemError devaluateList r
+ not vector? r => systemError devaluateList r
substitute('_$,domname,devaluate r)
'nowhere
[sig1,:info]
diff --git a/src/interp/buildom.boot b/src/interp/buildom.boot
index 1b38217d..73e007ae 100644
--- a/src/interp/buildom.boot
+++ b/src/interp/buildom.boot
@@ -118,7 +118,7 @@ RecordEqual(x,y,dom) ==
b and
SPADCALL(rest x, rest y, rest (dom.(nargs + 9)) or
rest (dom.(nargs + 9).rest := findEqualFun(dom.($FirstParamSlot+1))))
- VECP x =>
+ vector? x =>
equalfuns := dom.(nargs + 9)
and/[SPADCALL(x.i,y.i,equalfuns.i or _
(equalfuns.i:=findEqualFun(dom.($FirstParamSlot + i))))_
@@ -143,7 +143,7 @@ coerceRe2E(x,source) ==
["construct",
["=", source.1.1, coerceVal2E(first x,source.1.2)], _
["=", source.2.1, coerceVal2E(rest x,source.2.2)] ]
- VECP x =>
+ vector? x =>
['construct,
:[["=",tag,coerceVal2E(x.i, fdom)]
for i in 0.. for [.,tag,fdom] in rest source]]
diff --git a/src/interp/c-util.boot b/src/interp/c-util.boot
index 199d1a6e..aa70575f 100644
--- a/src/interp/c-util.boot
+++ b/src/interp/c-util.boot
@@ -192,7 +192,7 @@ declareUnusedParameters x == (augment x; x) where
augment x'
devaluate d ==
- not REFVECP d => d
+ not vector? d => d
QSGREATERP(QVSIZE d,5) and getShellEntry(d,3) is ['Category] =>
getShellEntry(d,0)
QSGREATERP(QVSIZE d,0) =>
@@ -204,7 +204,7 @@ devaluate d ==
devaluateList l == [devaluate d for d in l]
devaluateDeeply x ==
- VECP x => devaluate x
+ vector? x => devaluate x
atom x => x
[devaluateDeeply y for y in x]
diff --git a/src/interp/category.boot b/src/interp/category.boot
index d9ad2e7e..3ec61377 100644
--- a/src/interp/category.boot
+++ b/src/interp/category.boot
@@ -48,7 +48,7 @@ $NewCatVec := nil
++ Returns true if `a' is a category (runtime) object.
isCategory: %Thing -> %Boolean
isCategory a ==
- REFVECP a and #a > 5 and getShellEntry(a,3) = $Category
+ vector? a and #a > 5 and getShellEntry(a,3) = $Category
++ Return true if the form `x' designates an instantiaion of a
++ category constructor known to the global database or the
@@ -353,7 +353,7 @@ FindFundAncs l ==
CatEval: %Thing -> %Shell
CatEval x ==
- REFVECP x => x
+ vector? x => x
e :=
$InteractiveMode => $CategoryFrame
$e
diff --git a/src/interp/clam.boot b/src/interp/clam.boot
index 5b1eed1d..608aff79 100644
--- a/src/interp/clam.boot
+++ b/src/interp/clam.boot
@@ -682,7 +682,7 @@ globalHashtableStats(x,sortFn) ==
pp args
constructor2ConstructorForm x ==
- VECP x => x.0
+ vector? x => x.0
x
rightJustifyString(x,maxWidth) ==
diff --git a/src/interp/define.boot b/src/interp/define.boot
index ca7d8386..79b0c580 100644
--- a/src/interp/define.boot
+++ b/src/interp/define.boot
@@ -1348,8 +1348,17 @@ bootStrapError(functorForm,sourceFile) ==
''%b,MKQ namestring sourceFile,''%d,'"needs to be compiled"]]]]
registerInlinableDomain(x,e) ==
- macroExpand(x,e) is [ctor,:.] and constructor? ctor =>
- nominateForInlining ctor
+ x := macroExpand(x,e)
+ x is [ctor,:.] =>
+ constructor? ctor => nominateForInlining ctor
+ ctor = 'Record or ctor = 'Union =>
+ x.args is [['_:,:.],:.] =>
+ for [.,.,t] in x.args repeat
+ registerInlinableDomain(t,e)
+ for t in x.args repeat
+ registerInlinableDomain(t,e)
+ nil
+ nil
compAdd(['add,$addForm,capsule],m,e) ==
$bootStrapMode = true =>
@@ -1484,7 +1493,7 @@ doIt(item,$predl) ==
--$Representation bound by compDefineFunctor, used in compNoStacking
$Representation := getRepresentation $e
if $optimizeRep then
- nominateForInlining $Representation
+ registerInlinableDomain($Representation,$e)
code is ["%LET",:.] =>
item.op := "setShellEntry"
rhsCode := rhs'
diff --git a/src/interp/functor.boot b/src/interp/functor.boot
index c4b4b411..4b004280 100644
--- a/src/interp/functor.boot
+++ b/src/interp/functor.boot
@@ -71,8 +71,8 @@ DomainPrint(D,brief) ==
SAY '"-----------------------------------------------------------------------"
DomainPrint1(D,brief,$e) ==
- REFVECP D and not isDomain D => PacPrint D
- if REFVECP D then D:= D.4
+ vector? D and not isDomain D => PacPrint D
+ if vector? D then D:= D.4
--if we were passed a vector, go to the domain
Sublis:=
[:
@@ -85,11 +85,11 @@ DomainPrint1(D,brief,$e) ==
if not brief then
SAY ['"View number ",i,'" corresponding to categories:"]
PRETTYPRINT first u
- if i=1 and REFVECP uu.5 then
+ if i=1 and vector? uu.5 then
vv:= COPY_-SEQ uu.5
uu.5:= vv
for j in 0..MAXINDEX vv repeat
- if REFVECP vv.j then
+ if vector? vv.j then
l:= ASSQ(keyItem vv.j,Sublis)
if l
then name:= rest l
@@ -103,13 +103,13 @@ DomainPrint1(D,brief,$e) ==
uu.1:= uu.2:= uu.5:= '"As in first view"
for i in 6..MAXINDEX uu repeat
uu.i:= DomainPrintSubst(uu.i,Sublis)
- if REFVECP uu.i then
+ if vector? uu.i then
name:=DPname()
Sublis:= [[keyItem uu.i,:name],:Sublis]
$Sublis:= [first Sublis,:$Sublis]
$WhereList:= [[name,:uu.i],:$WhereList]
uu.i:= name
- if uu.i is [.,:v] and REFVECP v then
+ if uu.i is [.,:v] and vector? v then
name:=DPname()
Sublis:= [[keyItem v,:name],:Sublis]
$Sublis:= [first Sublis,:$Sublis]
@@ -125,7 +125,7 @@ DPname() ==
PacPrint v ==
vv:= COPY_-SEQ v
for j in 0..MAXINDEX vv repeat
- if REFVECP vv.j then
+ if vector? vv.j then
l:= ASSQ(keyItem vv.j,Sublis)
if l
then name:= rest l
@@ -135,7 +135,7 @@ PacPrint v ==
$Sublis:= [first Sublis,:$Sublis]
$WhereList:= [[name,:vv.j],:$WhereList]
vv.j:= name
- if cons? vv.j and REFVECP(u:=rest vv.j) then
+ if cons? vv.j and vector?(u:=rest vv.j) then
l:= ASSQ(keyItem u,Sublis)
if l
then name:= rest l
@@ -602,7 +602,7 @@ SetFunctionSlots(sig,body,flag,mode) == --mode is either "original" or "adding"
if q is 'CONST and body is ['CONS,a,b] then
body := ['CONS,'IDENTITY,['FUNCALL,a,b]]
body:= ['setShellEntry,'$,index,body]
- not REFVECP $SetFunctions => nil --packages don't set it
+ not vector? $SetFunctions => nil --packages don't set it
if TruthP flag then -- unconditionally defined function
u.index := true
TruthP $SetFunctions.index => -- the function was already assigned
diff --git a/src/interp/i-analy.boot b/src/interp/i-analy.boot
index c43236f3..3c8ada31 100644
--- a/src/interp/i-analy.boot
+++ b/src/interp/i-analy.boot
@@ -170,7 +170,7 @@ pushDownOnArithmeticVariables(op,target,arglist) ==
not MEMQ(op,'(_+ _- _* _*_* _/)) => NIL
not containsPolynomial(target) => NIL
for x in arglist for i in 1.. repeat
- VECP(x) => -- leaf
+ vector?(x) => -- leaf
transferPropsToNode(xn := getUnname(x),x)
getValue(x) or (xn = $immediateDataSymbol) => NIL
t := getMinimalVariableTower(xn,target) or target
diff --git a/src/interp/i-coerfn.boot b/src/interp/i-coerfn.boot
index bc5d05cc..1d37380c 100644
--- a/src/interp/i-coerfn.boot
+++ b/src/interp/i-coerfn.boot
@@ -1224,7 +1224,7 @@ Qf2Qf(u0,[.,S],target is [.,T]) ==
coercionFailure()
-- partOf(x,i) ==
--- VECP x => x.i
+-- vector? x => x.i
-- i=0 => first x
-- i=1 => rest x
-- systemError '"partOf"
diff --git a/src/interp/i-eval.boot b/src/interp/i-eval.boot
index 32b55375..ba779085 100644
--- a/src/interp/i-eval.boot
+++ b/src/interp/i-eval.boot
@@ -62,7 +62,7 @@ mkEvalable form ==
[op,:[val for x in argl for typeFlag in rest cosig]] where val() ==
typeFlag =>
kind = "category" => MKQ x
- VECP x => MKQ x
+ vector? x => MKQ x
loadIfNecessary x
mkEvalable x
x is ['QUOTE,:.] => x
@@ -292,7 +292,7 @@ sideEffectedArg?(t,sig,opName) ==
t = dc
getArgValue(a, t) ==
- atom a and not VECP a =>
+ atom a and not vector? a =>
t' := coerceOrRetract(getBasicObject a,t)
t' and getValueNormalForm t'
v := getArgValue1(a, t) => v
diff --git a/src/interp/i-intern.boot b/src/interp/i-intern.boot
index 3c16a7e0..e0e2b2f0 100644
--- a/src/interp/i-intern.boot
+++ b/src/interp/i-intern.boot
@@ -97,7 +97,7 @@ mkAtreeExpandMacros x ==
mkAtree1 x ==
-- first special handler for making attrib tree
null x => throwKeyedMsg("S2IP0005",['"NIL"])
- VECP x => x
+ vector? x => x
atom x =>
x in '(%noBranch %noMapVal) => x
x in '(nil true false) => mkAtree2([x],x,NIL)
@@ -377,7 +377,7 @@ atree2Tree1(x,evalIfTrue) ==
(triple := getValue x) and objMode(triple) ~= $EmptyMode =>
coerceOrCroak(triple,$OutputForm,$mapName)
isLeaf x =>
- VECP x => x.0
+ vector? x => x.0
x
[atree2Tree1(y,evalIfTrue) for y in x]
diff --git a/src/interp/i-map.boot b/src/interp/i-map.boot
index f2512ced..fabad1c4 100644
--- a/src/interp/i-map.boot
+++ b/src/interp/i-map.boot
@@ -610,7 +610,7 @@ rewriteMap0(op,opName,argl) ==
else
val:= getValue arg
$env:=put(var,'value,val,$env)
- if VECP arg then $env := put(var,'name,getUnname arg,$env)
+ if vector? arg then $env := put(var,'name,getUnname arg,$env)
(m := getMode arg) => $env := put(var,'mode,m,$env)
null (val:= interpMap(opName,tar)) =>
throwKeyedMsg("S2IM0010",[opName])
@@ -643,7 +643,7 @@ rewriteMap1(opName,argl,sig) ==
else
val:= evArg
$env:=put(var,'value,val,$env)
- if VECP arg then $env := put(var,'name,getUnname arg,$env)
+ if vector? arg then $env := put(var,'name,getUnname arg,$env)
(m := getMode arg) => $env := put(var,'mode,m,$env)
val:= interpMap(opName,tar)
removeBodyFromEnv(opName)
diff --git a/src/interp/i-object.boot b/src/interp/i-object.boot
index 86fbe547..5092745f 100644
--- a/src/interp/i-object.boot
+++ b/src/interp/i-object.boot
@@ -93,10 +93,10 @@ wrap x ==
isWrapped x => x
["WRAPPED",:x]
-isWrapped x == x is ['WRAPPED,:.] or NUMBERP x or FLOATP x or CVECP x
+isWrapped x == x is ['WRAPPED,:.] or NUMBERP x or FLOATP x or string? x
unwrap x ==
- NUMBERP x or FLOATP x or CVECP x => x
+ NUMBERP x or FLOATP x or string? x => x
x is ["WRAPPED",:y] => y
x
@@ -224,7 +224,7 @@ mkAtreeNode x ==
++ remove mode, value, and misc. info from attrib tree
emptyAtree expr ==
- VECP expr =>
+ vector? expr =>
$immediateDataSymbol = expr.0 => nil
expr.1:= NIL
expr.2:= NIL
@@ -242,21 +242,21 @@ isLeaf x ==
++ Also used by the algebra interface to the interpreter.
getMode x ==
x is [op,:.] => getMode op
- VECP x => x.1
+ vector? x => x.1
m := getBasicMode x => m
keyedSystemError("S2II0001",[x])
++ sets the mode for the VAT node x to y.
putMode(x,y) ==
x is [op,:.] => putMode(op,y)
- not VECP x => keyedSystemError("S2II0001",[x])
+ not vector? x => keyedSystemError("S2II0001",[x])
x.1 := y
++ returns an interpreter object that represents the value of node x.
++ Note that an interpreter object is a pair of mode and value.
++ Also used by the algebra interface to the interperter.
getValue x ==
- VECP x => x.2
+ vector? x => x.2
atom x =>
t := getBasicObject x => t
keyedSystemError("S2II0001",[x])
@@ -265,7 +265,7 @@ getValue x ==
++ sets the value of VAT node x to interpreter object y.
putValue(x,y) ==
x is [op,:.] => putValue(op,y)
- not VECP x => keyedSystemError("S2II0001",[x])
+ not vector? x => keyedSystemError("S2II0001",[x])
x.2 := y
++ same as putValue(vec, val), except that vec is returned instead of val.
@@ -276,7 +276,7 @@ putValueValue(vec,val) ==
++ Returns the node class of x, if possible; otherwise nil.
++ Also used by the algebra interface to the interpreter.
getUnnameIfCan x ==
- VECP x => x.0
+ vector? x => x.0
x is [op,:.] => getUnnameIfCan op
atom x => x
nil
@@ -288,14 +288,14 @@ getUnname x ==
++ Subroutine of getUnname.
getUnname1 x ==
- VECP x => x.0
+ vector? x => x.0
cons? x => keyedSystemError("S2II0001",[x])
x
++ returns the mode-set of VAT node x.
getModeSet x ==
x and cons? x => getModeSet first x
- VECP x =>
+ vector? x =>
y:= x.aModeSet =>
(y = [$EmptyMode]) and ((m := getMode x) is ['Mapping,:.]) =>
[m]
@@ -309,13 +309,13 @@ getModeSet x ==
++ Sets the mode-set of VAT node x to y.
putModeSet(x,y) ==
x is [op,:.] => putModeSet(op,y)
- not VECP x => keyedSystemError("S2II0001",[x])
+ not vector? x => keyedSystemError("S2II0001",[x])
x.3 := y
y
getModeOrFirstModeSetIfThere x ==
x is [op,:.] => getModeOrFirstModeSetIfThere op
- VECP x =>
+ vector? x =>
m := x.1 => m
val := x.2 => objMode val
y := x.aModeSet =>
@@ -327,7 +327,7 @@ getModeOrFirstModeSetIfThere x ==
getModeSetUseSubdomain x ==
x and cons? x => getModeSetUseSubdomain first x
- VECP(x) =>
+ vector?(x) =>
-- don't play subdomain games with retracted args
getAtree(x,'retracted) => getModeSet x
y := x.aModeSet =>
@@ -369,9 +369,9 @@ putAtree(x,prop,val) ==
x is [op,:.] =>
-- only willing to add property if op is a vector
-- otherwise will be pushing to deeply into calling structure
- if VECP op then putAtree(op,prop,val)
+ if vector? op then putAtree(op,prop,val)
x
- not VECP x => x -- just ignore it
+ not vector? x => x -- just ignore it
n := QLASSQ(prop,'((mode . 1) (value . 2) (modeSet . 3)))
=> x.n := val
x.4 := insertShortAlist(prop,val,x.4)
@@ -381,9 +381,9 @@ getAtree(x,prop) ==
x is [op,:.] =>
-- only willing to get property if op is a vector
-- otherwise will be pushing to deeply into calling structure
- VECP op => getAtree(op,prop)
+ vector? op => getAtree(op,prop)
NIL
- not VECP x => NIL -- just ignore it
+ not vector? x => NIL -- just ignore it
n:= QLASSQ(prop,'((mode . 1) (value . 2) (modeSet . 3)))
=> x.n
QLASSQ(prop,x.4)
@@ -446,7 +446,7 @@ srcPosDisplay(sp) ==
++ Returns the calling convention vector for an operation
++ represented by the VAT `t'.
getFlagArgsPos t ==
- VECP t => getAtree(t, 'flagArgsPos)
+ vector? t => getAtree(t, 'flagArgsPos)
atom t => keyedSystemError("S2II0001",[t])
getFlagArgsPos first t
@@ -457,7 +457,7 @@ transferPropsToNode(x,t) ==
propList := getProplist(x,$env)
QLASSQ('Led,propList) or QLASSQ('Nud,propList) => nil
node :=
- VECP t => t
+ vector? t => t
first t
for prop in '(mode localModemap value name generatedCode)
repeat transfer(x,node,prop)
diff --git a/src/interp/i-output.boot b/src/interp/i-output.boot
index 31242154..05808590 100644
--- a/src/interp/i-output.boot
+++ b/src/interp/i-output.boot
@@ -484,7 +484,7 @@ outputTran x ==
member(x,'("failed" "nil" "prime" "sqfr" "irred")) =>
strconc('"_"",x,'"_"")
string? x => x
- VECP x =>
+ vector? x =>
outputTran ['BRACKET,['AGGLST,:[x.i for i in 0..MAXINDEX x]]]
NUMBERP x =>
MINUSP x => ["-",MINUS x]
@@ -716,14 +716,14 @@ outputConstructTran x ==
[outputTran first x,:outputConstructTran rest x]
outputTranMatrix x ==
- not VECP x =>
+ not vector? x =>
-- assume that the only reason is that we've been done before
["MATRIX",:x]
--keyedSystemError("S2GE0016",['"outputTranMatrix",
-- '"improper internal form for matrix found in output routines"])
["MATRIX",nil,:[outtranRow x.i for i in 0..MAXINDEX x]] where
outtranRow x ==
- not VECP x =>
+ not vector? x =>
keyedSystemError("S2GE0016",['"outputTranMatrix",
'"improper internal form for matrix found in output routines"])
["ROW",:[outputTran x.i for i in 0..MAXINDEX x]]
diff --git a/src/interp/i-spec1.boot b/src/interp/i-spec1.boot
index dc884bc7..7b260fd9 100644
--- a/src/interp/i-spec1.boot
+++ b/src/interp/i-spec1.boot
@@ -237,7 +237,7 @@ upAlgExtension t ==
eq2AlgExtension eq ==
-- transforms "a=b" to a-b for processing
- eq is [op,:l] and VECP op and (getUnname op='equation) =>
+ eq is [op,:l] and vector? op and (getUnname op='equation) =>
[mkAtreeNode "-",:l]
eq
@@ -931,7 +931,7 @@ mkIterZippedFun(indexList,funBody,zipType,$localVars) ==
subVecNodes(new,old,form) ==
atom form =>
- (VECP form) and (form.0 = old) => new
+ (vector? form) and (form.0 = old) => new
form
[subVecNodes(new,old,first form), :subVecNodes(new,old,rest form)]
diff --git a/src/interp/i-spec2.boot b/src/interp/i-spec2.boot
index 76da8a17..22af7a91 100644
--- a/src/interp/i-spec2.boot
+++ b/src/interp/i-spec2.boot
@@ -112,7 +112,7 @@ upDollar t ==
(not $genValue) and "or"/[CONTAINED(var,D) for var in $localVars] =>
keyedMsgCompFailure("S2IS0032",NIL)
D="Lisp" => upLispCall(op,form)
- if VECP D and (SIZE(D) > 0) then D := D.0
+ if vector? D and (SIZE(D) > 0) then D := D.0
t := evaluateType unabbrev D
categoryForm? t =>
throwKeyedMsg("S2IE0012", [t])
@@ -184,7 +184,7 @@ upequation tree ==
-- this should speed things up a bit
tree isnt [op,lhs,rhs] => NIL
$Boolean ~= getTarget(op) => NIL
- not VECP op => NIL
+ not vector? op => NIL
-- change equation into '='
op.0 := "="
bottomUp tree
@@ -722,7 +722,7 @@ upTableSetelt(op,lhs is [htOp,:args],rhs) ==
unVectorize body ==
-- transforms from an atree back into a tree
- VECP body =>
+ vector? body =>
name := getUnname body
name ~= $immediateDataSymbol => name
objValUnwrap getValue body
@@ -739,7 +739,7 @@ isType t ==
-- Returns the evaluated type if t is a tree representing a type,
-- and NIL otherwise
op:=opOf t
- VECP op =>
+ vector? op =>
isMap(op:= getUnname op) => NIL
op = 'Mapping and cons? t =>
argTypes := [isType type for type in rest t]
@@ -1116,7 +1116,7 @@ upNullTuple(op,l,tar) ==
uptypeOf form ==
form isnt [op, arg] => NIL
- if VECP arg then transferPropsToNode(getUnname arg,arg)
+ if vector? arg then transferPropsToNode(getUnname arg,arg)
if m := isType(arg) then
m := conceptualType m
else if not (m := getMode arg) then [m] := bottomUp arg
diff --git a/src/interp/i-syscmd.boot b/src/interp/i-syscmd.boot
index 762e27c7..693052a1 100644
--- a/src/interp/i-syscmd.boot
+++ b/src/interp/i-syscmd.boot
@@ -2073,7 +2073,7 @@ writify ob ==
nob.first := qcar
nob.rest := qcdr
nob
- VECP ob =>
+ vector? ob =>
isDomainOrPackage ob =>
d := mkEvalable devaluate ob
nob := ['WRITIFIED_!_!, 'DEVALUATED, writifyInner d]
@@ -2127,7 +2127,7 @@ writify ob ==
unwritable? ob ==
- cons? ob or VECP ob => false -- first for speed
+ cons? ob or vector? ob => false -- first for speed
COMPILED_-FUNCTION_-P ob or HASHTABLEP ob => true
PLACEP ob or READTABLEP ob => true
FLOATP ob => true
@@ -2147,7 +2147,7 @@ spadClosure? ob ==
fun := first ob
not (name := BPINAME fun) => nil
vec := rest ob
- not VECP vec => nil
+ not vector? vec => nil
name
dewritify ob ==
@@ -2222,7 +2222,7 @@ dewritify ob ==
nob.first := dewritifyInner qcar
nob.rest := dewritifyInner qcdr
nob
- VECP ob =>
+ vector? ob =>
n := QVMAXINDEX ob
nob := MAKE_-VEC(n+1)
HPUT($seen, ob, nob)
diff --git a/src/interp/interop.boot b/src/interp/interop.boot
index 70c86661..eefb82ea 100644
--- a/src/interp/interop.boot
+++ b/src/interp/interop.boot
@@ -202,7 +202,7 @@ oldAxiomCategoryLookupExport(catenv, self, op, sig, box, env) ==
[catform,hash, pack,:.] := catenv
opIsHasCat op => if EQL(sig, hash) then [self] else nil
null(pack) => nil
- if not VECP pack then
+ if not vector? pack then
pack:=apply(pack, [self, :rest catform])
catenv.rest.rest.first := pack
fun := basicLookup(op, sig, pack, self) => [fun]
@@ -342,11 +342,11 @@ $oldAxiomDomainDispatch :=
basicLookupCheckDefaults(op,sig,domain,dollar) ==
box := [nil]
- not VECP(dispatch := first dollar) => error "bad domain format"
+ not vector?(dispatch := first dollar) => error "bad domain format"
lookupFun := dispatch.3
dispatch.0 = 0 => -- new compiler domain object
hashPercent :=
- VECP dollar => hashType(dollar.0,0)
+ vector? dollar => hashType(dollar.0,0)
hashType(dollar,0)
hashSig :=
@@ -383,7 +383,7 @@ hashNewLookupInTable(op,sig,dollar,[domain,opvec],flag) ==
if hashCode? op and EQL(op, $hashOp1) then op := 'One
if hashCode? op and EQL(op, $hashOp0) then op := 'Zero
hashPercent :=
- VECP dollar => hashType(dollar.0,0)
+ vector? dollar => hashType(dollar.0,0)
hashType(dollar,0)
if hashCode? sig and EQL(sig, hashPercent) then
sig := hashType('(Mapping $), hashPercent)
@@ -479,7 +479,7 @@ hashNewLookupInCategories(op,sig,dom,dollar) ==
for i in 0..MAXINDEX packageVec |
(entry := packageVec.i) and entry ~= true repeat
package :=
- VECP entry =>
+ vector? entry =>
if $monitorNewWorld then
sayLooking1('"already instantiated cat package",entry)
entry
@@ -489,7 +489,7 @@ hashNewLookupInCategories(op,sig,dom,dollar) ==
if not GETL(entry,'LOADED) then loadLib entry
infovec := GETL(entry,'infovec)
success :=
- --VECP infovec => ----new world
+ --vector? infovec => ----new world
true => ----new world
opvec := infovec.1
max := MAXINDEX opvec
@@ -537,7 +537,7 @@ hashNewLookupInCategories(op,sig,dom,dollar) ==
HasAttribute(domain,attrib) ==
hashPercent :=
- VECP domain => hashType(domain.0,0)
+ vector? domain => hashType(domain.0,0)
hashType(domain,0)
isDomain domain =>
FIXP((first domain).0) =>
@@ -552,7 +552,7 @@ HasAttribute(domain,attrib) ==
newHasAttribute(domain,attrib) ==
hashPercent :=
- VECP domain => hashType(domain.0,0)
+ vector? domain => hashType(domain.0,0)
hashType(domain,0)
predIndex :=
hashCode? attrib =>
@@ -611,5 +611,5 @@ HasCategory(domain,catform') ==
-- SETF(SYMBOL_-FUNCTION cnam,mkAutoLoad(fn, cnam))
domainEqual(a,b) ==
- VECP a and VECP b and a.0 = b.0
+ vector? a and vector? b and a.0 = b.0
diff --git a/src/interp/lisplib.boot b/src/interp/lisplib.boot
index 31c00c7e..6c774ff5 100644
--- a/src/interp/lisplib.boot
+++ b/src/interp/lisplib.boot
@@ -617,7 +617,7 @@ getConstructorSignature ctor ==
getSlotFromCategoryForm ([op,:argl],index) ==
u:= eval [op,:MAPCAR('MKQ,TAKE(#argl,$FormalMapVariableList))]
- not VECP u =>
+ not vector? u =>
systemErrorHere '"getSlotFromCategoryForm"
u . index
diff --git a/src/interp/msgdb.boot b/src/interp/msgdb.boot
index c7d06279..7a646ce5 100644
--- a/src/interp/msgdb.boot
+++ b/src/interp/msgdb.boot
@@ -256,7 +256,7 @@ $msgdbListPrims == '(%m %s %ce %rj "%m" "%s" "%ce" "%rj")
noBlankBeforeP word==
integer? word => false
member(word,$msgdbNoBlanksBeforeGroup) => true
- if CVECP word and SIZE word > 1 then
+ if string? word and SIZE word > 1 then
word.0 = char '% and word.1 = char 'x => return true
word.0 = char " " => return true
(cons? word) and member(first word,$msgdbListPrims) => true
@@ -268,7 +268,7 @@ $msgdbNoBlanksAfterGroup == ['" ", " ",'"%" ,"%", :$msgdbPrims,
noBlankAfterP word==
integer? word => false
member(word,$msgdbNoBlanksAfterGroup) => true
- if CVECP word and (s := SIZE word) > 1 then
+ if string? word and (s := SIZE word) > 1 then
word.0 = char '% and word.1 = char 'x => return true
word.(s-1) = char " " => return true
(cons? word) and member(first word, $msgdbListPrims) => true
@@ -705,7 +705,7 @@ brightPrintHighlight(x, out == $OutputStream) ==
sayString(pn,out)
-- following line helps find certain bugs that slip through
-- also see sayBrightlyLength1
- VECP x => sayString('"UNPRINTABLE",out)
+ vector? x => sayString('"UNPRINTABLE",out)
atom x => sayString(object2String x,out)
[key,:rst] := x
if IDENTP key then key:=PNAME key
@@ -731,7 +731,7 @@ brightPrintHighlightAsTeX(x, out == $OutputStream) ==
pn := PNAME x
sayString(pn,out)
atom x => sayString(object2String x,out)
- VECP x => sayString('"UNPRINTABLE",out)
+ vector? x => sayString('"UNPRINTABLE",out)
[key,:rst] := x
key = '"%m" => mathprint(rst,out)
key = '"%s" =>
@@ -850,7 +850,7 @@ sayBrightlyLength1 x ==
IDENTP x => STRINGLENGTH PNAME x
-- following line helps find certain bugs that slip through
-- also see brightPrintHighlight
- VECP x => STRINGLENGTH '"UNPRINTABLE"
+ vector? x => STRINGLENGTH '"UNPRINTABLE"
atom x => STRINGLENGTH STRINGIMAGE x
2 + sayBrightlyLength x
diff --git a/src/interp/nruncomp.boot b/src/interp/nruncomp.boot
index 7bb931ab..d7b9eefd 100644
--- a/src/interp/nruncomp.boot
+++ b/src/interp/nruncomp.boot
@@ -116,7 +116,7 @@ NRTencode(x,y) == encode(x,y,true) where encode(x,compForm,firstTime) ==
--converts a domain form to a lazy domain form; everything other than
--the operation name should be assigned a slot
not firstTime and (k:= NRTassocIndex x) => k
- VECP x => systemErrorHere '"NRTencode"
+ vector? x => systemErrorHere '"NRTencode"
cons? x =>
op := first x
op = "Record" or x is ['Union,['_:,a,b],:.] =>
diff --git a/src/interp/nrunfast.boot b/src/interp/nrunfast.boot
index 76512b38..cf484760 100644
--- a/src/interp/nrunfast.boot
+++ b/src/interp/nrunfast.boot
@@ -94,12 +94,12 @@ evalSlotDomain(u,dollar) ==
u = '$ => dollar
u = "$$" => dollar
FIXP u =>
- VECP (y := dollar.u) => y
+ vector? (y := dollar.u) => y
y is ["setShellEntry",:.] => eval y
--lazy domains need to marked; this is dangerous?
y is ['SETELT,:.] => systemErrorHere "evalSlotDomain"
y is [v,:.] =>
- VECP v => lazyDomainSet(y,dollar,u) --old style has [$,code,:lazyt]
+ vector? v => lazyDomainSet(y,dollar,u) --old style has [$,code,:lazyt]
IDENTP v and constructor? v
or v in '(Record Union Mapping Enumeration) =>
lazyDomainSet(y,dollar,u) --new style has lazyt
@@ -263,7 +263,7 @@ newLookupInDomain(op,sig,addFormDomain,dollar,index) ==
addFormCell := addFormDomain.index =>
integer? KAR addFormCell =>
or/[newLookupInDomain(op,sig,addFormDomain,dollar,i) for i in addFormCell]
- if not VECP addFormCell then lazyDomainSet(addFormCell,addFormDomain,index)
+ if not vector? addFormCell then lazyDomainSet(addFormCell,addFormDomain,index)
lookupInDomainVector(op,sig,addFormDomain.index,dollar)
nil
@@ -289,7 +289,7 @@ newLookupInCategories(op,sig,dom,dollar) ==
for i in 0..MAXINDEX packageVec |
(entry := packageVec.i) and entry ~= 'T repeat
package :=
- VECP entry =>
+ vector? entry =>
if $monitorNewWorld then
sayLooking1('"already instantiated cat package",entry)
entry
@@ -299,7 +299,7 @@ newLookupInCategories(op,sig,dom,dollar) ==
if not GETL(entry,'LOADED) then loadLib entry
infovec := GETL(entry,'infovec)
success :=
- --VECP infovec => ----new world
+ --vector? infovec => ----new world
true => ----new world
opvec := infovec.1
max := MAXINDEX opvec
@@ -365,10 +365,10 @@ newLookupInCategories1(op,sig,dom,dollar) ==
valueList := [MKQ val for val in valueList]
nsig := MSUBST(dom.0,dollar.0,sig)
for i in 0..MAXINDEX packageVec | (entry := packageVec.i)
- and (VECP entry or (predIndex := rest (node := catVec.i)) and
+ and (vector? entry or (predIndex := rest (node := catVec.i)) and
(EQ(predIndex,0) or testBitVector(predvec,predIndex))) repeat
package :=
- VECP entry =>
+ vector? entry =>
if $monitorNewWorld then
sayLooking1('"already instantiated cat package",entry)
entry
@@ -378,7 +378,7 @@ newLookupInCategories1(op,sig,dom,dollar) ==
if not GETL(entry,'LOADED) then loadLib entry
infovec := GETL(entry,'infovec)
success :=
- VECP infovec =>
+ vector? infovec =>
opvec := infovec.1
max := MAXINDEX opvec
code := getOpCode(op,opvec,max)
@@ -442,12 +442,12 @@ lazyMatchArg2(s,a,dollar,domain,typeFlag) ==
integer? a =>
not typeFlag => s = domain.a
a = 6 and $isDefaultingPackage => s = devaluate dollar
- VECP (d := domainVal(dollar,domain,a)) =>
+ vector? (d := domainVal(dollar,domain,a)) =>
s = d.0 => true
domainArg := ($isDefaultingPackage => domain.6.0; domain.0)
KAR s = first d.0 and
lazyMatchArgDollarCheck(replaceSharpCalls s,d.0,dollar.0,domainArg)
- --VECP first d => lazyMatch(s,CDDR d,dollar,domain) --old style (erase)
+ --vector? first d => lazyMatch(s,CDDR d,dollar,domain) --old style (erase)
lazyMatch(replaceSharpCalls s,d,dollar,domain) --new style
a = '$ => s = devaluate dollar
a = "$$" => s = devaluate domain
@@ -540,9 +540,9 @@ newExpandTypeSlot(slot, dollar, domain) ==
newExpandLocalType(lazyt,dollar,domain) ==
- VECP lazyt => lazyt.0
+ vector? lazyt => lazyt.0
atom lazyt => lazyt
- lazyt is [vec,.,:lazyForm] and VECP vec => --old style
+ lazyt is [vec,.,:lazyForm] and vector? vec => --old style
newExpandLocalTypeForm(lazyForm,dollar,domain)
newExpandLocalTypeForm(lazyt,dollar,domain) --new style
@@ -592,7 +592,7 @@ sigDomainVal(dollar,domain,index) ==
lazyDomainSet(lazyForm,thisDomain,slot) ==
form :=
- lazyForm is [vec,.,:u] and VECP vec => u --old style
+ lazyForm is [vec,.,:u] and vector? vec => u --old style
lazyForm --new style
slotDomain := evalSlotDomain(form,thisDomain)
if $monitorNewWorld then
@@ -689,7 +689,7 @@ lazyMatchAssocV1(x,vec,domain) == --old style slot4
sayLooking(prefix,op,sig,dom) ==
$monitorNewWorld := false
dollar := devaluate dom
- atom dollar or VECP dollar or "or"/[VECP x for x in dollar] => systemError nil
+ atom dollar or vector? dollar or "or"/[vector? x for x in dollar] => systemError nil
sayBrightly
concat(prefix,formatOpSignature(op,sig),bright '"from ",form2String dollar)
$monitorNewWorld := true
@@ -697,7 +697,7 @@ sayLooking(prefix,op,sig,dom) ==
sayLooking1(prefix,dom) ==
$monitorNewWorld := false
dollar :=
- VECP dom => devaluate dom
+ vector? dom => devaluate dom
devaluateList dom
sayBrightly concat(prefix,form2String dollar)
$monitorNewWorld := true
diff --git a/src/interp/nrungo.boot b/src/interp/nrungo.boot
index 007b6416..4b7b51e9 100644
--- a/src/interp/nrungo.boot
+++ b/src/interp/nrungo.boot
@@ -68,7 +68,7 @@ NRTevalDomain form ==
compiledLookup(op,sig,dollar) ==
--called by coerceByFunction, evalForm, findEqualFun, findUniqueOpInDomain,
-- getFunctionFromDomain, optDeltaEntry, retractByFunction
- if not VECP dollar then dollar := NRTevalDomain dollar
+ if not vector? dollar then dollar := NRTevalDomain dollar
-- "^" is an alternate name for "**" in OpenAxiom libraries.
-- ??? When, we get to support Aldor libraries and the equivalence
-- ??? does not hold, we may want to do the reverse lookup too.
@@ -190,7 +190,7 @@ lookupInAddChain(op,sig,addFormDomain,dollar) ==
defaultingFunction op ==
not(op is [.,:dom]) => false
- not VECP dom => false
+ not vector? dom => false
not (#dom > 0) => false
not (dom.0 is [packageName,:.]) => false
not IDENTP packageName => false
@@ -204,7 +204,7 @@ lookupInDomain(op,sig,addFormDomain,dollar,index) ==
addFormCell := addFormDomain.index =>
integer? KAR addFormCell =>
or/[lookupInDomain(op,sig,addFormDomain,dollar,i) for i in addFormCell]
- if not VECP addFormCell then addFormCell := eval addFormCell
+ if not vector? addFormCell then addFormCell := eval addFormCell
lookupInDomainVector(op,sig,addFormCell,dollar)
nil
@@ -253,7 +253,7 @@ lookupPred(pred,dollar,domain) ==
pred is [op,p] and op in '(NOT not %not) => not lookupPred(p,dollar,domain)
pred is ['is,dom1,dom2] => domainEqual(dom1,dom2)
pred is ["has",a,b] =>
- VECP a =>
+ vector? a =>
keyedSystemError("S2GE0016",['"lookupPred",
'"vector as first argument to has"])
a := eval mkEvalable substDollarArgs(dollar,domain,a)
@@ -289,7 +289,7 @@ compareSigEqual(s,t,dollar,domain) ==
u :=
t='$ => dollar
isSharpVar t =>
- VECP domain => rest(domain.0).(POSN1(t,$FormalMapVariableList))
+ vector? domain => rest(domain.0).(POSN1(t,$FormalMapVariableList))
rest(domain).(POSN1(t,$FormalMapVariableList))
string? t and IDENTP s => (s := PNAME s; t)
nil
diff --git a/src/interp/nrunopt.boot b/src/interp/nrunopt.boot
index 963a032c..12b07154 100644
--- a/src/interp/nrunopt.boot
+++ b/src/interp/nrunopt.boot
@@ -163,7 +163,7 @@ stuffDomainSlots dollar ==
dollar.2 := infovec.2
proto4 := infovec.3
dollar.4 :=
- VECP CDDR proto4 => [COPY_-SEQ first proto4,:rest proto4] --old style
+ vector? CDDR proto4 => [COPY_-SEQ first proto4,:rest proto4] --old style
bitVector := dollar.3
predvec := first proto4
packagevec := second proto4
@@ -373,7 +373,7 @@ NRTmakeCategoryAlist() ==
['CONS, MKQ LIST2VEC slot0,
['CONS, MKQ LIST2VEC [encodeCatform x for x in catformvec],
['makeByteWordVec2,maxElement,MKQ $byteVec]]]]
- --NOTE: this is new form: old form satisfies VECP CDDR form
+ --NOTE: this is new form: old form satisfies vector? CDDR form
encodeCatform x ==
k := NRTassocIndex x => k
@@ -507,7 +507,7 @@ getOpSegment index ==
getCodeVector() ==
proto4 := $infovec.3
u := CDDR proto4
- VECP u => u --old style
+ vector? u => u --old style
rest u --new style
formatSlotDomain x ==
@@ -592,7 +592,7 @@ dcCats con ==
name := abbreviation? con or con
$infovec: local := getInfovec name
u := $infovec.3
- VECP CDDR u => dcCats1 con --old style slot4
+ vector? CDDR u => dcCats1 con --old style slot4
$predvec:= getConstructorPredicatesFromDB con
catpredvec := first u
catinfo := second u
@@ -675,13 +675,13 @@ dcSize(:options) ==
aSize := numberOfNodes infovec.2
slot4 := infovec.3
catvec :=
- VECP CDDR slot4 => second slot4
+ vector? CDDR slot4 => second slot4
third slot4
n := MAXINDEX catvec
cSize := sum(nodeSize(2),vectorSize(SIZE first slot4),vectorSize(n + 1),
nodeSize(+/[numberOfNodes catvec.i for i in 0..n]))
codeVector :=
- VECP CDDR slot4 => CDDR slot4
+ vector? CDDR slot4 => CDDR slot4
CDDDR slot4
vSize := halfWordSize(SIZE codeVector)
itotal := sum(tSize,oSize,aSize,cSize,vSize)
diff --git a/src/interp/posit.boot b/src/interp/posit.boot
index 30fbd5f1..b5582f78 100644
--- a/src/interp/posit.boot
+++ b/src/interp/posit.boot
@@ -185,7 +185,7 @@ poCharPosn posn == rest posn
pfCharPosn posn == poCharPosn posn
poLinePosn posn ==
- posn => lnLocalNum poGetLineObject posn --VECP posn =>
+ posn => lnLocalNum poGetLineObject posn --vector? posn =>
CDAR posn
pfLinePosn posn == poLinePosn posn
diff --git a/src/interp/showimp.boot b/src/interp/showimp.boot
index 06ab08b0..f7456994 100644
--- a/src/interp/showimp.boot
+++ b/src/interp/showimp.boot
@@ -155,7 +155,7 @@ getDomainExtensionsOfDomain domain ==
devaluateSlotDomain(u,dollar) ==
u = '$ => devaluate dollar
- FIXP u and VECP (y := dollar.u) => devaluate y
+ FIXP u and vector? (y := dollar.u) => devaluate y
u is ['NRTEVAL,y] => MKQ eval y
u is ['QUOTE,y] => u
u is [op,:argl] => [op,:[devaluateSlotDomain(x,dollar) for x in argl]]
@@ -168,7 +168,7 @@ getCategoriesOfDomain domain ==
test() == predkeyVec.i and
(x := catforms . i) isnt ['DomainSubstitutionMacro,:.]
fn() ==
- VECP x => devaluate x
+ vector? x => devaluate x
devaluateSlotDomain(x,domain)
getInheritanceByDoc(D,op,sig,:options) ==
@@ -196,14 +196,14 @@ getDomainRefName(dom,nam) ==
cons? nam => [getDomainRefName(dom,x) for x in nam]
not FIXP nam => nam
slot := dom.nam
- VECP slot => slot.0
+ vector? slot => slot.0
slot is ["setShellEntry",:.] =>
getDomainRefName(dom,getDomainSeteltForm slot)
slot
getDomainSeteltForm ["setShellEntry",.,.,form] ==
form is ['evalSlotDomain,u,d] => devaluateSlotDomain(u,d)
- VECP form => systemError()
+ vector? form => systemError()
form
showPredicates dom ==
@@ -241,7 +241,7 @@ showGoGet dom ==
sayBrightly [i,'": ",:formatOpSignature(op,signumList),:namePart]
formatLazyDomain(dom,x) ==
- VECP x => devaluate x
+ vector? x => devaluate x
x is [dollar,slotNumber,:form] => formatLazyDomainForm(dom,form)
systemError nil
diff --git a/src/interp/sys-utility.boot b/src/interp/sys-utility.boot
index 8c22be2e..608f23ba 100644
--- a/src/interp/sys-utility.boot
+++ b/src/interp/sys-utility.boot
@@ -299,7 +299,7 @@ minimalise x ==
z := min(rest x,ht)
if not EQ(z,rest x) then x.rest := z
hashCheck(x,ht)
- REFVECP x =>
+ vector? x =>
for i in 0..MAXINDEX x repeat
x.i := min(x.i,ht)
hashCheck(x,ht)
diff --git a/src/interp/trace.boot b/src/interp/trace.boot
index 28a50610..e970f0af 100644
--- a/src/interp/trace.boot
+++ b/src/interp/trace.boot
@@ -311,7 +311,7 @@ transTraceItem x ==
(y:= domainToGenvar x) => y
x
x
- VECP first x => transTraceItem devaluate first x
+ vector? first x => transTraceItem devaluate first x
y:= domainToGenvar x => y
throwKeyedMsg("S2IT0018",[x])
@@ -418,14 +418,14 @@ funfind("functor","opname") ==
[u for u in ops | u is [[ =opname,:.],:.]]
isDomainOrPackage dom ==
- REFVECP dom and #dom>0 and isFunctor opOf dom.0
+ vector? dom and #dom>0 and isFunctor opOf dom.0
isTraceGensym x == GENSYMP x
spadTrace(domain,options) ==
$fromSpadTrace:= true
$tracedModemap:local:= nil
- cons? domain and REFVECP first domain and (first domain).0 = 0 =>
+ cons? domain and vector? first domain and (first domain).0 = 0 =>
aldorTrace(domain,options)
not isDomainOrPackage domain => userError '"bad argument to trace"
listOfOperations:=
diff --git a/src/interp/wi2.boot b/src/interp/wi2.boot
index 828afd4c..669abeed 100644
--- a/src/interp/wi2.boot
+++ b/src/interp/wi2.boot
@@ -1119,7 +1119,7 @@ chk(x,key) == fn(x,0,key) where fn(x,cnt,key) ==
sayBrightly ["--> ", key, " <---"]
hahaha(key)
atom x => cnt
- VECP x => systemError nil
+ vector? x => systemError nil
for y in x repeat cnt := fn(y, cnt + 1, key)
cnt