diff options
author | dos-reis <gdr@axiomatics.org> | 2011-11-07 08:52:50 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2011-11-07 08:52:50 +0000 |
commit | fe9dc717e927b11fd11489da7dca45912e87bb3b (patch) | |
tree | 5a8891a7eaf6272a519f3b68ea567ad3e1ea9701 | |
parent | 0062eb960026efdf72e3ecb301aa46054e0d5ca2 (diff) | |
download | open-axiom-fe9dc717e927b11fd11489da7dca45912e87bb3b.tar.gz |
* interp/lisplib.boot (getConstructorOpsAndAtts): Fold content in
called. Remove.
(getFunctorOpsAndAtts): Simplify.
(getSlotFromFunctor): Rework.
* interp/define.boot (getInfovecCode): Bind $byteVec and
$byteAddress here.
(compDefineFunctor1): Not here.
-rw-r--r-- | src/ChangeLog | 10 | ||||
-rw-r--r-- | src/interp/define.boot | 7 | ||||
-rw-r--r-- | src/interp/lisplib.boot | 19 |
3 files changed, 21 insertions, 15 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 8fd826c8..f6ee0934 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,13 @@ +2011-11-07 Gabriel Dos Reis <gdr@cs.tamu.edu> + + * interp/lisplib.boot (getConstructorOpsAndAtts): Fold content in + called. Remove. + (getFunctorOpsAndAtts): Simplify. + (getSlotFromFunctor): Rework. + * interp/define.boot (getInfovecCode): Bind $byteVec and + $byteAddress here. + (compDefineFunctor1): Not here. + 2011-11-06 Gabriel Dos Reis <gdr@cs.tamu.edu> * interp/compiler.boot ($compileOnlyCertainItems): Remove. 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 |