diff options
author | dos-reis <gdr@axiomatics.org> | 2011-05-02 16:23:37 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2011-05-02 16:23:37 +0000 |
commit | 6c36217f8a6721a3695e6c8d0b5f86401b5ed18b (patch) | |
tree | 8c2aa73f3e0dbb7aab710621e72707cf27d74c36 | |
parent | e694e02b3c8e9ae322df7440a29c3011a11503e7 (diff) | |
download | open-axiom-6c36217f8a6721a3695e6c8d0b5f86401b5ed18b.tar.gz |
more cleanups
-rw-r--r-- | src/interp/Makefile.in | 4 | ||||
-rw-r--r-- | src/interp/br-con.boot | 4 | ||||
-rw-r--r-- | src/interp/br-saturn.boot | 2 | ||||
-rw-r--r-- | src/interp/c-util.boot | 37 | ||||
-rw-r--r-- | src/interp/cattable.boot | 4 | ||||
-rw-r--r-- | src/interp/database.boot | 6 | ||||
-rw-r--r-- | src/interp/define.boot | 2 | ||||
-rw-r--r-- | src/interp/g-cndata.boot | 5 | ||||
-rw-r--r-- | src/interp/i-analy.boot | 4 | ||||
-rw-r--r-- | src/interp/i-syscmd.boot | 2 | ||||
-rw-r--r-- | src/interp/lisplib.boot | 4 | ||||
-rw-r--r-- | src/interp/nrunfast.boot | 9 | ||||
-rw-r--r-- | src/interp/sys-constants.boot | 22 |
13 files changed, 56 insertions, 49 deletions
diff --git a/src/interp/Makefile.in b/src/interp/Makefile.in index 707f6310..6a6a4c55 100644 --- a/src/interp/Makefile.in +++ b/src/interp/Makefile.in @@ -334,7 +334,7 @@ database.$(FASLEXT): clam.$(FASLEXT) nlib.$(FASLEXT) \ c-util.$(FASLEXT) functor.$(FASLEXT): category.$(FASLEXT) interop.$(FASLEXT) lisplib.$(FASLEXT) category.$(FASLEXT): c-util.$(FASLEXT) g-cndata.$(FASLEXT) -cattable.$(FASLEXT): simpbool.$(FASLEXT) g-util.$(FASLEXT) +cattable.$(FASLEXT): simpbool.$(FASLEXT) c-util.$(FASLEXT) compat.$(FASLEXT): pathname.$(FASLEXT) simpbool.$(FASLEXT): macros.$(FASLEXT) newfort.$(FASLEXT): macros.$(FASLEXT) @@ -424,7 +424,7 @@ c-util.$(FASLEXT): g-opt.$(FASLEXT) pathname.$(FASLEXT): nlib.$(FASLEXT) hashcode.$(FASLEXT): g-util.$(FASLEXT) g-util.$(FASLEXT): ggreater.$(FASLEXT) macros.$(FASLEXT) sys-utility.$(FASLEXT) -g-cndata.$(FASLEXT): sys-macros.$(FASLEXT) +g-cndata.$(FASLEXT): sys-macros.$(FASLEXT) c-util.$(FASLEXT) msg.$(FASLEXT): sys-macros.$(FASLEXT) astr.$(FASLEXT) util.$(FASLEXT): parsing.$(FASLEXT) fname.$(FASLEXT): macros.$(FASLEXT) diff --git a/src/interp/br-con.boot b/src/interp/br-con.boot index 5d54af01..71bc7940 100644 --- a/src/interp/br-con.boot +++ b/src/interp/br-con.boot @@ -741,7 +741,7 @@ conOpPage1(conform,:options) == --constructors Cname\#\E\sig \args \abb \comments (C is C, D, P, X) bindingsAlist := IFCAR options conname := opOf conform - symbolMember?(conname,$DomainNames) => + builtinFunctorName? conname => dbSpecialOperations conname domname := --> !!note!! <-- cons? conform => conform @@ -1058,7 +1058,7 @@ dbShowConsDoc(htPage,conlist) == dbShowConsDoc1(htPage,conform,indexOrNil) == [conname,:conargs] := conform - symbolMember?(conname,$DomainNames) => + builtinFunctorName? conname => conname := htpProperty(htPage,'conname) [["constructor",["NIL",doc]],:.] := property(conname,'documentation) sig := '((CATEGORY domain) (SetCategory) (SetCategory)) diff --git a/src/interp/br-saturn.boot b/src/interp/br-saturn.boot index e636210a..899611a1 100644 --- a/src/interp/br-saturn.boot +++ b/src/interp/br-saturn.boot @@ -1244,7 +1244,7 @@ displayDomainOp(htPage,which,origin,op,sig,predicate, $conargs : local := rest conform if which = '"operation" then $signature : local := - symbolMember?(conname,$DomainNames) => nil + builtinFunctorName? conname => nil CDAR getConstructorModemapFromDB conname --RDJ: this next line is necessary until compiler bug is fixed --that forgets to substitute #variables for t#variables; diff --git a/src/interp/c-util.boot b/src/interp/c-util.boot index 986fbea0..3184e728 100644 --- a/src/interp/c-util.boot +++ b/src/interp/c-util.boot @@ -83,6 +83,43 @@ macro domainPredicates d == domainRef(d,3) --% + +++ List of category constructors that do not have entries in the +++ constructor database. So, they are mostly recognized by their names. +$CategoryNames == + '(CATEGORY _ + RecordCategory _ + Join _ + EnumerationCategory _ + SubsetCategory _ + UnionCategory _ + MappingCategory) + +macro builtinCategoryName? x == + symbolMember?(x,$CategoryNames) + +++ List of domain constructors that do not have entries in the constructor +++ database. So, they are mostly recognized by their names. +++ See also $CategoryNames. +$DomainNames == + '(Mapping _ + SubDomain _ + Union _ + Record _ + Enumeration) + +macro builtinFunctorName? x == + symbolMember?(x,$DomainNames) + +++ The collection of builtin category names and builtin domain names. +$BuiltinConstructorNames == + [:$CategoryNames,:$DomainNames] + +++ Return true if the symbol `s' designates a builtin constructor. +macro builtinConstructor? s == + symbolMember?(s,$BuiltinConstructorNames) + +--% $SetCategory == '(SetCategory) diff --git a/src/interp/cattable.boot b/src/interp/cattable.boot index 5f546ebe..ca0272e1 100644 --- a/src/interp/cattable.boot +++ b/src/interp/cattable.boot @@ -33,7 +33,7 @@ import simpbool -import g_-util +import c_-util namespace BOOT module cattable where hasCat: (%Instantiation,%Instantiation) -> %Code @@ -280,7 +280,7 @@ isFormalArgumentList argl == mkCategoryExtensionAlist cform == not cons? cform => nil cop := first cform - symbolMember?(cop, $CategoryNames) => mkCategoryExtensionAlistBasic cform + builtinCategoryName? cop => mkCategoryExtensionAlistBasic cform catlist := formalSubstitute(cform, first getConstructorExports(cform, true)) extendsList:= nil for [cat,:pred] in catlist repeat diff --git a/src/interp/database.boot b/src/interp/database.boot index f62d2f59..f8a9b6ad 100644 --- a/src/interp/database.boot +++ b/src/interp/database.boot @@ -163,10 +163,10 @@ getConstructorArity ctor == getConstructorKind: %Constructor -> %Maybe %ConstructorKind getConstructorKind ctor == kind := getConstructorKindFromDB ctor => - kind = "domain" and isDefaultPackageName ctor => "package" + kind is "domain" and isDefaultPackageName ctor => "package" kind - symbolMember?(ctor,$DomainNames) => "domain" - symbolMember?(ctor,$CategoryNames) => "category" + builtinFunctorName? ctor => "domain" + builtinCategoryName? ctor => "category" nil --% Functions for manipulating MODEMAP DATABASE diff --git a/src/interp/define.boot b/src/interp/define.boot index 599e9ca4..5d3772e0 100644 --- a/src/interp/define.boot +++ b/src/interp/define.boot @@ -656,7 +656,7 @@ mkEvalableCategoryForm c == op="Join" => ["Join",:[mkEvalableCategoryForm x for x in argl]] op is "DomainSubstitutionMacro" => mkEvalableCategoryForm second argl op is "mkCategory" => c - symbolMember?(op,$CategoryNames) => + builtinCategoryName? op => ([x,m,$e]:= compOrCroak(c,$EmptyMode,$e); m=$Category => x) --loadIfNecessary op getConstructorKindFromDB op = 'category or diff --git a/src/interp/g-cndata.boot b/src/interp/g-cndata.boot index ff50bc36..ea0c974c 100644 --- a/src/interp/g-cndata.boot +++ b/src/interp/g-cndata.boot @@ -33,6 +33,7 @@ import sys_-macros +import c_-util namespace BOOT --% Manipulation of Constructor Datat @@ -90,8 +91,8 @@ packageForm? d == categoryFrom?: %Form -> %Boolean categoryForm? c == op := opOf c - symbolMember?(op, $CategoryNames) => true - getConstructorKindFromDB op = "category" => true + builtinCategoryName? op => true + getConstructorKindFromDB op is "category" => true false -- probably will switch over to 'libName soon diff --git a/src/interp/i-analy.boot b/src/interp/i-analy.boot index e8a4e2ca..9edac053 100644 --- a/src/interp/i-analy.boot +++ b/src/interp/i-analy.boot @@ -336,8 +336,8 @@ bottomUpCompilePredicate(pred, name) == isUnambiguouslyConstructor(id,t) == niladicConstructorFromDB id => nil k := getConstructorKindFromDB id or - symbolMember?(id,$DomainNames) => "domain" - symbolMember?(id,$CategoryNames) => "category" + builtinFunctorName? id => "domain" + builtinCategoryName? id => "category" k = nil => nil ms := k = "category" => [$CategoryConstructor] diff --git a/src/interp/i-syscmd.boot b/src/interp/i-syscmd.boot index fbab587a..d7e243f2 100644 --- a/src/interp/i-syscmd.boot +++ b/src/interp/i-syscmd.boot @@ -2420,7 +2420,7 @@ reportOpsFromLisplib1(unitForm,u) == editFile showFile reportOpsFromUnitDirectly unitForm == - isRecordOrUnion := unitForm is [a,:.] and symbolMember?(a,$DomainNames) + isRecordOrUnion := unitForm is [a,:.] and builtinFunctorName? a unit:= evalDomain unitForm top:= first unitForm kind:= getConstructorKindFromDB top diff --git a/src/interp/lisplib.boot b/src/interp/lisplib.boot index 498bacfb..6a44b45d 100644 --- a/src/interp/lisplib.boot +++ b/src/interp/lisplib.boot @@ -404,7 +404,7 @@ loadFunctor u == makeConstructorsAutoLoad() == for cnam in allConstructors() repeat - symbolMember?(cnam,$CategoryNames) => nil + builtinCategoryName? cnam => nil property(cnam,'LOADED) := nil -- fn:=getConstructorAbbreviationFromDB cnam if niladicConstructorFromDB cnam @@ -793,7 +793,7 @@ isFunctor x == op:= opOf x not IDENTP op => false $InteractiveMode => - symbolMember?(op,$DomainNames) => true + builtinFunctorName? op => true getConstructorKindFromDB op in '(domain package) u:= get(op,'isFunctor,$CategoryFrame) or op in '(SubDomain Union Record Enumeration) => u diff --git a/src/interp/nrunfast.boot b/src/interp/nrunfast.boot index 785682e4..5d3fba7c 100644 --- a/src/interp/nrunfast.boot +++ b/src/interp/nrunfast.boot @@ -37,7 +37,6 @@ namespace BOOT module nrunfast where getOpCode: (%Symbol, %Vector %Thing, %Short) -> %Maybe %Short - builtinConstructor?: %Symbol -> %Boolean ++ $doNotCompressHashTableIfTrue := false @@ -494,14 +493,6 @@ lazyMatchArg2(s,a,dollar,domain,typeFlag) == --above line is temporarily necessary until system is compiled 8/15/90 --s = a -++ The collection of builtin category names and builtin domain names. -$BuiltinConstructorNames == - [:$CategoryNames,:$DomainNames] - -++ Return true if the symbol `s' designates a builtin constructor. -builtinConstructor? s == - symbolMember?(s,$BuiltinConstructorNames) - ++ Return true if the symbol `s' designates a generalized builtin ++ constructor, that is a builtin constructor or any operator we ++ deem as a constructor from the domain slot-filling machinery perspective. diff --git a/src/interp/sys-constants.boot b/src/interp/sys-constants.boot index 331208ce..7ffa4460 100644 --- a/src/interp/sys-constants.boot +++ b/src/interp/sys-constants.boot @@ -539,28 +539,6 @@ $DomainConstructor == $StringCategory == '(StringCategory) - -++ List of category constructors that do not have entries in the -++ constructor database. So, they are mostly recognized by their names. -$CategoryNames == - '(CATEGORY _ - RecordCategory _ - Join _ - EnumerationCategory _ - SubsetCategory _ - UnionCategory _ - MappingCategory) - -++ List of domain constructors that do not have entries in the constructor -++ database. So, they are mostly recognized by their names. -++ See also $CategoryNames. -$DomainNames == - '(Mapping _ - SubDomain _ - Union _ - Record _ - Enumeration) - ++ List of language support type forms. $LangSupportTypes == '((Mode) (Domain) (Type) (Category)) |