diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/ChangeLog | 7 | ||||
-rw-r--r-- | src/interp/compiler.boot | 2 | ||||
-rw-r--r-- | src/interp/define.boot | 10 | ||||
-rw-r--r-- | src/interp/nruncomp.boot | 23 |
4 files changed, 24 insertions, 18 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 0c271d04..fb6f2e80 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2011-11-21 Gabriel Dos Reis <gdr@cs.tamu.edu> + + * interp/nruncomp.boot (getLocalIndex): Rename from NRTgetLocalIndex. + Adjust callers. + * interp/compiler.boot: Adjust. + * interp/define.boot: Likewise. + 2011-11-18 Gabriel Dos Reis <gdr@cs.tamu.edu> * interp/category.boot (FindFundAncs): Tidy. Access input in diff --git a/src/interp/compiler.boot b/src/interp/compiler.boot index aecd95aa..6fcf6ace 100644 --- a/src/interp/compiler.boot +++ b/src/interp/compiler.boot @@ -439,7 +439,7 @@ compSymbol(s,m,e) == sameObject?(s,m) or isLiteral(s,e) => [quote s,s,e] v := get(s,"value",e) => symbolMember?(s,$functorLocalParameters) => - NRTgetLocalIndex s + getLocalIndex s [s,v.mode,e] --s will be replaced by an ELT form in beforeCompile [s,v.mode,e] --s has been SETQd diff --git a/src/interp/define.boot b/src/interp/define.boot index 719f81e8..df1f1dd4 100644 --- a/src/interp/define.boot +++ b/src/interp/define.boot @@ -1417,8 +1417,8 @@ compDefineFunctor1(df is ['DEF,form,signature,body], $functionLocations: local := nil --locations of defined functions in source -- Generate slots for arguments first, then implicit parameters, -- then for $NRTaddForm (if any) in compAdd - for x in argl repeat NRTgetLocalIndex x - for x in dbImplicitParameters db repeat NRTgetLocalIndex x + for x in argl repeat getLocalIndex x + for x in dbImplicitParameters db repeat getLocalIndex x [.,.,$e] := compMakeDeclaration("$",target,$e) if not $insideCategoryPackageIfTrue then $e := augModemapsFromCategory('_$,'_$,target,$e) @@ -2111,7 +2111,7 @@ compAdd(['add,$addForm,capsule],m,e) == $addFormLhs: local:= $addForm if $addForm is ["SubDomain",domainForm,predicate] then $NRTaddForm := domainForm - NRTgetLocalIndex domainForm + getLocalIndex domainForm registerInlinableDomain(domainForm,e) --need to generate slot for add form since all $ go-get -- slots will need to access it @@ -2120,7 +2120,7 @@ compAdd(['add,$addForm,capsule],m,e) == $NRTaddForm := $addForm [$addForm,.,e]:= $addForm is ["%Comma",:.] => - $NRTaddForm := ["%Comma",:[NRTgetLocalIndex x for x in $addForm.args]] + $NRTaddForm := ["%Comma",:[getLocalIndex x for x in $addForm.args]] for x in $addForm.args repeat registerInlinableDomain(x,e) compOrCroak(compTuple2Record $addForm,$EmptyMode,e) registerInlinableDomain($addForm,e) @@ -2231,7 +2231,7 @@ doIt(item,$predl) == code is ["%LET",:.] => item.op := '%store rhsCode := rhs' - item.args := [['%tref,'$,NRTgetLocalIndex lhs],rhsCode] + item.args := [['%tref,'$,getLocalIndex lhs],rhsCode] item.op := code.op item.rest := rest code item is [":",a,t] => [.,.,$e]:= compOrCroak(item,$EmptyMode,$e) diff --git a/src/interp/nruncomp.boot b/src/interp/nruncomp.boot index 52e073f2..a3c4dce1 100644 --- a/src/interp/nruncomp.boot +++ b/src/interp/nruncomp.boot @@ -207,7 +207,7 @@ genDeltaEntry(opMmPair,e) == if cons? dc then dc := substitute("$$","$",dc) opModemapPair := - [op,[dc,:[NRTgetLocalIndex x for x in nsig]],["T",cform]] -- force pred to T + [op,[dc,:[getLocalIndex x for x in nsig]],["T",cform]] -- force pred to T if null NRTassocIndex dc and (member(dc,$functorLocalParameters) or cons? dc) then --create "%domain" entry to $NRTdeltaList @@ -240,8 +240,8 @@ NRTassocIndex x == $NRTbase + $NRTdeltaLength - k nil -NRTgetLocalIndex: %Form -> %Short -NRTgetLocalIndex item == +getLocalIndex: %Form -> %Short +getLocalIndex item == k := NRTassocIndex item => k item = "$" => 0 item = "$$" => 2 @@ -277,7 +277,7 @@ NRTassignCapsuleFunctionSlot(op,sig) == --if opSig is not exported, it is local and need not be assigned if $insideCategoryPackageIfTrue then sig := substitute('$,second($functorForm),sig) - sig := [NRTgetLocalIndex x for x in sig] + sig := [getLocalIndex x for x in sig] opModemapPair := [op,['_$,:sig],["T",implementation]] valuePosition(opModemapPair,$NRTdeltaList) => nil --already there $NRTdeltaList:= [opModemapPair,:$NRTdeltaList] @@ -285,14 +285,14 @@ NRTassignCapsuleFunctionSlot(op,sig) == $NRTdeltaLength := $NRTdeltaLength+1 -++ NRTaddInner should call following function instead of NRTgetLocalIndex +++ NRTaddInner should call following function instead of getLocalIndex ++ This would prevent putting spurious items in $NRTdeltaList NRTinnerGetLocalIndex x == x isnt [.,:.] => x op := x.op ident? op and (constructor? op or builtinConstructor? op) => - NRTgetLocalIndex x - op is "[||]" => NRTgetLocalIndex x + getLocalIndex x + op is "[||]" => getLocalIndex x NRTaddInner x @@ -336,9 +336,8 @@ consDomainName(x,dc) == mkList [MKQ op,:[consDomainName(y,dc) for y in argl]] substitute('$,"$$",x) x = [] => x - (y := LASSOC(x,$devaluateList)) => y - k:=NRTassocIndex x => - ['devaluate,['ELT,'$,k]] + y := LASSOC(x,$devaluateList) => y + k := NRTassocIndex x => ['devaluate,['%vref,'$,k]] get(x,'value,$e) => isDomainForm(x,$e) => ['devaluate,x] x @@ -351,7 +350,7 @@ consDomainForm(x,dc) == [op,:[consDomainForm(y,dc) for y in argl]] x = [] => x (y := LASSOC(x,$devaluateList)) => y - k:=NRTassocIndex x => ['ELT,'$,k] + k := NRTassocIndex x => ['%vref,'$,k] get(x,'value,$e) or get(x,'mode,$e) => x MKQ x @@ -691,7 +690,7 @@ changeDirectoryInSlot1 db == --called by buildFunctor [[op, genSlotSig(sig,$newEnv)] ,pred,newfnsel] genSlotSig(sig,$e) == - [NRTgetLocalIndex t for t in sig] + [getLocalIndex t for t in sig] deepChaseInferences(pred,$e) == pred is [op,:preds] and op in '(AND and %and) => |