diff options
-rw-r--r-- | src/interp/clam.boot | 3 | ||||
-rw-r--r-- | src/interp/g-util.boot | 2 | ||||
-rw-r--r-- | src/interp/guess.boot | 8 | ||||
-rw-r--r-- | src/interp/i-intern.boot | 2 | ||||
-rw-r--r-- | src/interp/i-output.boot | 6 | ||||
-rw-r--r-- | src/interp/interop.boot | 10 | ||||
-rw-r--r-- | src/interp/lisp-backend.boot | 2 | ||||
-rw-r--r-- | src/interp/nrunfast.boot | 2 | ||||
-rw-r--r-- | src/interp/word.boot | 8 | ||||
-rw-r--r-- | src/lisp/core.lisp.in | 5 |
10 files changed, 26 insertions, 22 deletions
diff --git a/src/interp/clam.boot b/src/interp/clam.boot index c5774c8e..4e75d57a 100644 --- a/src/interp/clam.boot +++ b/src/interp/clam.boot @@ -476,7 +476,8 @@ assocCacheShiftCount(x,al,fn) == newFrontPointer := forwardPointer y.rest.first := second y + 1 --increment use count return (val:= y) - if QSLESSP(c := second y,minCount) then --initial c is 1 so is true 1st time + c := second y + if c < minCount then --initial c is 1 so is true 1st time minCount := c newFrontPointer := forwardPointer --CAR is slot replaced on failure forwardPointer:= rest forwardPointer diff --git a/src/interp/g-util.boot b/src/interp/g-util.boot index 2bd68b4a..4b912926 100644 --- a/src/interp/g-util.boot +++ b/src/interp/g-util.boot @@ -632,7 +632,7 @@ mergeSort(f,g,p,n) == p := rest p p.rest := t t.rest := nil - if QSLESSP(n,3) then return p + if n < 3 then return p -- split the list p into p and q of equal length l := n quo 2 t := p diff --git a/src/interp/guess.boot b/src/interp/guess.boot index 8aae3f5a..d247f49c 100644 --- a/src/interp/guess.boot +++ b/src/interp/guess.boot @@ -288,8 +288,8 @@ canForgeWord(word,entry) == forge(word,w,W,entry,e,E,n) == w > W => e > E => n - QSPLUS(E-e,n) + 1 - e > E => QSPLUS(W-w,n) + 1 + E-e + n + 1 + e > E => W-w + n + 1 word.w = entry.e => forge(word,w+1,W,entry,e+1,E,n) w=W or e=E => forge(word,w+1,W,entry,e+1,E,n + 1) word.w=entry.(e+1) => @@ -302,12 +302,12 @@ forge(word,w,W,entry,e,E,n) == deltaW >= deltaE and (k := or/[j for j in (w+2)..(W-1) | word.j = entry.e]) and word.(k+1) = entry.(e+1) => - forge(word,k+2,W,entry,e+2,E,QSPLUS(k-w,n)) + forge(word,k+2,W,entry,e+2,E,k-w + n) deltaW <= deltaE and --if word is short, can we insert chars so as to match 2 consecutive chars (k := or/[j for j in (e+2)..(E-1) | word.w = entry.j]) and word.(w+1) = entry.(k+1) => - forge(word,w+2,W,entry,k+2,E,QSPLUS(n,k-e)) + forge(word,w+2,W,entry,k+2,E,n + k-e) forge(word,w+1,W,entry,e+1,E,n + 1) --check for two consecutive matches down the line forge(word,w+1,W,entry,e+1,E,n + 1) diff --git a/src/interp/i-intern.boot b/src/interp/i-intern.boot index 5a6b06f0..c0fb0483 100644 --- a/src/interp/i-intern.boot +++ b/src/interp/i-intern.boot @@ -121,7 +121,7 @@ mkAtree1 x == mkAtree2(x,op,argl) == nargl := #argl (op= "-") and (nargl = 1) and (integer? first argl) => - mkAtree1(MINUS first argl) + mkAtree1(-first argl) op=":" and argl is [y,z] => [mkAtreeNode "Declare",:argl] op="COLLECT" => [mkAtreeNode op,:transformCollect argl] op= "break" => diff --git a/src/interp/i-output.boot b/src/interp/i-output.boot index c273c668..0228b609 100644 --- a/src/interp/i-output.boot +++ b/src/interp/i-output.boot @@ -500,7 +500,7 @@ outputTran x == vector? x => outputTran ['BRACKET,['AGGLST,:[x.i for i in 0..maxIndex x]]] integer? x => - MINUSP x => ["-",MINUS x] + x < 0 => ["-",MINUS x] x atom x => x=$EmptyMode => specialChar 'quad @@ -1872,7 +1872,7 @@ keyp(u) == CAAR u absym x == - (integer? x) and (MINUSP x) => -x + integer? x and (x < 0) => -x cons? x and (keyp(x) = '_-) => second x x @@ -1990,7 +1990,7 @@ apphor(x1,x2,y,d,char) == APP(char, x2, y, temp) syminusp x == - integer? x => MINUSP x + integer? x => x < 0 cons? x and sameObject?(keyp x,'_-) appsum(u, x, y, d) == diff --git a/src/interp/interop.boot b/src/interp/interop.boot index 1bc6739d..1586697a 100644 --- a/src/interp/interop.boot +++ b/src/interp/interop.boot @@ -466,9 +466,9 @@ hashNewLookupInTable(op,sig,dollar,[domain,opvec],flag) == idxmax := maxIndex numvec start := vectorRef(opvec,k) finish := - QSGREATERP(max,k) => vectorRef(opvec,QSPLUS(k,2)) + max > k => vectorRef(opvec,k + 2) idxmax - if QSGREATERP(finish,idxmax) then systemError '"limit too large" + if finish > idxmax then systemError '"limit too large" numArgs := if hashCode? sig then -1 else (#sig)-1 success := nil $isDefaultingPackage: local := @@ -487,11 +487,11 @@ hashNewLookupInTable(op,sig,dollar,[domain,opvec],flag) == loc := arrayRef(numvec,i + numTableArgs + 2) loc = 1 => (someMatch := true) loc = 0 => - start := QSPLUS(start,QSPLUS(numTableArgs,4)) + start := start + numTableArgs + 4 i := start + 2 someMatch := true --mark so that if subsumption fails, look for original subsumptionSig := - [newExpandTypeSlot(arrayRef(numvec,QSPLUS(i,j)), + [newExpandTypeSlot(arrayRef(numvec,i + j), dollar,domain) for j in 0..numTableArgs] if $monitorNewWorld then sayBrightly [formatOpSignature(op,sig),'"--?-->", @@ -509,7 +509,7 @@ hashNewLookupInTable(op,sig,dollar,[domain,opvec],flag) == slot is 'skip => --recursive call from above 'replaceGoGetSlot return (success := newLookupInAddChain(op,sig,domain,dollar)) systemError '"unexpected format" - start := QSPLUS(start,QSPLUS(numTableArgs,4)) + start := start + numTableArgs + 4 (success ~= 'failed) and success => if $monitorNewWorld then sayLooking1('"<----",uu) where uu() == diff --git a/src/interp/lisp-backend.boot b/src/interp/lisp-backend.boot index e5d07fe2..961cf3fd 100644 --- a/src/interp/lisp-backend.boot +++ b/src/interp/lisp-backend.boot @@ -91,7 +91,7 @@ expandSTEP(id,lo,step,final)== final = nil => nil integer? inc => pred := - MINUSP inc => "<" + inc < 0 => "<" ">" [[pred,id,final]] [['COND,[['MINUSP,inc], diff --git a/src/interp/nrunfast.boot b/src/interp/nrunfast.boot index 9b0eaab7..b4fba7f9 100644 --- a/src/interp/nrunfast.boot +++ b/src/interp/nrunfast.boot @@ -532,7 +532,7 @@ lookupInDomainByName(op,domain,arg) == predIndex := arrayRef(numvec,i := i + 1) predIndex ~= 0 and not testBitVector(predvec,predIndex) => nil slotIndex := arrayRef(numvec,i + 2 + numberOfArgs) - newStart := QSPLUS(start,QSPLUS(numberOfArgs,4)) + newStart := start + numberOfArgs + 4 slot := domainRef(domain,slotIndex) cons? slot and sameObject?(first slot,first arg) and sameObject?(rest slot,rest arg) => return (success := true) start := start + numberOfArgs + 4 diff --git a/src/interp/word.boot b/src/interp/word.boot index b0b5f5e5..40d01114 100644 --- a/src/interp/word.boot +++ b/src/interp/word.boot @@ -298,8 +298,8 @@ canForgeWord(word,entry) == forge(word,w,W,entry,e,E,n) == w > W => e > E => n - QSPLUS(E-e,n) + 1 - e > E => QSPLUS(W-w,n) + 1 + E-e + n + 1 + e > E => W-w + n + 1 word.w = entry.e => forge(word,w+1,W,entry,e+1,E,n) w=W or e=E => forge(word,w+1,W,entry,e+1,E,n + 1) word.w=entry.(e+1) => @@ -312,12 +312,12 @@ forge(word,w,W,entry,e,E,n) == deltaW >= deltaE and (k := or/[j for j in (w+2)..(W-1) | word.j = entry.e]) and word.(k+1) = entry.(e+1) => - forge(word,k+2,W,entry,e+2,E,QSPLUS(k-w,n)) + forge(word,k+2,W,entry,e+2,E,k-w + n) deltaW <= deltaE and --if word is short, can we insert chars so as to match 2 consecutive chars (k := or/[j for j in (e+2)..(E-1) | word.w = entry.j]) and word.(w+1) = entry.(k+1) => - forge(word,w+2,W,entry,k+2,E,QSPLUS(n,k-e)) + forge(word,w+2,W,entry,k+2,E,n + k-e) forge(word,w+1,W,entry,e+1,E,n + 1) --check for two consecutive matches down the line forge(word,w+1,W,entry,e+1,E,n + 1) diff --git a/src/lisp/core.lisp.in b/src/lisp/core.lisp.in index 74f43cf1..f533a4a8 100644 --- a/src/lisp/core.lisp.in +++ b/src/lisp/core.lisp.in @@ -503,7 +503,10 @@ ;; Pretty-print a lisp form on a given output stream. (defun |prettyPrint| (x &optional (s |$OutputStream|)) (let ((*print-pretty* t) - (*print-array* t)) + (*print-array* t) + (*print-circle* t) + (*print-length* nil) + (*print-level* nil)) (prin1 x s))) ;; |