4 export sbJ_block_iterator
5 import sbJ_allocate_words sbJ_block_length sbJ_block_nth sbJ_false sbJ_make_iterator sbJ_lt sbJ_true
10 let sbJ_state call sbJ_allocate_words 4
11 set-word sbJ_state 1 sbJ_blk
12 let sbJ__sb_G1 call sbJ_block_length sbJ_blk
13 set-word sbJ_state 2 sbJ__sb_G1
14 set-word sbJ_state 3 0
15 let sbJ__sb_G2 call sbJ_make_iterator sbJ_block_iterator_next sbJ_state
21 sbJ_block_iterator_next:
22 function sbJ_it sbJ_state sbJ_setJ2diteratorJ2dvalue
24 let sbJ_i get-word sbJ_state 3
25 let sbJ__sb_G3 get-word sbJ_state 2
26 let sbJ__sb_G4 call sbJ_lt sbJ_i sbJ__sb_G3
27 ifeq sbJ__sb_G4 @sbJ_true
29 let sbJ__sb_G5 add sbJ_i 1
30 set-word sbJ_state 3 sbJ__sb_G5
31 let sbJ__sb_G6 get-word sbJ_state 1
32 let sbJ__sb_G7 call sbJ_block_nth sbJ__sb_G6 sbJ_i
33 let sbJ__sb_G8 call sbJ_setJ2diteratorJ2dvalue sbJ_it sbJ__sb_G7