diff options
| author | Irene Knapp <ireneista@irenes.space> | 2026-05-28 19:34:07 -0700 |
|---|---|---|
| committer | Irene Knapp <ireneista@irenes.space> | 2026-05-28 20:28:48 -0700 |
| commit | 3b00a5376036bb3f50a1a1f97d136305a2d03a57 (patch) | |
| tree | c08ec1927761909aa76981d9eb964725e00ddc72 /flow-control.e | |
| parent | d9a82e9f3c87aa318fb05819249656b43fde15e3 (diff) | |
change the parameter order for memcopy and memmove
that was surprisingly involved, but it feels like the right thing to do Change-Id: Ia2f38c7278f4237cebd0435d27131fe32dbc3718 Force-Push: yes
Diffstat (limited to 'flow-control.e')
| -rw-r--r-- | flow-control.e | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/flow-control.e b/flow-control.e index ba6a5b6..bee5038 100644 --- a/flow-control.e +++ b/flow-control.e @@ -25,8 +25,8 @@ ~ (start pointer, length --) : if - 2dup swap dup 5 8 * + 3unroll swap - ~ (start pointer, length, adjusted start pointer, start pointer, length) + 2dup swap dup 5 8 * + 3roll + ~ (start pointer, length, start pointer, adjusted start pointer, length) memmove ~ (start pointer, length) @@ -47,7 +47,7 @@ ~ (start pointer, length --) : unless - 2dup swap dup 5 8 * + 3unroll swap + 2dup swap dup 5 8 * + 3roll ~ (start pointer, length, start pointer, adjusted start pointer, length) memmove ~ (start pointer, length) @@ -71,9 +71,9 @@ ~ Those spaces will take five words, and two words, respectively. So the ~ false-block gets moved by seven words, and the true-block gets moved by ~ five words. - 2dup swap dup 7 8 * + swap 3roll memmove - 4 roll dup 5 unroll 4 roll dup 5 unroll - swap dup 5 8 * + swap 3roll memmove + 2dup swap dup 7 8 * + 3roll memmove + ~ (true start, true length, false start, false length) + 3 pick dup 5 8 * + 4 pick memmove ~ (true start, true length, false start, false length) ~ Now we write out the initial test-and-branch. @@ -110,7 +110,7 @@ ~ (test start, test length, body start, body length --) : while ~ The conditional branch needs five words. - 2dup swap dup 5 8 * + swap 3roll memmove + 2dup swap dup 5 8 * + 3roll memmove here @ 5 unroll swap dup 3unroll here ! ~ (old here, test start, test length, body start, body length) ' lit entry-to-execution-token , 0 , |