diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/ChangeLog | 5 | ||||
-rw-r--r-- | src/interp/compiler.boot | 4 | ||||
-rw-r--r-- | src/interp/define.boot | 2 | ||||
-rw-r--r-- | src/interp/nruncomp.boot | 26 |
4 files changed, 21 insertions, 16 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 08b99530..78f1adc3 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,10 @@ 2011-11-26 Gabriel Dos Reis <gdr@cs.tamu.edu> + * interp/nruncomp.boot (assocIndex): Rename from NRTassocIndex. + Adjust callers. + +2011-11-26 Gabriel Dos Reis <gdr@cs.tamu.edu> + * interp/define.boot (assignCapsuleFunctionSlot): Do not call NRTisExported?. Determine operation kind locally. Do not store implement slot on the used entity list. diff --git a/src/interp/compiler.boot b/src/interp/compiler.boot index 1b5fbe75..0254f3db 100644 --- a/src/interp/compiler.boot +++ b/src/interp/compiler.boot @@ -953,7 +953,7 @@ setqSingle(id,val,m,E) == --e.g. the %LET form below will be changed by putInLocalDomainReferences form := db := constructorDB currentConstructor e' - k := NRTassocIndex(db,id) => ['%store,['%tref,'$,k],x] + k := assocIndex(db,id) => ['%store,['%tref,'$,k],x] ["%LET",id,x] [form,m',e'] @@ -2410,7 +2410,7 @@ numberize x == ++ If there is a local reference to mode `m', return it. localReferenceIfThere(m,e) == m is "$" => m - idx := NRTassocIndex(constructorDB currentConstructor e,m) => ['%tref,'$,idx] + idx := assocIndex(constructorDB currentConstructor e,m) => ['%tref,'$,idx] quote m massageLoop x == main x where diff --git a/src/interp/define.boot b/src/interp/define.boot index 600195a1..b416aa76 100644 --- a/src/interp/define.boot +++ b/src/interp/define.boot @@ -486,7 +486,7 @@ NRTmakeCategoryAlist(db,e) == --NOTE: this is new form: old form satisfies vector? CDDR form encodeCatform(db,x) == - k := NRTassocIndex(db,x) => k + k := assocIndex(db,x) => k x isnt [.,:.] or rest x isnt [.,:.] => x [first x,:[encodeCatform(db,y) for y in rest x]] diff --git a/src/interp/nruncomp.boot b/src/interp/nruncomp.boot index 60b24c7c..107dfaa4 100644 --- a/src/interp/nruncomp.boot +++ b/src/interp/nruncomp.boot @@ -92,7 +92,7 @@ deltaTran(db,item,compItem) == -- so we need only encode dc. -- gdr 2008-11-28. dcCode := dc is '$ => 0 - NRTassocIndex(db,dc) or keyedSystemError("S2NR0004",[dc]) + assocIndex(db,dc) or keyedSystemError("S2NR0004",[dc]) kindFlag:= (kind is 'CONST => 'CONST; nil) [sig,dcCode,op,:kindFlag] @@ -103,7 +103,7 @@ NRTreplaceAllLocalReferences(db,form) == NRTencode(db,x,y) == encode(db,x,y,true) where encode(db,x,compForm,firstTime) == --converts a domain form to a lazy domain form; everything other than --the operation name should be assigned a slot - not firstTime and (k := NRTassocIndex(db,x)) => k + not firstTime and (k := assocIndex(db,x)) => k vector? x => systemErrorHere '"NRTencode" cons? x => op := x.op @@ -206,7 +206,7 @@ genDeltaEntry(op,mm,e) == odc := dc if cons? dc then dc := substitute("$$","$",dc) - if NRTassocIndex(db,dc) = nil and (dc is [.,:.] or + if assocIndex(db,dc) = nil and (dc is [.,:.] or 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. @@ -229,17 +229,17 @@ genDeltaEntry(op,mm,e) == ++ being compiled) of the domain or value referenced by the form `x'. ++ Otherwise, return nil this is the first time `x' is referenced, or ++ if `x' designates neither a domain nor a value (e.g. a modemap). -NRTassocIndex: (%Thing,%Form) -> %Maybe %Short -NRTassocIndex(db,x) == +assocIndex: (%Thing,%Form) -> %Maybe %Short +assocIndex(db,x) == null x => x x = $NRTaddForm => 5 dbEntitySlot(db,['%domain,x]) getLocalIndex: (%Thing,%Form) -> %Short getLocalIndex(db,item) == - k := NRTassocIndex(db,item) => k - item = "$" => 0 - item = "$$" => 2 + item is "$" => 0 + 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] dbUsedEntities(db) := [entry,:dbUsedEntities db] @@ -305,7 +305,7 @@ consDomainName(db,x,dc) == substitute('$,"$$",x) x = [] => x y := LASSOC(x,$devaluateList) => y - k := NRTassocIndex(db,x) => ['devaluate,['%vref,'$,k]] + k := assocIndex(db,x) => ['devaluate,['%vref,'$,k]] get(x,'value,$e) => isDomainForm(x,$e) => ['devaluate,x] x @@ -318,7 +318,7 @@ consDomainForm(db,x,dc) == [op,:[consDomainForm(db,y,dc) for y in argl]] x = [] => x (y := LASSOC(x,$devaluateList)) => y - k := NRTassocIndex(db,x) => ['%vref,'$,k] + k := assocIndex(db,x) => ['%vref,'$,k] get(x,'value,$e) or get(x,'mode,$e) => x MKQ x @@ -675,7 +675,7 @@ NRTputInHead(db,bod) == NRTputInTail(db,rest bod) --NOTE: args = COPY of rest bod -- The following test allows function-returning expressions fn is [elt,dom,ind] and dom ~='$ and elt in '(ELT CONST) => - k := NRTassocIndex(db,dom) => lastNode(bod).first := ['%vref,'_$,k] + k := assocIndex(db,dom) => lastNode(bod).first := ['%vref,'_$,k] nil NRTputInHead(db,fn) bod @@ -691,8 +691,8 @@ NRTputInHead(db,bod) == NRTputInTail(db,x) == for y in tails x repeat (u := first y) isnt [.,:.] => - u='$ or LASSOC(u,$devaluateList) => nil - k:= NRTassocIndex(db,u) => + u is '$ or LASSOC(u,$devaluateList) => nil + k := assocIndex(db,u) => u isnt [.,:.] => y.first := ['%vref,'_$,k] -- u atomic means that the slot will always contain a vector y.first := ['SPADCHECKELT,'_$,k] |