diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/interp/buildom.boot | 8 | ||||
-rw-r--r-- | src/interp/compiler.boot | 2 | ||||
-rw-r--r-- | src/interp/define.boot | 10 | ||||
-rw-r--r-- | src/interp/i-coerce.boot | 8 | ||||
-rw-r--r-- | src/interp/i-eval.boot | 2 | ||||
-rw-r--r-- | src/interp/i-funsel.boot | 2 | ||||
-rw-r--r-- | src/interp/i-special.boot | 8 | ||||
-rw-r--r-- | src/interp/lisplib.boot | 6 | ||||
-rw-r--r-- | src/interp/nruncomp.boot | 54 |
9 files changed, 50 insertions, 50 deletions
diff --git a/src/interp/buildom.boot b/src/interp/buildom.boot index 9856c5e6..8ecf95f6 100644 --- a/src/interp/buildom.boot +++ b/src/interp/buildom.boot @@ -115,7 +115,7 @@ lazyCompareSigEqual(s,tslot,dollar,domain) == item is [.,[functorName,:.]] and functorName = s.op => compareSigEqual(s,canonicalForm evalDomain lazyt,dollar,domain) nil - compareSigEqual(s,NRTreplaceLocalTypes(tslot,domain),dollar,domain) + compareSigEqual(s,replaceLocalTypes(tslot,domain),dollar,domain) compareSigEqual(s,t,dollar,domain) == @@ -207,7 +207,7 @@ goGet(:l) == explicitLookupDomainIfTrue := odd? code2 index := code2 quo 2 kind := (isConstant => 'CONST; 'ELT) - sig := [NRTreplaceLocalTypes(s,thisDomain) for s in initSig] + sig := [replaceLocalTypes(s,thisDomain) for s in initSig] sig := substDomainArgs(thisDomain,sig) lookupDomain := domainSlot = 0 => thisDomain @@ -223,14 +223,14 @@ goGet(:l) == domainRef(thisDomain,index) := fn val -NRTreplaceLocalTypes(t,dom) == +replaceLocalTypes(t,dom) == t isnt [.,:.] => not integer? t => t t := domainRef(dom,t) if cons? t then t := evalDomain t canonicalForm t t.op is ":" or builtinConstructor? t.op => - [t.op,:[NRTreplaceLocalTypes(x,dom) for x in t.args]] + [t.op,:[replaceLocalTypes(x,dom) for x in t.args]] t substDomainArgs(domain,object) == diff --git a/src/interp/compiler.boot b/src/interp/compiler.boot index 76aefd3d..60f2fc50 100644 --- a/src/interp/compiler.boot +++ b/src/interp/compiler.boot @@ -83,7 +83,7 @@ $IOFormDomains == compTopLevel: (%Form,%Mode,%Env) -> %Maybe %Triple compTopLevel(x,m,e) == - -- signals that target is derived from lhs-- see NRTmakeSlot1Info + -- signals that target is derived from lhs-- see makeSlot1Info $NRTderivedTargetIfTrue: local := false $currentFunction: local := nil $forceAdd: local:= false diff --git a/src/interp/define.boot b/src/interp/define.boot index 0195e4e2..ff65b86d 100644 --- a/src/interp/define.boot +++ b/src/interp/define.boot @@ -366,9 +366,9 @@ getInfovecCode(db,e) == $byteAddress: local := 0 ['LIST, MKQ makeDomainTemplate db, - MKQ makeCompactDirect(db,NRTmakeSlot1Info db), - MKQ NRTgenFinalAttributeAlist(db,e), - NRTmakeCategoryAlist(db,e), + MKQ makeCompactDirect(db,makeSlot1Info db), + MKQ genFinalAttributeAlist(db,e), + makeCategoryAlist(db,e), MKQ dbLookupFunction db] --======================================================================= @@ -485,7 +485,7 @@ depthAssoc(x,cache) == where n() == 1 + "MAX"/[rest y for y in v] tableValue(cache,x) := [[x,:0]] -NRTmakeCategoryAlist(db,e) == +makeCategoryAlist(db,e) == pcAlist := [:[[x,:true] for x in $uncondAlist],:$condAlist] levelAlist := depthAssocList(substSource pcAlist,hashTable 'EQUAL) opcAlist := sortBy(function(x +-> LASSOC(first x,levelAlist)),pcAlist) @@ -1526,7 +1526,7 @@ compDefineFunctor1(db,df is ['DEF,form,signature,body],m,$e,$formalArgList) == $condAlist: local := nil $uncondAlist: local := nil $NRTslot1PredicateList: local := predicatesFromAttributes attributeList - $NRTattributeAlist: local := NRTgenInitialAttributeAlist(db,attributeList) + $NRTattributeAlist: local := genInitialAttributeAlist(db,attributeList) $NRTaddForm: local := nil -- see compAdd -- Generate slots for arguments first, then implicit parameters, -- then for $NRTaddForm (if any) in compAdd diff --git a/src/interp/i-coerce.boot b/src/interp/i-coerce.boot index 4cddcbc7..108b5eb8 100644 --- a/src/interp/i-coerce.boot +++ b/src/interp/i-coerce.boot @@ -871,7 +871,7 @@ coerceInt1(triple,t2) == $genValue => fun := getFunctionFromDomain(unwrap val,dc,argl) objNewWrap(fun,t2) - val := NRTcompileEvalForm(unwrap val, rest CAAR mms, evalDomain dc) + val := compileEvalForm(unwrap val, rest CAAR mms, evalDomain dc) objNew(val, t2) (t1 is ['Variable,sym]) and (t2 is ['Mapping,target,:margl]) => null (mms := selectMms1(sym,target,margl,margl,nil)) => @@ -880,7 +880,7 @@ coerceInt1(triple,t2) == targ ~= target => nil dc is ["__FreeFunction__",:freeFun] => objNew( freeFun, t2 ) $genValue => objNewWrap( getFunctionFromDomain(sym,dc,argl), t2 ) - val := NRTcompileEvalForm(sym, rest CAAR mms, evalDomain dc) + val := compileEvalForm(sym, rest CAAR mms, evalDomain dc) objNew(val, t2) (t1 is ['FunctionCalled,sym]) and (t2 is ['Mapping,target,:margl]) => symNode := mkAtreeNode sym @@ -1314,7 +1314,7 @@ coerceByFunction(T,m2) == fun := isWrapped x => NRTcompiledLookup("=", [$Boolean, '$, '$], dcVector) - NRTcompileEvalForm("=", [$Boolean, '$, '$], dcVector) + compileEvalForm("=", [$Boolean, '$, '$], dcVector) [fn,:d]:= fun isWrapped x => x:= unwrap x @@ -1332,7 +1332,7 @@ coerceByFunction(T,m2) == --+ isWrapped x => NRTcompiledLookup(funName,slot,dcVector) - NRTcompileEvalForm(funName,slot,dcVector) + compileEvalForm(funName,slot,dcVector) [fn,:d]:= fun fn = function Undef => nil isWrapped x => diff --git a/src/interp/i-eval.boot b/src/interp/i-eval.boot index 582089f2..7485401e 100644 --- a/src/interp/i-eval.boot +++ b/src/interp/i-eval.boot @@ -249,7 +249,7 @@ evalForm(op,opName,argl,mmS) == newType? CAAR mm => mm' := first ncSigTransform mm ncGetFunction(opName, first mm', rest mm') - NRTcompileEvalForm(opName,fun,dcVector) + compileEvalForm(opName,fun,dcVector) null fun0 => throwKeyedMsg("S2IE0008",[opName]) [bpi,:domain] := fun0 sameObject?(bpi,function Undef) => diff --git a/src/interp/i-funsel.boot b/src/interp/i-funsel.boot index def3fb8b..1deb25cb 100644 --- a/src/interp/i-funsel.boot +++ b/src/interp/i-funsel.boot @@ -737,7 +737,7 @@ findUniqueOpInDomain(op,opName,dom) == fun := $genValue => compiledLookupCheck(opName,sig,evalDomain dom) - NRTcompileEvalForm(opName, sig, evalDomain dom) + compileEvalForm(opName, sig, evalDomain dom) fun=nil or not cons? fun => nil first fun = function(Undef) => throwKeyedMsg("S2IS0023",[opName,dom]) binVal := diff --git a/src/interp/i-special.boot b/src/interp/i-special.boot index be7776e2..eb9f984d 100644 --- a/src/interp/i-special.boot +++ b/src/interp/i-special.boot @@ -2085,10 +2085,10 @@ uppretend t == --% Handlers for REDUCE -----------------------Compiler for Interpreter--------------------------------- -NRTcompileEvalForm(opName,sigTail,dcVector) == +compileEvalForm(opName,sigTail,dcVector) == u := NRTcompiledLookup(opName,sigTail,dcVector) not $insideCompileBodyIfTrue => MKQ u - k := NRTgetMinivectorIndex(u,opName,sigTail,dcVector) + k := getMinivectorIndex(u,opName,sigTail,dcVector) ['ELT,"$$$",k] --$$$ denotes minivector --------------------> NEW DEFINITION (see interop.boot.pamphlet) @@ -2102,7 +2102,7 @@ NRTtypeHack t == first t = '_# => # second t [first t,:[NRTtypeHack tt for tt in rest t]] -NRTgetMinivectorIndex(u,op,sig,domVector) == +getMinivectorIndex(u,op,sig,domVector) == s := # $minivector k := or/[k for k in 0..(s-1) for x in $minivector | sameObject?(x,u)] => k @@ -2130,7 +2130,7 @@ getReduceFunction(op,type,result, locale) == dc='local => [MKQ [fun,:'local],:first sig] dcVector := evalDomain dc $compilingMap => - k := NRTgetMinivectorIndex( + k := getMinivectorIndex( NRTcompiledLookup(op,sig,dcVector),op,sig,dcVector) ['ELT,"$$$",k] --$$$ denotes minivector env:= diff --git a/src/interp/lisplib.boot b/src/interp/lisplib.boot index 828bdc96..28534646 100644 --- a/src/interp/lisplib.boot +++ b/src/interp/lisplib.boot @@ -42,7 +42,7 @@ module lisplib --======================================================================= -- Generate Slot 2 Attribute Alist --======================================================================= -NRTgenInitialAttributeAlist(db,attributeList) == +genInitialAttributeAlist(db,attributeList) == --alist has form ((item pred)...) where some items are constructor forms alist := [x for x in attributeList | -- throw out constructors constructorDB opOf first x = nil] @@ -59,7 +59,7 @@ simplifyAttributeAlist(db,al) == [[a,:pred],:simplifyAttributeAlist(db,s)] nil -NRTgenFinalAttributeAlist(db,e) == +genFinalAttributeAlist(db,e) == [[a,:k] for [a,:b] in $NRTattributeAlist | (k := predicateBitIndex(b,e)) ~= -1] @@ -557,7 +557,7 @@ finalizeLisplib(db,libName) == writeOperations(db,first opsAndAtts) if dbConstructorKind db = 'category then $NRTslot1PredicateList : local := [] - NRTgenInitialAttributeAlist(db,rest opsAndAtts) + genInitialAttributeAlist(db,rest opsAndAtts) writeSuperDomain db writeCapsuleLevelDefinitions db writeAttributes db diff --git a/src/interp/nruncomp.boot b/src/interp/nruncomp.boot index 0271c9a4..728f3e99 100644 --- a/src/interp/nruncomp.boot +++ b/src/interp/nruncomp.boot @@ -58,7 +58,7 @@ $NRTaddForm := nil ++ $NRTderivedTargetIfTrue := false -NRTaddDeltaCode db == +addDeltaCode db == --NOTES: This function is called from buildFunctor to initially -- fill slots in dbTemplate. The dbTemplate so created is stored in the -- NRLIB. On load, makeDomainTemplate is called on this dbTemplate to @@ -215,7 +215,7 @@ genDeltaEntry(op,mm,e) == ident? dc and symbolMember?(dc,$functorLocalParameters)) then -- This modemap's domain of computation did not contributte an -- an operation before; give it a slot before the modemap itself. - entry := [["%domain",NRTaddInner(db,dc)]] + entry := [["%domain",addInner(db,dc)]] dbUsedEntities(db) := [entry,:dbUsedEntities db] dbEntityCount(db) := dbEntityCount db + 1 entry.rest := compOrCroak(odc,$EmptyMode,e).expr @@ -246,12 +246,12 @@ getLocalIndex(db,item) == item is "$$" => 2 k := assocIndex(db,item) => k item isnt [.,:.] and not symbolMember?(item,$formalArgList) => --give slots to atoms - entry := [["%domain",NRTaddInner(db,item)],:item] + entry := [["%domain",addInner(db,item)],:item] dbUsedEntities(db) := [entry,:dbUsedEntities db] index := $NRTbase + dbEntityCount db -- slot number to return dbEntityCount(db) := dbEntityCount db + 1 index - entry := [["%domain",NRTaddInner(db,item)]] + entry := [["%domain",addInner(db,item)]] dbUsedEntities(db) := [entry,:dbUsedEntities db] saveIndex := $NRTbase + dbEntityCount db dbEntityCount(db) := dbEntityCount db + 1 @@ -265,30 +265,30 @@ getLocalIndex(db,item) == compOrCroak(item,$EmptyMode,$e).expr saveIndex -++ NRTaddInner should call following function instead of getLocalIndex +++ addInner should call following function instead of getLocalIndex ++ This would prevent putting spurious items in dbUsedEntities -NRTinnerGetLocalIndex(db,x) == +innerGetLocalIndex(db,x) == x isnt [.,:.] => x op := x.op ident? op and (constructor? op or builtinConstructor? op) => getLocalIndex(db,x) op is "[||]" => getLocalIndex(db,x) - NRTaddInner(db,x) + addInner(db,x) -NRTaddInner(db,x) == +addInner(db,x) == --called by genDeltaEntry and others that affect dbUsedEntities do x isnt [.,:.] => nil - x is [":",y,z] => [x.op,y,NRTinnerGetLocalIndex(db,z)] - x is ['SubDomain,y,:.] => NRTinnerGetLocalIndex(db,y) + x is [":",y,z] => [x.op,y,innerGetLocalIndex(db,z)] + x is ['SubDomain,y,:.] => innerGetLocalIndex(db,y) builtinConstructor? x.op or x.op is "[||]" => for y in x.args repeat - NRTinnerGetLocalIndex(db,y) + innerGetLocalIndex(db,y) niladicConstructor? x.op => nil cosig := getDualSignature x.op => for y in x.args for t in cosig.source | y isnt '$ and t repeat - NRTinnerGetLocalIndex(db,y) + innerGetLocalIndex(db,y) keyedSystemError("S2NR0003",[x]) x @@ -330,7 +330,7 @@ consDomainForm(db,x,dc) == ++ Called by buildFunctor fill dbTemplate slots with names ++ of compiled functions -NRTdescendCodeTran(db,u,condList) == +descendCodeTran(db,u,condList) == null u => nil u is ['%list] => nil u is ['%store,['%tref,.,i],a] => @@ -343,8 +343,8 @@ NRTdescendCodeTran(db,u,condList) == fn nil --code for this will be generated by the instantiator u is ['%when,:c] => - for [pred,:y] in c|y repeat NRTdescendCodeTran(db,first y,[pred,:condList]) - u is ['PROGN,:c] => for x in c repeat NRTdescendCodeTran(db,x,condList) + for [pred,:y] in c|y repeat descendCodeTran(db,first y,[pred,:condList]) + u is ['PROGN,:c] => for x in c repeat descendCodeTran(db,x,condList) nil ++ Remove useless statements from the elaboration `form' of @@ -480,14 +480,14 @@ buildFunctor(db,sig,code,$locals,$e) == -- Do this now to create predicate vector; then DescendCode can refer -- to predicate vector if it can [$uncondAlist,:$condAlist] := --bound in compDefineFunctor1 - NRTsetVector4Part1(db,viewNames,catvecListMaker,condCats,$e) + setVector4Part1(db,viewNames,catvecListMaker,condCats,$e) [$NRTslot1PredicateList,predBitVectorCode1,:predBitVectorCode2] := makePredicateBitVector(db,[:ASSOCRIGHT $condAlist,:$NRTslot1PredicateList],$e) storeOperationCode := DescendCode(db,code,true,nil,$e) - NRTaddDeltaCode db + addDeltaCode db storeOperationCode := NRTputInLocalReferences(db,storeOperationCode) - NRTdescendCodeTran(db,storeOperationCode,nil) --side effects storeOperationCode + descendCodeTran(db,storeOperationCode,nil) --side effects storeOperationCode codePart2:= argStuffCode := [['%store,['%tref,'$,i],v] for i in $NRTbase.. for v in $FormalMapVariableList @@ -513,7 +513,7 @@ buildFunctor(db,sig,code,$locals,$e) == slot3Code := ['%store,['%tref,"$",3],"pv$"] slamCode := isCategoryPackageName name => nil - [NRTaddToSlam($definition,"$")] + [addToSlam($definition,"$")] --CODE: part 3 $ConstantAssignments := @@ -527,13 +527,13 @@ buildFunctor(db,sig,code,$locals,$e) == SAY ['"time taken in buildFunctor: ",TEMPUS_-FUGIT()-oldtime] ans -NRTsetVector4Part1(db,siglist,formlist,condlist,e) == +setVector4Part1(db,siglist,formlist,condlist,e) == $uncondList: local := nil $condList: local := nil $count: local := 0 for sig in reverse siglist for form in reverse formlist for cond in reverse condlist repeat - NRTsetVector4a(db,sig,form,cond,e) + setVector4a(db,sig,form,cond,e) reducedUncondlist := removeDuplicates $uncondList reducedConlist := [[x,:y] for [x,z] in $condList| y := SETDIFFERENCE(z,reducedUncondlist)] @@ -551,7 +551,7 @@ reverseCondlist cl == u.rest := [x,:rest u] alist -NRTsetVector4a(db,sig,form,cond,e) == +setVector4a(db,sig,form,cond,e) == sig is '$ => domainList := [domForm for d in categoryPrincipals dbDomainShell db] where @@ -566,7 +566,7 @@ NRTsetVector4a(db,sig,form,cond,e) == $uncondList := [form,:append(categoryPrincipals evalform,$uncondList)] $condList := [[cond,[form,:categoryPrincipals evalform]],:$condList] -NRTmakeSlot1Info db == +makeSlot1Info db == -- 4 cases: -- a:T == b add c --- slot1 directory has #s for entries defined in c -- a:T == b --- slot1 has all slot #s = nil (see compFunctorBody) @@ -592,19 +592,19 @@ slot1Filter opList == u := [entry for entry in l | integer? second entry] => [op,:u] nil -NRToptimizeHas u == +optimizeHas u == --u is a list ((pred cond)...) -- see optFunctorBody --produces an alist: (((HasCategory a b) . gensym)...) u is [a,:b] => a='HasCategory => LASSOC(u,$hasCategoryAlist) or $hasCategoryAlist := [[u,:(y:=gensym())],:$hasCategoryAlist] y - a="has" => NRToptimizeHas ['HasCategory,first b,MKQ second b] + a="has" => optimizeHas ['HasCategory,first b,MKQ second b] a is 'QUOTE => u - [NRToptimizeHas a,:NRToptimizeHas b] + [optimizeHas a,:optimizeHas b] u -NRTaddToSlam([name,:argnames],shell) == +addToSlam([name,:argnames],shell) == dbInstanceCache constructorDB name = nil => return nil null argnames => addToConstructorCache(name,nil,shell) args := ['%list,:ASSOCRIGHT $devaluateList] |