commit eb3f4f396d4897be9b0163f8549676bf7db4f6c2
parent b69efc23ddf621748115a361e311d24402204af7
Author: Alexander Burger <abu@software-lab.de>
Date: Tue, 20 Sep 2011 15:17:10 +0200
Use 'inc'/'dec' in certain cases instead of 'add'/'sub'
Diffstat:
6 files changed, 20 insertions(+), 20 deletions(-)
diff --git a/src64/big.l b/src64/big.l
@@ -1,4 +1,4 @@
-# 26aug11abu
+# 20sep11abu
# (c) Software Lab. Alexander Burger
### Destructive primitives ###
@@ -666,7 +666,7 @@
ret
end
ld A (E DIG) # Add carry to next digit
- add A 1
+ inc A
loop
end
ld C (A DIG) # Add digits
diff --git a/src64/flow.l b/src64/flow.l
@@ -1,4 +1,4 @@
-# 24aug11abu
+# 20sep11abu
# (c) Software Lab. Alexander Burger
(code 'redefMsgEC)
@@ -3027,7 +3027,7 @@
end
do
call space # Output spaces
- sub C 1 # 'cnt' times
+ dec C # 'cnt' times
until sz
push E
atom Y # 'sym'?
diff --git a/src64/ht.l b/src64/ht.l
@@ -1,4 +1,4 @@
-# 15sep11abu
+# 20sep11abu
# (c) Software Lab. Alexander Burger
(data 'HtData)
@@ -468,7 +468,7 @@ align 8 asciz "<hr>"
dec E # Decrement count
end
end
- sub E 1 # Less than zero?
+ dec E # Less than zero?
if ns # No
call mkCharA_A # First character
call consA_X # Build first cell
@@ -498,7 +498,7 @@ align 8 asciz "<hr>"
dec E # Decrement count
end
end
- sub E 1 # Less than zero?
+ dec E # Less than zero?
if s # Yes
ld E Nil # Return NIL
break T
diff --git a/src64/io.l b/src64/io.l
@@ -1,4 +1,4 @@
-# 16sep11abu
+# 20sep11abu
# (c) Software Lab. Alexander Burger
# Close file descriptor
@@ -4437,7 +4437,7 @@
call evCntEX_FE # Evaluate second
ld A (Chr) # Get Chr again
do
- sub Y 1 # Decrement first 'cnt'
+ dec Y # Decrement first 'cnt'
while ns
null A # EOF?
if s # Yes
@@ -4460,7 +4460,7 @@
ret
end
call (PutB) # Output byte
- sub E 1 # Decrement 'cnt'
+ dec E # Decrement 'cnt'
while nz
call (Get_A) # Get next
loop
@@ -5056,7 +5056,7 @@
ld C E # Keep in E
call xCntCX_FC # Get cnt
do
- sub C 1 # 'cnt' times
+ dec C # 'cnt' times
while ns
call space # Output spaces
loop
diff --git a/src64/main.l b/src64/main.l
@@ -1,4 +1,4 @@
-# 16sep11abu
+# 20sep11abu
# (c) Software Lab. Alexander Burger
(code 'Code)
@@ -1521,7 +1521,7 @@
ld A E # Byte value
shr A 4 # in B
do
- sub C 1 # Done?
+ dec C # Done?
while ns # No
ld (Z) B # Store byte in buffer
inc Z # Increment buffer pointer
diff --git a/src64/subr.l b/src64/subr.l
@@ -1,4 +1,4 @@
-# 24aug11abu
+# 20sep11abu
# (c) Software Lab. Alexander Burger
# (car 'var) -> any
@@ -698,11 +698,11 @@
while z # No
call evCntXY_FE # Next 'cnt'
ld C E # into C
- sub C 1 # 'cnt' greater zero?
+ dec C # 'cnt' greater zero?
if ns # Yes
ld E (L I) # Get result
do
- sub C 1 # Iterate
+ dec C # Iterate
while ns
ld E (E CDR)
loop
@@ -953,7 +953,7 @@
dec X # Decrement 'cnt'
loop
do
- sub X 1 # 'cnt' > 0?
+ dec X # 'cnt' > 0?
while ns # Yes
ld C E
call consC_E # Cons 'any' with 'lst'
@@ -1731,7 +1731,7 @@
ld X (C CDR) # More than one element?
atom X
if z # Yes
- sub E 1 # 'cnt' > 1?
+ dec E # 'cnt' > 1?
if nsz # Yes
ld (C CDR) (X CDR) # Swap first two cells
ld (X CDR) C
@@ -3699,7 +3699,7 @@
shr C 4 # Normalize short
ld A (L V) # nl
do
- sub C 1 # Decrement
+ dec C # Decrement
while nsz
ld A (A CDR) # Skip
loop
@@ -3920,7 +3920,7 @@
ld A (A) # Get count
shr A 4 # Normalize short
do
- sub A 1 # Decrement
+ dec A # Decrement
while nsz
ld C (C CDR) # Skip
loop