aboutsummaryrefslogtreecommitdiff
path: root/src/interp/br-data.boot
diff options
context:
space:
mode:
Diffstat (limited to 'src/interp/br-data.boot')
-rw-r--r--src/interp/br-data.boot13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/interp/br-data.boot b/src/interp/br-data.boot
index 26ca4f08..7a6f1485 100644
--- a/src/interp/br-data.boot
+++ b/src/interp/br-data.boot
@@ -504,8 +504,13 @@ parentsOf con == --called by kcpPage, ancestorsRecur
tableValue($parentsCache,con) := parents
parents
-parentsOfForm [op,:argl] ==
- parents := parentsOf op
+++ Like `parentsOf', except that also handles builtin constructors.
+genericParentsOf form ==
+ builtinConstructor? form.op => parentsOfBuiltinInstance form
+ parentsOf form.op
+
+parentsOfForm(form is [op,:argl]) ==
+ parents := genericParentsOf form
argl = nil or argl = (newArgl := getConstructorFormFromDB(op).args) =>
parents
applySubst(pairList(newArgl,argl),parents)
@@ -563,8 +568,8 @@ ancestorsRecur(conform,domform,pred,firstTime?) == --called by ancestorsOf
pred = tableValue($done,conform) => nil --skip if already processed
parents :=
firstTime? => dbPrincipals constructorDB op
- parentsOf op
- originalConform := getConstructorForm op
+ genericParentsOf conform
+ originalConform := genericInstanceForm conform
if conform ~= originalConform then
parents := applySubst(pairList(originalConform.args,conform.args),parents)
for [newform,:p] in parents repeat