aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog12
-rw-r--r--src/interp/define.boot22
-rw-r--r--src/interp/functor.boot5
-rw-r--r--src/interp/nruncomp.boot30
4 files changed, 14 insertions, 55 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index b8c0f119..af9789e4 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,17 @@
2011-11-23 Gabriel Dos Reis <gdr@cs.tamu.edu>
+ * interp/define.boot ($CheckVectorList): Remove.
+ (compDefineFunctor1): Do not bind it.
+ (reportOnFunctorCompilation): Do not call displayMissingFunctions.
+ (displayMissingFunctions): Remove as useless.
+ * interp/functor.boot (SetFunctionSlots): Do not set slot in the
+ first vector of $catvecList.
+ * interp/nruncomp.boot (buildFunctor): Remove makeCatvecCode,
+ emptyVector, domainShell. Do not call NRTcheckVector.
+ (NRTcheckVector): Remove as useless.
+
+2011-11-23 Gabriel Dos Reis <gdr@cs.tamu.edu>
+
* interp/nruncomp.boot (NRTaddDeltaCode): Do not guard the loop by
the values in the first vector in $catvecList. It is pointless.
diff --git a/src/interp/define.boot b/src/interp/define.boot
index 75e356db..9bddd837 100644
--- a/src/interp/define.boot
+++ b/src/interp/define.boot
@@ -64,7 +64,6 @@ $forceAdd := false
$functionStats := nil
$functorStats := nil
-$CheckVectorList := []
$functorTarget := nil
$condAlist := []
$uncondAlist := []
@@ -1373,7 +1372,6 @@ compDefineFunctor1(df is ['DEF,form,signature,body],
--Set in doIt, accessed in the compiler - compNoStacking
$functorForm: local := nil
$functorLocalParameters: local := nil
- $CheckVectorList: local := nil
$getDomainCode: local := nil -- code for getting views
$insideFunctorIfTrue: local:= true
$genSDVar: local:= 0
@@ -1512,7 +1510,6 @@ compFunctorBody(db,body,m,e) ==
T
reportOnFunctorCompilation() ==
- displayMissingFunctions()
if $semanticErrorStack then sayBrightly '" "
displaySemanticErrors()
if $warningStack then sayBrightly '" "
@@ -1525,25 +1522,6 @@ reportOnFunctorCompilation() ==
sayBrightly '" "
'done
-displayMissingFunctions() ==
- null $CheckVectorList => nil
- loc := nil -- list of local operation signatures
- exp := nil -- list of exported operation signatures
- for [[op,sig,:.],:pred] in $CheckVectorList | not pred repeat
- not symbolMember?(op,$formalArgList) and getXmode(op,$e) is ['Mapping,:.] =>
- loc := [[op,sig],:loc]
- exp := [[op,sig],:exp]
- if loc then
- sayBrightly ['"%l",:bright '" Missing Local Functions:"]
- for [op,sig] in loc for i in 1.. repeat
- sayBrightly ['" [",i,'"]",:bright op,
- ": ",:formatUnabbreviatedSig sig]
- if exp then
- sayBrightly ['"%l",:bright '" Missing Exported Functions:"]
- for [op,sig] in exp for i in 1.. repeat
- sayBrightly ['" [",i,'"]",:bright op,
- ": ",:formatUnabbreviatedSig sig]
-
--% domain view code
makeFunctorArgumentParameters(argl,sigl,target) ==
diff --git a/src/interp/functor.boot b/src/interp/functor.boot
index cf329dba..14f79150 100644
--- a/src/interp/functor.boot
+++ b/src/interp/functor.boot
@@ -521,15 +521,12 @@ TryGDC cond ==
SetFunctionSlots(sig,body,flag,mode) == --mode is either "original" or "adding"
null body => return nil
- u := first $catvecList
- for catImplem in LookUpSigSlots(sig,categoryExports u) repeat
+ for catImplem in LookUpSigSlots(sig,categoryExports $domainShell) repeat
catImplem is [q,.,index] and q in '(ELT CONST) =>
if q = 'CONST and body is ['CONS,a,b] then
body := ['CONS,'IDENTITY,['FUNCALL,a,b]]
body:= ['%store,['%tref,'$,index],body]
not vector? $SetFunctions => nil --packages don't set it
- if TruthP flag then -- unconditionally defined function
- vectorRef(u,index) := true
TruthP vectorRef($SetFunctions,index) => -- the function was already assigned
return body := nil
vectorRef($SetFunctions,index) :=
diff --git a/src/interp/nruncomp.boot b/src/interp/nruncomp.boot
index 5a130cb7..319c5f23 100644
--- a/src/interp/nruncomp.boot
+++ b/src/interp/nruncomp.boot
@@ -454,7 +454,6 @@ buildFunctor(db,sig,code,$locals,$e) ==
--LOCAL BOUND FLUID VARIABLES:
$GENNO: local:= 0 --bound in compDefineFunctor1, then as parameter here
- $catvecList: local := nil --list of vectors v1..vn for each view
$hasCategoryAlist: local := nil --list of GENSYMs bound to (HasCategory ..) items
$catsig: local := nil --target category
$SetFunctions: local := nil --copy of p view with preds telling when fnct defined
@@ -478,16 +477,8 @@ buildFunctor(db,sig,code,$locals,$e) ==
-- a list, one %for each element of catvecListMaker
-- indicating under what conditions this
-- category should be present. true => always
- makeCatvecCode := first catvecListMaker
- emptyVector := vector []
- domainShell := newShell($NRTbase + $NRTdeltaLength)
- for i in 0..4 repeat
- vectorRef(domainShell,i) := vectorRef($domainShell,i)
- --we will clobber elements; copy since $domainShell may be a cached vector
dbTemplate(db) := newShell($NRTbase + $NRTdeltaLength)
- $SetFunctions := newShell # domainShell
- $catvecList :=
- [domainShell,:[emptyVector for u in categoryAncestors domainShell]]
+ $SetFunctions := newShell # dbTemplate db
-- list of names n1..nn for each view
viewNames := ['$,:[genvar() for u in rest catvecListMaker]]
domname := 'dv_$
@@ -513,7 +504,6 @@ buildFunctor(db,sig,code,$locals,$e) ==
[['stuffDomainSlots,'$],:argStuffCode,
:predBitVectorCode2,storeOperationCode]
- $CheckVectorList := NRTcheckVector domainShell
-- Local bindings
bindings := [:devaluateCode,createDomainCode,
createViewCode,createPredVecCode] where
@@ -543,24 +533,6 @@ buildFunctor(db,sig,code,$locals,$e) ==
SAY ['"time taken in buildFunctor: ",TEMPUS_-FUGIT()-oldtime]
ans
-NRTcheckVector domainShell ==
---RETURNS: an alist (((op,sig),:pred) ...) of missing functions
- alist := nil
- for i in $NRTbase..maxIndex domainShell repeat
---Vector elements can be one of
--- (a) T -- item was marked
--- (b) nil -- ???
--- (c) categoryForm-- it was a domain view; now irrelevant
--- (d) op-signature-- store missing function info in $CheckVectorList
- v := vectorRef(domainShell,i)
- v=true => nil --item is marked; ignore
- v=nil => nil
- v isnt [.,:.] => systemErrorHere '"CheckVector"
- first v isnt [.,:.] => nil --category form; ignore
- assoc(first v,alist) => nil
- alist := [[first v,:vectorRef($SetFunctions,i)],:alist]
- alist
-
NRTsetVector4Part1(siglist,formlist,condlist) ==
$uncondList: local := nil
$condList: local := nil