mirror of
https://github.com/nineties/planckforth
synced 2025-01-13 08:01:10 +01:00
Test of start < limit at the beginning of do-loop os not necessary
This commit is contained in:
parent
5c0247875f
commit
9f862f44e1
1 changed files with 0 additions and 12 deletions
12
bootstrap.fs
12
bootstrap.fs
|
@ -1432,21 +1432,9 @@ do-stack 16 cells + do-sp !
|
|||
|
||||
\ compile: ( -- dest mark )
|
||||
: do
|
||||
compile 2dup
|
||||
compile >r \ save start
|
||||
compile >r \ save limit
|
||||
\ Leave if start >= limit.
|
||||
\ Have to write 'limit start swap 1- <= 0branch ...' but not
|
||||
\ 'limit start > 0branch ...'
|
||||
\ Since iteration range [start...limit) and [start...limit-1] is
|
||||
\ different when limit-1 is the maximum unsigned integer.
|
||||
compile swap
|
||||
compile 1-
|
||||
compile <=
|
||||
compile 0branch
|
||||
0 ,
|
||||
here >do do-mark >do
|
||||
here cell- >do leave-mark >do
|
||||
; immediate
|
||||
|
||||
: leave ( -- orig mark )
|
||||
|
|
Loading…
Reference in a new issue