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
|
||||
d 2049
|
||||
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
|
||||
d 1793
|
||||
i re......
|
||||
|
@ -184,17 +190,18 @@ i re......
|
|||
## Stack Shufflers
|
||||
|
||||
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
|
||||
i puduposw
|
||||
i re......
|
||||
|
||||
: dup-pair
|
||||
i lica....
|
||||
r over
|
||||
i lica....
|
||||
r over
|
||||
i puduposw
|
||||
i puduposw
|
||||
i re......
|
||||
~~~
|
||||
|
||||
|
|
BIN
ngaImage
BIN
ngaImage
Binary file not shown.
Loading…
Reference in a new issue