Feature or Enhancement?
- ( ) New feature
- (x) Enhancement of existing feature
Description
If multiple values are removed from the stack and written to the cache, then read from the cache and placed onto the stack, the order will be reversed. This is somewhat inconvenient, and it is made more inconvenient by the fact that OP_REVERSE does not take its argument from the stack.
So I propose two related changes:
- Reverse the order taken from the stack by
OP_WRITE_CACHE before writing to the cache. Leave the OP_READ_CACHE* operations alone.
- Change
OP_REVERSE to take its argument from the stack instead of from the tape. This introduces 1 byte of additional overhead for the use cases currently available (which I am yet to encounter in practice thus far) but opens up conceptually many more use cases.
Additional context
Feature or Enhancement?
Description
If multiple values are removed from the stack and written to the cache, then read from the cache and placed onto the stack, the order will be reversed. This is somewhat inconvenient, and it is made more inconvenient by the fact that
OP_REVERSEdoes not take its argument from the stack.So I propose two related changes:
OP_WRITE_CACHEbefore writing to the cache. Leave theOP_READ_CACHE*operations alone.OP_REVERSEto take its argument from the stack instead of from the tape. This introduces 1 byte of additional overhead for the use cases currently available (which I am yet to encounter in practice thus far) but opens up conceptually many more use cases.Additional context