aboutsummaryrefslogtreecommitdiff
path: root/src/interp
diff options
context:
space:
mode:
authorGabriel Dos Reis <gdr@axiomatics.org>2016-01-07 04:51:50 -0800
committerGabriel Dos Reis <gdr@axiomatics.org>2016-01-07 04:51:50 -0800
commit191de261d5a6dde0e287e33431f9a62a36f67ffa (patch)
tree67b21031881f18233b9636a884603a033daa8de2 /src/interp
parent4235e2d5a50959dfd6813f4c854abcc7f3b65639 (diff)
downloadopen-axiom-191de261d5a6dde0e287e33431f9a62a36f67ffa.tar.gz
computeAncestorsOf: First parameter is now a DB for the the constructor.
Diffstat (limited to 'src/interp')
-rw-r--r--src/interp/br-data.boot8
-rw-r--r--src/interp/define.boot4
2 files changed, 7 insertions, 5 deletions
diff --git a/src/interp/br-data.boot b/src/interp/br-data.boot
index 039874d5..6399277c 100644
--- a/src/interp/br-data.boot
+++ b/src/interp/br-data.boot
@@ -550,12 +550,14 @@ ancestorsOf(conform,domform) == --called by kcaPage, originsInOrder,...
if domform then right := simpHasPred right
right = false => nil
[left,:right]
- computeAncestorsOf(conform,domform)
+ -- FIXME: Handle builtin constructors such as Record and friends.
+ db := constructorDB conname
+ computeAncestorsOf(db,domform)
-computeAncestorsOf(conform,domform) ==
+computeAncestorsOf(db,domform) ==
$done: local := hashTable 'EQUAL
$if: local := hashTable 'EQ
- ancestorsRecur(conform,domform,true,true)
+ ancestorsRecur(dbConstructorForm db,domform,true,true)
acc := nil
for op in listSort(function GLESSEQP,HKEYS $if) repeat
for pair in tableValue($if,op) repeat acc := [pair,:acc]
diff --git a/src/interp/define.boot b/src/interp/define.boot
index 299d0304..42bcf4df 100644
--- a/src/interp/define.boot
+++ b/src/interp/define.boot
@@ -1176,7 +1176,7 @@ compDefineCategory2(db,form,signature,body,m,e,$formalArgList) ==
dbConstructorModemap(db) :=
[[parForm,:parSignature],[buildConstructorCondition db,$op]]
dbPrincipals(db) := getParentsFor db
- dbAncestors(db) := computeAncestorsOf(form,nil)
+ dbAncestors(db) := computeAncestorsOf(db,nil)
dbModemaps(db) := modemapsFromCategory(db,[op',:sargl],formalBody,signature')
[fun,$Category,e]
@@ -1569,7 +1569,7 @@ compDefineFunctor1(db,df is ['DEF,form,signature,body],m,$e,$formalArgList) ==
-- 5.
dbPrincipals(db) := getParentsFor db
- dbAncestors(db) := computeAncestorsOf($form,nil)
+ dbAncestors(db) := computeAncestorsOf(db,nil)
$insideFunctorIfTrue:= false
if not $bootStrapMode then
dbLookupFunction(db) := NRTgetLookupFunction(db,$NRTaddForm,tbl,$e)