From 331ff8fe93b6cee63593dcad6b7a9c235bac946d Mon Sep 17 00:00:00 2001 From: dos-reis Date: Sat, 1 Jan 2011 23:39:28 +0000 Subject: Symbol cleanups --- src/boot/strap/tokens.clisp | 6 ++++-- src/boot/tokens.boot | 4 +++- src/boot/translator.boot | 6 +++--- src/interp/br-saturn.boot | 2 +- src/interp/ht-util.boot | 2 +- src/interp/i-syscmd.boot | 4 ++-- src/interp/interop.boot | 10 +++++----- src/interp/lisplib.boot | 8 ++++---- src/interp/nrunopt.boot | 2 +- src/interp/sys-utility.boot | 2 +- src/interp/trace.boot | 2 +- 11 files changed, 26 insertions(+), 22 deletions(-) (limited to 'src') diff --git a/src/boot/strap/tokens.clisp b/src/boot/strap/tokens.clisp index f1421813..4b510132 100644 --- a/src/boot/strap/tokens.clisp +++ b/src/boot/strap/tokens.clisp @@ -235,9 +235,11 @@ (LIST '|subSequence| 'SUBSEQ) (LIST '|substitute| 'SUBST) (LIST '|substitute!| 'NSUBST) - (LIST '|symbol?| 'SYMBOLP) + (LIST '|symbolFunction| '|SYMBOL-Function|) (LIST '|symbolName| 'SYMBOL-NAME) - (LIST '|take| 'TAKE) (LIST '|third| 'CADDR) + (LIST '|symbolValue| 'SYMBOL-VALUE) + (LIST '|symbol?| 'SYMBOLP) (LIST '|take| 'TAKE) + (LIST '|third| 'CADDR) (LIST '|toString| 'WRITE-TO-STRING) (LIST '|true| 'T) (LIST '|upperCase?| 'UPPER-CASE-P) (LIST '|vector?| 'SIMPLE-VECTOR-P) diff --git a/src/boot/tokens.boot b/src/boot/tokens.boot index d3c03de4..4e1a8ac3 100644 --- a/src/boot/tokens.boot +++ b/src/boot/tokens.boot @@ -295,8 +295,10 @@ for i in [ _ ["subSequence", "SUBSEQ"] , _ ["substitute", "SUBST"] , _ ["substitute!", "NSUBST"] , _ - ["symbol?", "SYMBOLP"] , _ + ["symbolFunction", "SYMBOL-FUNCTION"], _ ["symbolName", "SYMBOL-NAME"], _ + ["symbolValue", "SYMBOL-VALUE"], _ + ["symbol?", "SYMBOLP"] , _ ["take", "TAKE"] , ["third", "CADDR"] , _ ["toString", "WRITE-TO-STRING"], _ diff --git a/src/boot/translator.boot b/src/boot/translator.boot index 0b4a196c..3aa31def 100644 --- a/src/boot/translator.boot +++ b/src/boot/translator.boot @@ -67,11 +67,11 @@ genOptimizeOptions stream == AxiomCore::%sysInit() == SETQ(_*LOAD_-VERBOSE_*,false) if %hasFeature KEYWORD::GCL then - SETF(SYMBOL_-VALUE + SETF(symbolValue bfColonColon("COMPILER","*COMPILE-VERBOSE*"),false) - SETF(SYMBOL_-VALUE + SETF(symbolValue bfColonColon("COMPILER","SUPPRESS-COMPILER-WARNINGS*"),false) - SETF(SYMBOL_-VALUE + SETF(symbolValue bfColonColon("COMPILER","SUPPRESS-COMPILER-NOTES*"),true) ++ Make x, the current package diff --git a/src/interp/br-saturn.boot b/src/interp/br-saturn.boot index 106a2070..27a2b847 100644 --- a/src/interp/br-saturn.boot +++ b/src/interp/br-saturn.boot @@ -485,7 +485,7 @@ htDoneButton(func, htPage, :optionalArgs) == htMakeErrorPage htPage not FBOUNDP func => systemError ['"unknown function", func] - FUNCALL(SYMBOL_-FUNCTION func, htPage) + FUNCALL(symbolFunction func, htPage) htBcLinks(links,:options) == skipStateInfo? := IFCAR options diff --git a/src/interp/ht-util.boot b/src/interp/ht-util.boot index 0db29cdc..fb03dbbf 100644 --- a/src/interp/ht-util.boot +++ b/src/interp/ht-util.boot @@ -130,7 +130,7 @@ htpLabelFilteredInputString(htPage, label) == props := LASSOC(label, htpInputAreaAlist htPage) props => #props > 5 and props.6 => - FUNCALL(SYMBOL_-FUNCTION props.6, props.0) + FUNCALL(symbolFunction props.6, props.0) replacePercentByDollar props.0 nil diff --git a/src/interp/i-syscmd.boot b/src/interp/i-syscmd.boot index 2f7a46f2..ebc9a534 100644 --- a/src/interp/i-syscmd.boot +++ b/src/interp/i-syscmd.boot @@ -2164,7 +2164,7 @@ dewritify ob == oname := ob.2 f := integer? oname => eval GENSYMMER oname - SYMBOL_-FUNCTION oname + symbolFunction oname not COMPILED_-FUNCTION_-P f => error '"A required BPI does not exist." #ob > 3 and HASHEQ f ~= ob.3 => @@ -2188,7 +2188,7 @@ dewritify ob == name := ob.3 not FBOUNDP name => error strconc('"undefined function: ", symbolName name) - nob := [SYMBOL_-FUNCTION name,:vec] + nob := [symbolFunction name,:vec] HPUT($seen, ob, nob) HPUT($seen, nob, nob) nob diff --git a/src/interp/interop.boot b/src/interp/interop.boot index 97c27601..4d0de75f 100644 --- a/src/interp/interop.boot +++ b/src/interp/interop.boot @@ -135,7 +135,7 @@ makeOldAxiomDispatchDomain dom == [$oldAxiomDomainDispatch,hashTypeForm(dom.0,0),:dom] closeOldAxiomFunctor(name) == - [function runOldAxiomFunctor,:SYMBOL_-FUNCTION name] + [function runOldAxiomFunctor,:symbolFunction name] lazyOldAxiomDomainLookupExport(domenv, self, op, sig, box, skipdefaults, env) == dom := instantiate domenv @@ -278,10 +278,10 @@ instantiate domenv == oldDom := CDDR domenv [functor,:args] := callForm -- if null(fn := GETL(functor,'instantiate)) then --- ofn := SYMBOL_-FUNCTION functor +-- ofn := symbolFunction functor -- loadFunctor functor --- fn := SYMBOL_-FUNCTION functor --- SETF(SYMBOL_-FUNCTION functor, ofn) +-- fn := symbolFunction functor +-- SETF(symbolFunction functor, ofn) -- PUT(functor, 'instantiate, fn) -- domvec := apply(fn, args) domvec := apply(functor, args) @@ -608,7 +608,7 @@ HasCategory(domain,catform') == --systemDependentMkAutoload(fn,cnam) == -- FBOUNDP(cnam) => "next" --- SETF(SYMBOL_-FUNCTION cnam,mkAutoLoad(fn, cnam)) +-- SETF(symbolFunction cnam,mkAutoLoad(fn, cnam)) domainEqual(a,b) == vector? a and vector? b and a.0 = b.0 diff --git a/src/interp/lisplib.boot b/src/interp/lisplib.boot index 8d87c008..d0a41d7c 100644 --- a/src/interp/lisplib.boot +++ b/src/interp/lisplib.boot @@ -268,23 +268,23 @@ systemDependentMkAutoload(fn,cnam) == kind = 'category => ASHARPMKAUTOLOADCATEGORY(file, cnam, asharpName, cosig) ASHARPMKAUTOLOADFUNCTOR(file, cnam, asharpName, cosig) - SETF(SYMBOL_-FUNCTION cnam,mkAutoLoad(fn, cnam)) + SETF(symbolFunction cnam,mkAutoLoad(fn, cnam)) autoLoad(abb,cname) == -- builtin constructors are always loaded. By definition, there -- is no way to unload them and load them again. cname in $BuiltinConstructorNames => cname if not GETL(cname,'LOADED) then loadLib cname - SYMBOL_-FUNCTION cname + symbolFunction cname setAutoLoadProperty(name) == -- abb := constructor? name REMPROP(name,'LOADED) - SETF(SYMBOL_-FUNCTION name,mkAutoLoad(constructor? name, name)) + SETF(symbolFunction name,mkAutoLoad(constructor? name, name)) unloadOneConstructor(cnam,fn) == REMPROP(cnam,'LOADED) - SETF(SYMBOL_-FUNCTION cnam,mkAutoLoad(fn, cnam)) + SETF(symbolFunction cnam,mkAutoLoad(fn, cnam)) --% Compilation diff --git a/src/interp/nrunopt.boot b/src/interp/nrunopt.boot index bd03608a..12a0d9df 100644 --- a/src/interp/nrunopt.boot +++ b/src/interp/nrunopt.boot @@ -185,7 +185,7 @@ makeSpadConstant [fn,dollar,slot] == stuffSlot(dollar,i,item) == dollar.i := - atom item => [SYMBOL_-FUNCTION item,:dollar] + atom item => [symbolFunction item,:dollar] item is [n,:op] and integer? n => ['newGoGet,dollar,:item] item is ['CONS,.,['FUNCALL,a,b]] => b = '$ => ['makeSpadConstant,eval a,dollar,i] diff --git a/src/interp/sys-utility.boot b/src/interp/sys-utility.boot index e4722a68..adc91d83 100644 --- a/src/interp/sys-utility.boot +++ b/src/interp/sys-utility.boot @@ -110,7 +110,7 @@ getVMType d == setDynamicBinding: (%Symbol,%Thing) -> %Thing setDynamicBinding(s,v) == - SETF(SYMBOL_-VALUE s,v) + SETF(symbolValue s,v) ++ returns true if `f' is bound to a macro. macrop: %Thing -> %Boolean diff --git a/src/interp/trace.boot b/src/interp/trace.boot index 28fa8cb1..626747af 100644 --- a/src/interp/trace.boot +++ b/src/interp/trace.boot @@ -793,7 +793,7 @@ tracelet(fn,vars) == if $letAssoc then SETLETPRINTFLAG true $TRACELETFLAG : local := true $QuickLet : local := false - not MEMQ(fn,$traceletFunctions) and not IS__GENVAR fn and COMPILED_-FUNCTION_-P SYMBOL_-FUNCTION fn + not MEMQ(fn,$traceletFunctions) and not IS__GENVAR fn and COMPILED_-FUNCTION_-P symbolFunction fn and not stupidIsSpadFunction fn and not GENSYMP fn => ($traceletFunctions:= [fn,:$traceletFunctions]; compileBoot fn ; $traceletFunctions:= delete(fn,$traceletFunctions) ) -- cgit v1.2.3