Skip to content

Feature/Enhancement Request: make read_cache place items onto stack without reversing order from read_cache; give reverse dynamic argument #37

Description

@k98kurz

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:

  1. Reverse the order taken from the stack by OP_WRITE_CACHE before writing to the cache. Leave the OP_READ_CACHE* operations alone.
  2. 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

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions