diff options
author | dos-reis <gdr@axiomatics.org> | 2011-08-16 06:35:55 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2011-08-16 06:35:55 +0000 |
commit | 32bff5d4d40370d186e954ee90f31e7c2b20b50a (patch) | |
tree | 5bc3e872c7d64990184d80bd7697836d37d1fc23 /src/interp/functor.boot | |
parent | db462564430f0d9eb4daa70a191d10e6bb5af528 (diff) | |
download | open-axiom-32bff5d4d40370d186e954ee90f31e7c2b20b50a.tar.gz |
* interp/modemap.boot (addModemap0): Don't special-case
CategoryDefaults.
* interp/define.boot (processFunctor): Fold into caller. Remove.
* interp/clam.boot (recordInstantiation1): Do not special case
CategoryDefaults and RepeatedSquaring.
* interp/functor.boot (DescendCode): Lose last argument, for it is
always $. Adjust body. Adjust caller.
* interp/nruncomp.boot (buildFunctor): $catNames should not be a
fluid variable. Rename to viewNames.
Diffstat (limited to 'src/interp/functor.boot')
-rw-r--r-- | src/interp/functor.boot | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/src/interp/functor.boot b/src/interp/functor.boot index 70085b74..e3782d26 100644 --- a/src/interp/functor.boot +++ b/src/interp/functor.boot @@ -433,22 +433,22 @@ DescendCodeAdd1(base,flag,target,formalArgs,formalArgModes) == code:=[v,:code] [["%LET",instantiatedBase,base],:code] -DescendCode(code,flag,viewAssoc,EnvToPass) == +DescendCode(code,flag,viewAssoc) == -- flag = true if we are walking down code always executed; -- otherwise set to conditions in which - code=nil => nil - code='%noBranch => nil + code = nil => nil + code is '%noBranch => nil isMacro(code,$e) => nil --RDJ: added 3/16/83 code is ['add,base,:codelist] => codelist:= - [v for u in codelist | (v:= DescendCode(u,flag,viewAssoc,EnvToPass))~=nil] + [v for u in codelist | (v:= DescendCode(u,flag,viewAssoc))~=nil] -- must do this first, to get this overriding Add code ['PROGN,:DescendCodeAdd(base,flag),:codelist] code is ['PROGN,:codelist] => ['PROGN,: --Two REVERSEs leave original order, but ensure last guy wins reverse! [v for u in reverse codelist | - (v:= DescendCode(u,flag,viewAssoc,EnvToPass))~=nil]] + (v:= DescendCode(u,flag,viewAssoc))~=nil]] code is ['%when,:condlist] => c:= [[u2:= ProcessCond first u,:q] for u in condlist] where q() == null u2 => nil @@ -462,17 +462,17 @@ DescendCode(code,flag,viewAssoc,EnvToPass) == [DescendCode(v, f, if first u is ['HasCategory,dom,cat] then [[dom,:cat],:viewAssoc] - else viewAssoc,EnvToPass) for v in rest u] + else viewAssoc) for v in rest u] TruthP CAAR c => ['PROGN,:CDAR c] while (c and (last c is [c1] or last c is [c1,[]]) and (c1 = '%true or c1 is ['HasAttribute,:.])) repeat --strip out some worthless junk at the end c:=reverse! rest reverse! c - null c => '(LIST) + c = nil => ['%list] ['%when,:c] code is ["%LET",name,body,:.] => --only keep the names that are useful - u:=member(name,$locals) => + u := member(name,$locals) => CONTAINED('$,body) and isDomainForm(body,$e) => --instantiate domains which depend on $ after constants are set code:=['%store,['%tref,['%tref,'$,5],#$locals-#u],code] @@ -484,10 +484,9 @@ DescendCode(code,flag,viewAssoc,EnvToPass) == code -- doItIf deletes entries from $locals so can't optimize this code is ['CodeDefine,sig,implem] => --Generated by doIt in COMPILER BOOT - dom:= EnvToPass - dom:= - u:= LASSOC(dom,viewAssoc) => ['getDomainView,dom,u] - dom + dom := + u := LASSOC('$,viewAssoc) => ['getDomainView,'$,u] + '$ body:= ['CONS,implem,dom] u := SetFunctionSlots(sig,body,flag,'original) -- ??? We do not resolve default definitions, yet. @@ -536,8 +535,8 @@ SetFunctionSlots(sig,body,flag,mode) == --mode is either "original" or "adding" null body => return nil u := first $catvecList for catImplem in LookUpSigSlots(sig,categoryExports u) repeat - catImplem is [q,.,index] and (q='ELT or q='CONST) => - if q is 'CONST and body is ['CONS,a,b] then + catImplem is [q,.,index] and q in '(ELT CONST) => + if q = 'CONST and body is ['CONS,a,b] then body := ['CONS,'IDENTITY,['FUNCALL,a,b]] body:= ['%store,['%tref,'$,index],body] not vector? $SetFunctions => nil --packages don't set it |