aboutsummaryrefslogtreecommitdiff
path: root/src/interp
diff options
context:
space:
mode:
Diffstat (limited to 'src/interp')
-rw-r--r--src/interp/define.boot7
-rw-r--r--src/interp/lisplib.boot19
2 files changed, 11 insertions, 15 deletions
diff --git a/src/interp/define.boot b/src/interp/define.boot
index d8cf7fef..34a79a41 100644
--- a/src/interp/define.boot
+++ b/src/interp/define.boot
@@ -343,8 +343,10 @@ chaseInferences(pred,$e) ==
--=======================================================================
-- Generate Code to Create Infovec
--=======================================================================
+++ Called by compDefineFunctor1 to create infovec at compile time
getInfovecCode(db,e) ==
---Function called by compDefineFunctor1 to create infovec at compile time
+ $byteVec: local := nil
+ $byteAddress: local := 0
['LIST,
MKQ makeDomainTemplate db,
MKQ makeCompactDirect(db,NRTmakeSlot1Info db),
@@ -1457,11 +1459,8 @@ compDefineFunctor1(df is ['DEF,form,signature,body],
dbAncestors(db) := computeAncestorsOf($form,nil)
$insideFunctorIfTrue:= false
if not $bootStrapMode then
- libFn := dbAbbreviation db
$lookupFunction: local := NRTgetLookupFunction(db,$NRTaddForm,$e)
--either lookupComplete (for forgetful guys) or lookupIncomplete
- $byteAddress :local := 0
- $byteVec :local := nil
$NRTslot1PredicateList :=
[simpBool x for x in $NRTslot1PredicateList]
LAM_,FILEACTQ('loadTimeStuff,
diff --git a/src/interp/lisplib.boot b/src/interp/lisplib.boot
index a7ef99c4..ac8c39e8 100644
--- a/src/interp/lisplib.boot
+++ b/src/interp/lisplib.boot
@@ -535,7 +535,9 @@ finalizeLisplib(ctor,libName) ==
writeCategory(ctor,dbCategory db,$libFile)
lisplibWrite('"sourceFile",namestring _/EDITFILE,$libFile)
lisplibWrite('"modemaps",dbModemaps db,$libFile)
- opsAndAtts := getConstructorOpsAndAtts(form,kind,mm)
+ opsAndAtts :=
+ kind = 'category => getCategoryOpsAndAtts form
+ getFunctorOpsAndAtts(form,mm.mmTarget)
writeOperations(ctor,first opsAndAtts,$libFile)
if kind='category then
$NRTslot1PredicateList : local := []
@@ -569,24 +571,19 @@ getPartialConstructorModemapSig(c) ==
(s := getConstructorSignature c) => rest s
throwEvalTypeMsg("S2IL0015",[c])
-getConstructorOpsAndAtts(form,kind,modemap) ==
- kind is 'category => getCategoryOpsAndAtts(form)
- getFunctorOpsAndAtts(form,modemap)
-
getCategoryOpsAndAtts(catForm) ==
-- returns [operations,:attributes] of first catForm
[transformOperationAlist getSlotFromCategoryForm(catForm,1),
:getSlotFromCategoryForm(catForm,2)]
-getFunctorOpsAndAtts(form,modemap) ==
- [transformOperationAlist getSlotFromFunctor(form,1,modemap),
- :getSlotFromFunctor(form,2,modemap)]
+getFunctorOpsAndAtts(form,target) ==
+ [transformOperationAlist $lisplibOperationAlist,
+ :getSlotFromFunctor target]
-getSlotFromFunctor([name,:args],slot,[[.,target,:argMml],:.]) ==
- slot = 1 => $lisplibOperationAlist
+getSlotFromFunctor(target) ==
t := compMakeCategoryObject(target,$e) or
systemErrorHere "getSlotFromFunctor"
- t.expr.slot
+ categoryRef(t.expr,2)
getSlot1 domainName ==
$e: local:= $CategoryFrame