aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog5
-rw-r--r--src/interp/category.boot30
2 files changed, 7 insertions, 28 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 1e8a3f59..af2408aa 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,10 @@
2011-11-15 Gabriel Dos Reis <gdr@cs.tamu.edu>
+ * interp/category.boot (JoinInner): Remove effective dead code
+ controlled by originalvector which has non-changing value false.
+
+2011-11-15 Gabriel Dos Reis <gdr@cs.tamu.edu>
+
* interp/category.boot (JoinInner): Use idiomatic Boot for loops.
2011-11-14 Gabriel Dos Reis <gdr@cs.tamu.edu>
diff --git a/src/interp/category.boot b/src/interp/category.boot
index 82227846..f6c2932d 100644
--- a/src/interp/category.boot
+++ b/src/interp/category.boot
@@ -401,10 +401,9 @@ JoinInner(l,$e) ==
FundamentalAncestors := categoryAncestors principal
if principal.0 then
FundamentalAncestors := [[principal.0],:FundamentalAncestors]
- copied := false
-- we can not decide to extend the vector in multiple ways
-- this flag helps us detect this case
- originalVector := false
+ copied := false
-- this skips buggy code which discards needed categories
for [b,condition] in FindFundAncs(l',$e) | bname := b.0 repeat
CondAncestorP(bname,FundamentalAncestors,condition,$e) => nil
@@ -437,32 +436,7 @@ JoinInner(l,$e) ==
copied := true
if ancindex then
principal.ancindex := bname
- reallynew := nil
- else if originalVector and condition is true then
- principal := CatEval(bname,$e)
- copied := nil
- FundamentalAncestors := [[bname],:categoryAncestors principal]
- --bname is Principal, so comes first
- reallynew := nil
- objectMember?(b,l) =>
- --objectMember? since category vectors are guaranteed unique
- sigl := categoryExports principal
- attl := categoryAttributes principal
- l := remove(l,b)
- CondList := remove(CondList,objectAssoc(b,CondList))
- globalDomains := categoryParameters principal
- for u in categoryExports principal repeat
- if not listMember?(u,sigl) then
- [s,c,i] := u
- sigl :=
- c is true => [[s,condition,i],:sigl]
- [[s,["and",condition,c],i],:sigl]
- for u in categoryAttributes principal repeat
- if not listMember?(u,attl) then
- [a,c] := u
- attl :=
- c is true => [[a,condition],:attl]
- [[a,["and",condition,c]],:attl]
+ reallynew := false
if reallynew then
n := # principal
FundamentalAncestors := [[b.0,condition,n],:FundamentalAncestors]