add commentary; improved dup-pair
FossilOrigin-Name: 3d1b2de02798d2b545d6b28f3616700cc2f97688742c827aafb079af405a636b
This commit is contained in:
parent
43192e7bad
commit
4990a36294
3 changed files with 13 additions and 6 deletions
File diff suppressed because one or more lines are too long
|
@ -175,7 +175,13 @@ space savings.
|
||||||
: _packedcall
|
: _packedcall
|
||||||
d 2049
|
d 2049
|
||||||
i re......
|
i re......
|
||||||
|
~~~
|
||||||
|
|
||||||
|
Likewise, I define a packed jump for use with quotations. This saves
|
||||||
|
several hundred cells (and thus fetch/decode cycles) when loading the
|
||||||
|
standard library.
|
||||||
|
|
||||||
|
~~~
|
||||||
: _packedjump
|
: _packedjump
|
||||||
d 1793
|
d 1793
|
||||||
i re......
|
i re......
|
||||||
|
@ -184,17 +190,18 @@ i re......
|
||||||
## Stack Shufflers
|
## Stack Shufflers
|
||||||
|
|
||||||
These add additional operations on the stack elements that'll keep
|
These add additional operations on the stack elements that'll keep
|
||||||
later code much more readable.
|
later code much more readable. The `dup-pair` is the same as `over
|
||||||
|
over`, but I inline the machine code as it's smaller and faster in
|
||||||
|
this case.
|
||||||
|
|
||||||
~~~
|
~~~
|
||||||
: over
|
: over
|
||||||
i puduposw
|
i puduposw
|
||||||
i re......
|
i re......
|
||||||
|
|
||||||
: dup-pair
|
: dup-pair
|
||||||
i lica....
|
i puduposw
|
||||||
r over
|
i puduposw
|
||||||
i lica....
|
|
||||||
r over
|
|
||||||
i re......
|
i re......
|
||||||
~~~
|
~~~
|
||||||
|
|
||||||
|
|
BIN
ngaImage
BIN
ngaImage
Binary file not shown.
Loading…
Reference in a new issue