Background
KCVM is a low-level language, its instructions are usually generated by a compiler.
Problem
When debugging KCVM it's unclear why the high-level KCL generated a particular KCVM instruction.
Solution
Each Instruction should (optionally) support a comment string. That way compilers could explain "why" a particular instruction was included in the final instruction set.
Two suggested implementation approaches:
- Adding a
comment: Option<String> field to the Instruction type
- Adding a map from instruction IDs to comment strings.
The KCVM debugger should show these comments.
Grackle should then add comments to the KCVM instructions it emits.
Background
KCVM is a low-level language, its instructions are usually generated by a compiler.
Problem
When debugging KCVM it's unclear why the high-level KCL generated a particular KCVM instruction.
Solution
Each
Instructionshould (optionally) support a comment string. That way compilers could explain "why" a particular instruction was included in the final instruction set.Two suggested implementation approaches:
comment: Option<String>field to theInstructiontypeThe KCVM debugger should show these comments.
Grackle should then add comments to the KCVM instructions it emits.