From 97463cc77bbec1c33f46ceb44584a180264682c3 Mon Sep 17 00:00:00 2001 From: dos-reis Date: Thu, 21 Apr 2011 05:56:14 +0000 Subject: * boot/tokens.boot: Don't rename nreverse. * boot/utility.boot (reverse!): Define. * boot/parser.boot: Use reverse! instead of NREVERSE. * boot/ast.boot: Generate reverse! forms instead of NREVERSE. --- src/interp/br-op1.boot | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'src/interp/br-op1.boot') diff --git a/src/interp/br-op1.boot b/src/interp/br-op1.boot index 5b46256d..25243200 100644 --- a/src/interp/br-op1.boot +++ b/src/interp/br-op1.boot @@ -125,7 +125,7 @@ dbShowOp1(htPage,opAlist,which,key) == acc := nil for x in items | x.3 repeat acc:= [x,:acc] null acc => nil - [op,:nreverse acc] + [op,:reverse! acc] $conformsAreDomains : local := htpProperty(htPage,'domname) opCount := opAlistCount(opAlist, which) branch := @@ -352,7 +352,7 @@ dbGatherData(htPage,opAlist,which,key) == exposureFlag => op [op,nil] acc := [node,:acc] - nreverse acc + reverse! acc data := nil dbExpandOpAlistIfNecessary(htPage,opAlist,which,key in '(origins documentation),false) --create data, a list of the form ((entry,exposeFlag,:entries)...) @@ -407,8 +407,8 @@ dbGatherDataImplementation(htPage,opAlist) == key = 'nowhere => nowheres := [x,:nowheres] key = 'constant =>constants := [x,:constants] others := [x,:others] --add chain domains go here - fn [nowheres,constants,domexports,SORTBY('CDDR,nreverse others),SORTBY('CDDR, - nreverse defexports),SORTBY('CDDR,nreverse unexports)] where + fn [nowheres,constants,domexports,SORTBY('CDDR,reverse! others),SORTBY('CDDR, + reverse! defexports),SORTBY('CDDR,reverse! unexports)] where fn l == alist := nil for u in l repeat @@ -417,7 +417,7 @@ dbGatherDataImplementation(htPage,opAlist) == entries := [[first u,true],:[u and [first u,true] while key = CDDAR (u := rest u)]] alist := [[key,gn key,:entries],:alist] - nreverse alist + reverse! alist gn key == atom key => true isExposedConstructor first key @@ -450,8 +450,8 @@ dbReduceByOpSignature(opAlist,datalist) == for [op,:alist] in opAlist | symbolMember?(op,ops) repeat entryList := [entry for (entry := [sig,:.]) in alist | test] where test() == or/[x for x in datalist | x is [[=op,=sig,:.],:.]] - entryList => acc := [[op,:nreverse entryList],:acc] - nreverse acc + entryList => acc := [[op,:reverse! entryList],:acc] + reverse! acc dbReduceBySignature(opAlist,op,sig) == --reduces opAlist to one with a fixed op and sig @@ -462,14 +462,14 @@ dbReduceByForm(opAlist,form) == for [op,:alist] in opAlist repeat items := [x for x in alist | dbContrivedForm(op,x) = form] => acc := [[op,:items],:acc] - nreverse acc + reverse! acc dbReduceBySelection(opAlist,key,fn) == acc := nil for [op,:alist] in opAlist repeat items := [x for x in alist | FUNCALL(fn,x) = key] => acc := [[op,:items],:acc] - nreverse acc + reverse! acc dbContrivedForm(op,[sig,:.]) == $which = '"attribute" => [op,sig] @@ -756,8 +756,8 @@ dbShowOperationLines(which,linelist) == --branch in with lines pile := [x] while (lines := rest lines) and name = dbName (x := first lines) repeat pile := [x,:pile] - opAlist := [[name,:nreverse pile],:opAlist] - opAlist := listSort(function LEXLESSEQP,nreverse opAlist) + opAlist := [[name,:reverse! pile],:opAlist] + opAlist := listSort(function LEXLESSEQP,reverse! opAlist) if which = '"operation" then htpSetProperty(htPage,'opAlist,opAlist) else htpSetProperty(htPage,'attrAlist,opAlist) @@ -836,7 +836,7 @@ dbExpandOpAlistIfNecessary(htPage,opAlist,which,needOrigins?,condition?) == exposeFlag := dbExposed?(line,char "o") acc := [[sig,predicate,origin,exposeFlag,comments],:acc] --always store the fruits of our labor: - pair.rest := nreverse acc --at least partially expand it + pair.rest := reverse! acc --at least partially expand it condition? and value => return value --early exit value => value condition? => nil -- cgit v1.2.3