Documentation Request: Core VM Operation Instructions in fift #1333
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of the Issue:
Several core virtual machine operation instructions in the fift language, including (vmopdump), vmcont, vmcont@, and (vmoplen), are present in the core Fift library and its C++ implementation but are undocumented in the official Fift whitepaper or other official documentation. This lack of documentation can lead to confusion and hinder the ability of developers and users to understand and effectively use the fift language and its VM operations.
For example
(vmopdump)
Relevant Links:
ton/crypto/fift/lib/Disasm.fif
Line 137 in eed3153
ton/crypto/fift/words.cpp
Line 3414 in eed3153
ton/crypto/fift/words.cpp
Line 2710 in eed3153
Suggested Action:
It would be beneficial to include documentation for the
(vmopdump)
instruction in the official fift documentation to ensure clarity and ease of use for the community. The documentation should explain the purpose, usage, and any relevant details about the instruction.Additional Information:
(vmopdump)
is used for dumping VM operations and core with Disasm.fif, but without documentation, it's difficult to understand its full functionality and usage context.Steps to Reproduce:
Expected Behavior:
(vmopdump)
instruction should be documented in the official fift documentation.Actual Behavior:
(vmopdump)
instruction is undocumented.Environment:
Additional Comments:
Modification Suggestions:
1.Add a New Section in the Fift Whitepaper:
Create a new text in the Fift whitepaper dedicated to the (vmopdump) instruction. This text should provide an overview of the instruction, its syntax, parameters, and output.
2.Include Detailed Usage Examples:
Provide one or more detailed usage examples that demonstrate how to use the (vmopdump) instruction effectively. These examples should cover typical use cases and edge cases.
Syntax:
(vmopdump) ( s cp -- s' dump )
s: The cell slice (vm::CellSlice) containing the VM instruction to be dumped.
cp: The code page identifier, an integer within the range of -0x80000000 to 0x7fffffff.
s': The remaining cell slice after the dumped instruction has been processed.
dump: A string representation of the dumped VM instruction.