diff options
Diffstat (limited to 'src/interp')
-rw-r--r-- | src/interp/br-saturn.boot | 4 | ||||
-rw-r--r-- | src/interp/c-util.boot | 4 | ||||
-rw-r--r-- | src/interp/clam.boot | 26 | ||||
-rw-r--r-- | src/interp/ht-root.boot | 4 | ||||
-rw-r--r-- | src/interp/ht-util.boot | 2 | ||||
-rw-r--r-- | src/interp/htsetvar.boot | 8 | ||||
-rw-r--r-- | src/interp/i-intern.boot | 6 | ||||
-rw-r--r-- | src/interp/i-map.boot | 4 | ||||
-rw-r--r-- | src/interp/i-special.boot | 2 | ||||
-rw-r--r-- | src/interp/newfort.boot | 2 | ||||
-rw-r--r-- | src/interp/nruncomp.boot | 2 | ||||
-rw-r--r-- | src/interp/parsing.lisp | 2 | ||||
-rw-r--r-- | src/interp/setvars.boot | 20 | ||||
-rw-r--r-- | src/interp/slam.boot | 8 | ||||
-rw-r--r-- | src/interp/sys-utility.boot | 4 | ||||
-rw-r--r-- | src/interp/trace.boot | 8 |
16 files changed, 51 insertions, 55 deletions
diff --git a/src/interp/br-saturn.boot b/src/interp/br-saturn.boot index 899611a1..ec9e3873 100644 --- a/src/interp/br-saturn.boot +++ b/src/interp/br-saturn.boot @@ -607,8 +607,8 @@ htpMakeEmptyPage(propList,:options) == name := IFCAR options or GENTEMP() if not $saturn then $activePageList := [name, :$activePageList] - setDynamicBinding(name, val := VECTOR(name, nil, nil, nil, nil, nil, propList, nil)) - val + val := vector [name, nil, nil, nil, nil, nil, propList, nil] + symbolValue(name) := val --======================================================================= -- Redefinitions from br-con.boot diff --git a/src/interp/c-util.boot b/src/interp/c-util.boot index f1af92ec..7d45bede 100644 --- a/src/interp/c-util.boot +++ b/src/interp/c-util.boot @@ -1398,7 +1398,7 @@ backendCompileILAM(name,args,body) == args' := [gensym() for . in 1..#args] body' := applySubst!(pairList(args,args'),body) property(name,'ILAM) := true - setDynamicBinding(name,["LAMBDA",args',:body']) + symbolValue(name) := ["LAMBDA",args',:body'] name $CLOSEDFNS := nil @@ -1445,7 +1445,7 @@ backendCompileSLAM(name,args,body) == [true,["SETQ",al,app]] lamex := ["LAM",arg,["PROG",[g2], ["RETURN",["COND",codePart1,codePart2]]]] - setDynamicBinding(al,nil) -- clear the cache + symbolValue(al) := nil -- clear the cache -- compile the worker function, first. u := [auxfn,["LAMBDA",args,:body]] COMP370 [u] diff --git a/src/interp/clam.boot b/src/interp/clam.boot index daf29e79..1532e182 100644 --- a/src/interp/clam.boot +++ b/src/interp/clam.boot @@ -107,8 +107,8 @@ compClam(op,argl,body,$clamList) == if $reportCounts then hitCounter:= INTERNL(op,'";hit") callCounter:= INTERNL(op,'";calls") - setDynamicBinding(hitCounter,0) - setDynamicBinding(callCounter,0) + symbolValue(hitCounter) := 0 + symbolValue(callCounter) := 0 callCountCode:= [['%store,callCounter,['%iinc,callCounter]]] hitCountCode:= [['%store,hitCounter,['%iinc,hitCounter]]] g2:= gensym() --length of cache or arg-value pair @@ -206,8 +206,8 @@ compHash(op,argl,body,cacheNameOrNil,eqEtc,countFl) == if $reportCounts then hitCounter:= INTERNL(op,'";hit") callCounter:= INTERNL(op,'";calls") - setDynamicBinding(hitCounter,0) - setDynamicBinding(callCounter,0) + symbolValue(hitCounter) := 0 + symbolValue(callCounter) := 0 callCountCode:= [['%store,callCounter,['%iinc,callCounter]]] hitCountCode:= [['%store,hitCounter,['%iinc,hitCounter]]] g2:= gensym() --value computed by calling function @@ -357,12 +357,12 @@ clearCategoryCaches() == for name in allConstructors() repeat if getConstructorKindFromDB name = "category" then if BOUNDP(cacheName:= mkCacheName name) - then setDynamicBinding(cacheName,nil) + then symbolValue(cacheName) := nil if BOUNDP(cacheName:= INTERNL strconc(symbolName name,'";CAT")) - then setDynamicBinding(cacheName,nil) + then symbolValue(cacheName) := nil clearCategoryCache catName == - setDynamicBinding(mkCacheName catName,nil) + symbolValue(mkCacheName catName) := nil displayHashtable x == l:= reverse! SORTBY('CAR,[[opOf tableValue(x,key),key] for key in HKEYS x]) @@ -442,8 +442,8 @@ assocCache(x,cacheName,fn) == FUNCALL(fn,CAAR forwardPointer,x) => return (val:= first forwardPointer) backPointer:= forwardPointer forwardPointer:= rest forwardPointer - val => val - setDynamicBinding(cacheName,backPointer) + val ~= nil => val + symbolValue(cacheName) := backPointer nil assocCacheShift(x,cacheName,fn) == --like ASSOC except that al is circular @@ -460,7 +460,7 @@ assocCacheShift(x,cacheName,fn) == --like ASSOC except that al is circular backPointer := forwardPointer --first is slot replaced on failure forwardPointer:= rest forwardPointer val => val - setDynamicBinding(cacheName,backPointer) + symbolValue(cacheName) := backPointer nil assocCacheShiftCount(x,al,fn) == @@ -495,8 +495,8 @@ clamStats() == hitCounter:= INTERNL(op,'";hit") callCounter:= INTERNL(op,'";calls") res:= ["%b",eval hitCounter,"/",eval callCounter,"%d","calls to "] - setDynamicBinding(hitCounter,0) - setDynamicBinding(callCounter,0) + symbolValue(hitCounter) := 0 + symbolValue(callCounter) := 0 res postString:= cacheValue:= eval cacheVec.cacheName @@ -708,4 +708,4 @@ domainEqualList(argl1,argl2) == removeAllClams() == for [fun,:.] in $clamList repeat sayBrightly ['"Un-clamming function",'"%b",fun,'"%d"] - setDynamicBinding(fun,eval makeSymbol strconc(STRINGIMAGE fun,'";")) + symbolValue(fun) := eval makeSymbol strconc(STRINGIMAGE fun,'";") diff --git a/src/interp/ht-root.boot b/src/interp/ht-root.boot index 30bb52b4..290cf622 100644 --- a/src/interp/ht-root.boot +++ b/src/interp/ht-root.boot @@ -115,7 +115,7 @@ htSetSystemVariableKind(htPage,[variable,name,fun]) == value := htpLabelInputString(htPage,name) if string? value and fun then value := FUNCALL(fun,value) --SCM::what to do??? if not integer? value then userError ??? - setDynamicBinding(variable,value) + symbolValue(variable) := value htSystemVariables () htSetSystemVariable(htPage,[name,value]) == @@ -123,7 +123,7 @@ htSetSystemVariable(htPage,[name,value]) == value = 'on => true value = 'off => nil value - setDynamicBinding(name,value) + symbolValue(name) := value htSystemVariables () htGloss(pattern) == htGlossPage(nil,dbNonEmptyPattern pattern or '"*",true) diff --git a/src/interp/ht-util.boot b/src/interp/ht-util.boot index fd16ac54..846730c9 100644 --- a/src/interp/ht-util.boot +++ b/src/interp/ht-util.boot @@ -52,7 +52,7 @@ $activePageList := nil htpDestroyPage(pageName) == symbolMember?(pageName,$activePageList) => - setDynamicBinding(pageName, nil) + symbolValue(pageName) := nil $activePageList := remove!($activePageList,pageName) htpName htPage == diff --git a/src/interp/htsetvar.boot b/src/interp/htsetvar.boot index 827df141..14c5dee1 100644 --- a/src/interp/htsetvar.boot +++ b/src/interp/htsetvar.boot @@ -133,7 +133,7 @@ htSetLiterals(htPage,name,message,variable,values,functionToCall) == htSetLiteral(htPage, val) == htInitPage('"Set Command", nil) - setDynamicBinding(htpProperty(htPage, 'variable), translateYesNo2TrueFalse val) + symbolValue(htpProperty(htPage, 'variable)) := translateYesNo2TrueFalse val htKill(htPage,val) htShowIntegerPage(htPage, setData) == @@ -172,7 +172,7 @@ htSetInteger(htPage) == val := chkRange htpLabelInputString(htPage,'value) not integer? val => errorPage(htPage,['"Value Error",nil,'"\vspace{3}\centerline{{\em ",val,'"}}\vspace{2}\newline\centerline{Click on \UpBitmap{} to re-enter value}"]) - setDynamicBinding(htpProperty(htPage, 'variable), val) + symbolValue(htpProperty(htPage, 'variable)) := val htKill(htPage,val) htShowFunctionPage(htPage,setData) == @@ -215,14 +215,14 @@ htSetvarDoneButton(message, func) == htFunctionSetLiteral(htPage, val) == htInitPage('"Set Command", nil) - setDynamicBinding(htpProperty(htPage, 'variable), translateYesNo2TrueFalse val) + symbolValue(htpProperty(htPage, 'variable)) := translateYesNo2TrueFalse val htSetFunCommandContinue(htPage,val) htSetFunCommand(htPage) == variable := htpProperty(htPage,'variable) checker := htpProperty(htPage,'checker) value := htCheck(checker,htpLabelInputString(htPage,'value)) - setDynamicBinding(variable,value) --kill this later + symbolValue(variable) := value --kill this later htSetFunCommandContinue(htPage,value) htSetFunCommandContinue(htPage,value) == diff --git a/src/interp/i-intern.boot b/src/interp/i-intern.boot index c0fb0483..0c4a6141 100644 --- a/src/interp/i-intern.boot +++ b/src/interp/i-intern.boot @@ -222,7 +222,7 @@ mkAtree3(x,op,argl) == x is ['ADEF,arg,:r] => r := mkAtreeValueOf r v := - null arg => VECTOR(nil,nil,nil) + null arg => vector [nil,nil,nil] cons? arg and rest arg and first arg ~= "|" => collectDefTypesAndPreds ["tuple",:arg] null rest arg => collectDefTypesAndPreds first arg @@ -239,7 +239,7 @@ mkAtree3(x,op,argl) == r := mkAtreeValueOf r a is [op,:arg] => v := - null arg => VECTOR(nil,nil,nil) + null arg => vector [nil,nil,nil] cons? arg and rest arg and first arg ~= "|" => collectDefTypesAndPreds ["tuple",:arg] null rest arg => collectDefTypesAndPreds first arg @@ -348,7 +348,7 @@ collectDefTypesAndPreds args == pred := addPred(pred,v.2) types := [nil] vars := [args] - VECTOR(vars,types,pred) + vector [vars,types,pred] where addPred(old,new) == null new => old diff --git a/src/interp/i-map.boot b/src/interp/i-map.boot index 03527f2c..6a5f905f 100644 --- a/src/interp/i-map.boot +++ b/src/interp/i-map.boot @@ -707,7 +707,7 @@ compileDeclaredMap(op,sig,mapDef) == putMapCode(op,code,sig,name,parms,isRecursive) == -- saves the generated code and some other information about the -- function - codeInfo := VECTOR(op,code,sig,name,parms,isRecursive) + codeInfo := vector [op,code,sig,name,parms,isRecursive] allCode := [codeInfo,:get(op,'generatedCode,$e)] $e := putHist(op,'generatedCode,allCode,$e) op @@ -774,7 +774,7 @@ compileCoerceMap(op,argTypes,mm) == body := ['SPADCALL,:argCode,['LIST,['function,imp]]] minivectorName := makeInternalMapMinivectorName name body := substitute(["%dynval",MKQ minivectorName],"$$$",body) - setDynamicBinding(minivectorName,LIST2VEC $minivector) + symbolValue(minivectorName) := LIST2VEC $minivector compileInteractive [name,['LAMBDA,parms,body]] sig.target diff --git a/src/interp/i-special.boot b/src/interp/i-special.boot index 9d513364..db86d8db 100644 --- a/src/interp/i-special.boot +++ b/src/interp/i-special.boot @@ -155,7 +155,7 @@ compileADEFBody(t,vars,types,body,computedResultType) == $compiledOpNameList := [$mapName] minivectorName := makeInternalMapMinivectorName symbolName $mapName body := substitute(["%dynval",MKQ minivectorName],"$$$",body) - setDynamicBinding(minivectorName,LIST2VEC $minivector) + symbolValue(minivectorName) := LIST2VEC $minivector -- The use of the three variables $definingMap, $genValue and $compilingMap -- is to cover the following cases: diff --git a/src/interp/newfort.boot b/src/interp/newfort.boot index b3753f39..f9f388ac 100644 --- a/src/interp/newfort.boot +++ b/src/interp/newfort.boot @@ -245,7 +245,7 @@ exp2FortOptimizeCS1 e == -- see if we have already seen this expression n := tableValue($fortCsHash,e) null n => - n := VECTOR(1,nil,$fortCsExprStack,$fortCsFuncStack) + n := vector [1,nil,$fortCsExprStack,$fortCsFuncStack] tableValue($fortCsHash,e) := n e beenHere(e,n) diff --git a/src/interp/nruncomp.boot b/src/interp/nruncomp.boot index 7dcde37c..746a7067 100644 --- a/src/interp/nruncomp.boot +++ b/src/interp/nruncomp.boot @@ -496,7 +496,7 @@ buildFunctor($definition is [name,:args],sig,code,$locals,$e) == -- indicating under what conditions this -- category should be present. true => always makeCatvecCode:= first catvecListMaker - emptyVector := VECTOR() + emptyVector := vector [] domainShell := newShell($NRTbase + $NRTdeltaLength) for i in 0..4 repeat vectorRef(domainShell,i) := vectorRef($domainShell,i) diff --git a/src/interp/parsing.lisp b/src/interp/parsing.lisp index 6a33d361..81d34c83 100644 --- a/src/interp/parsing.lisp +++ b/src/interp/parsing.lisp @@ -379,7 +379,7 @@ the stack, then stack a NIL. Return the value of prod." (mapcar #'(lambda (x) (internl metapfx (pname x))) (assocleft rs)))) n unpfx-funlist) - (|setDynamicBinding| flnam pfx-funlist) + (setf (symbol-value flnam) pfx-funlist) (if (not (lessp (setq n (length metapfx)) 0)) (setq unpfx-funlist (mapcar #'(lambda (x) diff --git a/src/interp/setvars.boot b/src/interp/setvars.boot index 11268652..561793c3 100644 --- a/src/interp/setvars.boot +++ b/src/interp/setvars.boot @@ -126,11 +126,11 @@ initializeSetVariables (setTree) == then FUNCALL( setData.setVar,"%initialize%") else sayMSG '" Function not implemented." st = 'INTEGER => - setDynamicBinding(setData.setVar, setData.setDef) + symbolValue(setData.setVar) := setData.setDef st = 'STRING => - setDynamicBinding(setData.setVar, setData.setDef) + symbolValue(setData.setVar) := setData.setDef st = 'LITERALS => - setDynamicBinding(setData.setVar, translateYesNo2TrueFalse setData.setDef) + symbolValue(setData.setVar) := translateYesNo2TrueFalse setData.setDef st = 'TREE => initializeSetVariables(setData.setLeaf) @@ -216,8 +216,8 @@ set1(l,setTree) == st = 'STRING => arg2 := l.1 if arg2 = 'DEFAULT - then setDynamicBinding(setData.setVar, setData.setDef) - else if arg2 then setDynamicBinding(setData.setVar, arg2) + then symbolValue(setData.setVar) := setData.setDef + else if arg2 then symbolValue(setData.setVar) := arg2 -- if so set or not a valid choice, then show option information if $displaySetValue or (null arg2) then displaySetOptionInformation(arg,setData) @@ -231,8 +231,8 @@ set1(l,setTree) == (null (upperlimit := setData.setLeaf.1) or num <= upperlimit) => num selectOption(l.1,['default,:setData.setLeaf],nil) if arg2 = 'DEFAULT - then setDynamicBinding(setData.setVar, setData.setDef) - else if arg2 then setDynamicBinding(setData.setVar, arg2) + then symbolValue(setData.setVar) := setData.setDef + else if arg2 then symbolValue(setData.setVar) := arg2 -- if so set or not a valid choice, then show option information if $displaySetValue or (null arg2) then displaySetOptionInformation(arg,setData) @@ -244,14 +244,14 @@ set1(l,setTree) == -- validate the option, allowing the user to set the default if (arg2 := selectOption(l.1,['default,:setData.setLeaf],nil)) then if arg2 = 'DEFAULT - then setDynamicBinding(setData.setVar, translateYesNo2TrueFalse setData.setDef) + then symbolValue(setData.setVar) := translateYesNo2TrueFalse setData.setDef else if arg2 = 'nobreak then useFastLinks true if arg2 = 'fastlinks then useFastLinks false arg2 := 'break - setDynamicBinding(setData.setVar, translateYesNo2TrueFalse arg2) + symbolValue(setData.setVar) := translateYesNo2TrueFalse arg2 -- if so set or not a valid choice, then show option information if $displaySetValue or (null arg2) then displaySetOptionInformation(arg,setData) @@ -778,7 +778,7 @@ countCache n == not IDENTP x => sayKeyedMsg("S2IF0007",[x]) $cacheAlist:= insertAlist(x,n,$cacheAlist) cacheCountName:= INTERNL(x,'";COUNT") - setDynamicBinding(cacheCountName,n) + symbolValue(cacheCountName) := n sayCacheCount(x,n) optionError(CAAR $options,nil) sayCacheCount(nil,$cacheCount:= n) diff --git a/src/interp/slam.boot b/src/interp/slam.boot index 4889507b..f10c3c17 100644 --- a/src/interp/slam.boot +++ b/src/interp/slam.boot @@ -143,7 +143,7 @@ reportFunctionCompilation(op,nam,argl,body,isRecursive) == $compiledOpNameList := [nam] minivectorName := makeInternalMapMinivectorName nam body := substitute(["%dynval",MKQ minivectorName],"$$$",body) - setDynamicBinding(minivectorName,LIST2VEC $minivector) + symbolValue(minivectorName) := LIST2VEC $minivector argl := COPY argl -- play it safe for optimization init := not(isRecursive and $compileRecurrence and #argl = 1) => nil @@ -417,7 +417,7 @@ clearLocalModemaps x == if def:= get(fn,'definition,$e) then $e:= putHist(x,'value,objNew(def,$EmptyMode),$e) if cacheVec:= get(fn,'cacheInfo,$e) then - setDynamicBinding(cacheVec.cacheName,nil) + symbolValue(cacheVec.cacheName) := nil -- now clear the property list of the identifier $e := addIntSymTabBinding(x,nil,$e) sayKeyedMsg("S2IX0007",[x]) @@ -443,7 +443,7 @@ clearAllSlams x == fn(thoseToClear,thoseCleared) == for x in thoseToClear | not symbolMember?(x,thoseCleared) repeat slamListName:= mkCacheName x - setDynamicBinding(slamListName,nil) + symbolValue(slamListName) := nil thoseCleared:= ADJOIN(x,thoseCleared) someMoreToClear:= setDifference(LASSOC(x,$functorDependencyAlist),[:thoseToClear,: @@ -451,4 +451,4 @@ clearAllSlams x == append!(thoseToClear,someMoreToClear) clearSlam("functor")== - setDynamicBinding(mkCacheName functor,nil) + symbolValue(mkCacheName functor) := nil diff --git a/src/interp/sys-utility.boot b/src/interp/sys-utility.boot index 162ab40c..84dff4b9 100644 --- a/src/interp/sys-utility.boot +++ b/src/interp/sys-utility.boot @@ -102,10 +102,6 @@ getVMType d == --% -setDynamicBinding: (%Symbol,%Thing) -> %Thing -setDynamicBinding(s,v) == - symbolValue(s) := v - ++ returns true if `f' is bound to a macro. macrop: %Thing -> %Boolean macrop f == diff --git a/src/interp/trace.boot b/src/interp/trace.boot index 4fbac122..2f59a099 100644 --- a/src/interp/trace.boot +++ b/src/interp/trace.boot @@ -231,15 +231,15 @@ traceOptionError(opt,keys) == resetTimers () == for timer in _/TIMERLIST repeat - setDynamicBinding(makeSymbol strconc(timer,'"_,TIMER"),0) + symbolValue(makeSymbol strconc(timer,'"_,TIMER")) := 0 resetSpacers () == for spacer in _/SPACELIST repeat - setDynamicBinding(makeSymbol strconc(spacer,'"_,SPACE"),0) + symbolValue(makeSymbol strconc(spacer,'"_,SPACE")) := 0 resetCounters () == for k in _/COUNTLIST repeat - setDynamicBinding(makeSymbol strconc(k,'"_,COUNT"),0) + symbolValue(makeSymbol strconc(k,'"_,COUNT")) := 0 ptimers() == null _/TIMERLIST => sayBrightly '" no functions are timed" @@ -278,7 +278,7 @@ domainToGenvar x == $doNotAddEmptyModeIfTrue: local:= true (y:= unabbrevAndLoad x) and getConstructorKindFromDB opOf y = "domain" => g:= genDomainTraceName y - setDynamicBinding(g,evalDomain y) + symbolValue(g) := evalDomain y g genDomainTraceName y == |