aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/interp/clam.boot6
-rw-r--r--src/interp/guess.boot16
-rw-r--r--src/interp/interop.boot2
-rw-r--r--src/interp/nrunfast.boot14
-rw-r--r--src/interp/slam.boot2
-rw-r--r--src/interp/word.boot16
6 files changed, 28 insertions, 28 deletions
diff --git a/src/interp/clam.boot b/src/interp/clam.boot
index fbce1a6a..5472a22a 100644
--- a/src/interp/clam.boot
+++ b/src/interp/clam.boot
@@ -318,12 +318,12 @@ consForHashLookup(a,b) ==
$hashNode
CDRwithIncrement x ==
- x.first := QSADD1 first x
+ x.first := first x + 1
rest x
HGETandCount(hashTable,prop) ==
u:= HGET(hashTable,prop) or return nil
- u.first := QSADD1 first u
+ u.first := first u + 1
u
clearClams() ==
@@ -472,7 +472,7 @@ assocCacheShiftCount(x,al,fn) ==
until EQ(forwardPointer,al) repeat
FUNCALL(fn, first (y:=first forwardPointer),x) =>
newFrontPointer := forwardPointer
- y.rest.first := QSADD1 second y --increment use count
+ 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
minCount := c
diff --git a/src/interp/guess.boot b/src/interp/guess.boot
index 16eaef47..7b59d6e4 100644
--- a/src/interp/guess.boot
+++ b/src/interp/guess.boot
@@ -288,14 +288,14 @@ canForgeWord(word,entry) ==
forge(word,w,W,entry,e,E,n) ==
w > W =>
e > E => n
- QSADD1 QSPLUS(E-e,n)
- e > E => QSADD1 QSPLUS(W-w,n)
+ QSPLUS(E-e,n) + 1
+ e > E => QSPLUS(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,QSADD1 n)
+ w=W or e=E => forge(word,w+1,W,entry,e+1,E,n + 1)
word.w=entry.(e+1) =>
- word.(w+1) = entry.e => forge(word,w+2,W,entry,e+2,E,QSADD1 n)
- forge(word,w+1,W,entry,e+2,E,QSADD1 n)
- word.(w+1)=entry.e => forge(word,w+2,W,entry,e+1,E,QSADD1 n)
+ word.(w+1) = entry.e => forge(word,w+2,W,entry,e+2,E,n + 1)
+ forge(word,w+1,W,entry,e+2,E,n + 1)
+ word.(w+1)=entry.e => forge(word,w+2,W,entry,e+1,E,n + 1)
(deltaW := W-w) > 1 and (deltaE := E-e) > 1 =>
--if word is long, can we delete chars to match 2 consective chars
@@ -308,9 +308,9 @@ forge(word,w,W,entry,e,E,n) ==
(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+1,W,entry,e+1,E,QSADD1 n)
+ 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,QSADD1 n)
+ forge(word,w+1,W,entry,e+1,E,n + 1)
--+ DO NOT REMOVE DEFINITIONS BELOW which explain the algorithm
--+ canForgeWord(word,entry) ==--
diff --git a/src/interp/interop.boot b/src/interp/interop.boot
index bd9cf23f..4c5b62ee 100644
--- a/src/interp/interop.boot
+++ b/src/interp/interop.boot
@@ -418,7 +418,7 @@ hashNewLookupInTable(op,sig,dollar,[domain,opvec],flag) ==
PROGN
i := start
numTableArgs :=numvec.i
- predIndex := numvec.(i := QSADD1 i)
+ predIndex := numvec.(i := i + 1)
(predIndex ~= 0) and null testBitVector(predvec,predIndex) => nil
exportSig :=
[newExpandTypeSlot(numvec.(i + j + 1),
diff --git a/src/interp/nrunfast.boot b/src/interp/nrunfast.boot
index ef1bcf6d..57afc9a7 100644
--- a/src/interp/nrunfast.boot
+++ b/src/interp/nrunfast.boot
@@ -84,7 +84,7 @@ getOpCode(op,vec,max) ==
--search Op vector for "op" returning code if found, nil otherwise
res := nil
for i in 0..max by 2 repeat
- EQ(vectorRef(vec,i),op) => return (res := QSADD1 i)
+ EQ(vectorRef(vec,i),op) => return (res := i + 1)
res
evalSlotDomain(u,dollar) ==
@@ -135,16 +135,16 @@ replaceGoGetSlot env ==
thisDomainForm := devaluate thisDomain
bytevec := getDomainByteVector thisDomain
numOfArgs := bytevec.index
- goGetDomainSlotIndex := bytevec.(index := QSADD1 index)
+ goGetDomainSlotIndex := bytevec.(index := index + 1)
goGetDomain :=
goGetDomainSlotIndex = 0 => thisDomain
thisDomain.goGetDomainSlotIndex
if cons? goGetDomain then
goGetDomain := lazyDomainSet(goGetDomain,thisDomain,goGetDomainSlotIndex)
sig :=
- [newExpandTypeSlot(bytevec.(index := QSADD1 index),thisDomain,thisDomain)
+ [newExpandTypeSlot(bytevec.(index := index + 1),thisDomain,thisDomain)
for i in 0..numOfArgs]
- thisSlot := bytevec.(QSADD1 index)
+ thisSlot := bytevec.(index + 1)
if $monitorNewWorld then
sayLooking(concat('"%l","..",form2String thisDomainForm,
'" wants",'"%l",'" "),op,sig,goGetDomain)
@@ -204,9 +204,9 @@ newLookupInTable(op,sig,dollar,[domain,opvec],flag) ==
PROGN
i := start
numArgs ~= (numTableArgs :=numvec.i) => nil
- predIndex := numvec.(i := QSADD1 i)
+ predIndex := numvec.(i := i + 1)
NE(predIndex,0) and not testBitVector(predvec,predIndex) => nil
- loc := newCompareSig(sig,numvec,(i := QSADD1 i),dollar,domain)
+ loc := newCompareSig(sig,numvec,(i := i + 1),dollar,domain)
null loc => nil --signifies no match
loc = 1 => (someMatch := true)
loc = 0 =>
@@ -521,7 +521,7 @@ lookupInDomainByName(op,domain,arg) ==
while finish > start repeat
i := start
numberOfArgs :=numvec.i
- predIndex := numvec.(i := QSADD1 i)
+ predIndex := numvec.(i := i + 1)
NE(predIndex,0) and not testBitVector(predvec,predIndex) => nil
slotIndex := numvec.(i + 2 + numberOfArgs)
newStart := QSPLUS(start,QSPLUS(numberOfArgs,4))
diff --git a/src/interp/slam.boot b/src/interp/slam.boot
index 9855b201..ef68929f 100644
--- a/src/interp/slam.boot
+++ b/src/interp/slam.boot
@@ -273,7 +273,7 @@ compileRecurrenceRelation(op,nam,argl,junk,[body,sharpArg,n,:initCode]) ==
stateNam:= GENVAR()
stateVar:= gensym()
stateVal:= gensym()
- lastArg := INTERNL strconc('"#",STRINGIMAGE QSADD1 # argl)
+ lastArg := INTERNL strconc('"#",STRINGIMAGE(#argl + 1))
decomposeBindings:=
[[gIndex,["ELT",lastArg,0]],:[[g,["ELT",lastArg,i]]
for g in gsList for i in 1..]]
diff --git a/src/interp/word.boot b/src/interp/word.boot
index 904718a7..f37d34be 100644
--- a/src/interp/word.boot
+++ b/src/interp/word.boot
@@ -297,14 +297,14 @@ canForgeWord(word,entry) ==
forge(word,w,W,entry,e,E,n) ==
w > W =>
e > E => n
- QSADD1 QSPLUS(E-e,n)
- e > E => QSADD1 QSPLUS(W-w,n)
+ QSPLUS(E-e,n) + 1
+ e > E => QSPLUS(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,QSADD1 n)
+ w=W or e=E => forge(word,w+1,W,entry,e+1,E,n + 1)
word.w=entry.(e+1) =>
- word.(w+1) = entry.e => forge(word,w+2,W,entry,e+2,E,QSADD1 n)
- forge(word,w+1,W,entry,e+2,E,QSADD1 n)
- word.(w+1)=entry.e => forge(word,w+2,W,entry,e+1,E,QSADD1 n)
+ word.(w+1) = entry.e => forge(word,w+2,W,entry,e+2,E,n + 1)
+ forge(word,w+1,W,entry,e+2,E,n + 1)
+ word.(w+1)=entry.e => forge(word,w+2,W,entry,e+1,E,n + 1)
(deltaW := W-w) > 1 and (deltaE := E-e) > 1 =>
--if word is long, can we delete chars to match 2 consective chars
@@ -317,9 +317,9 @@ forge(word,w,W,entry,e,E,n) ==
(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+1,W,entry,e+1,E,QSADD1 n)
+ 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,QSADD1 n)
+ forge(word,w+1,W,entry,e+1,E,n + 1)
--+ DO NOT REMOVE DEFINITIONS BELOW which explain the algorithm
--+ canForgeWord(word,entry) ==--