[morley-debugger#10] Fix debugger cursor jumping on extra instructions
Description
Currently, when type-checking the STACKTYPE and FN extra instructions, two problems occur (with their solutions):
-
- Problem:
STACKTYPEis converted to aNop, which may include aWithLocas well. It's bizarre and confuses the debugger. - Solution: Add
STACKTYPEtypedExtInstr. Patch the type-checker to include such instruction.
- Problem:
-
- Problem:
FNis inlined in thecodeblock and itsWithLocmeta-instructions will point at the typed stack function definition, with no reference to its usage site. - Solution: Add typed
Fnmeta-instruction. Patch the type-checker to include such instruction and add aWithLocwhen producing such instruction as well.
- Problem:
See also: morley-debugger!14 (merged)
Related issue(s)
Pre-requisite to solve morley-debugger#10 (closed)
✅ Checklist for your Merge Request
Related changes (conditional)
-
Tests (see short guidelines)
-
If I added new functionality, I added tests covering it. -
If I fixed a bug, I added a regression test to prevent the bug from silently reappearing again.
-
-
Documentation
Stylistic guide (mandatory)
-
My commits comply with the following policy. -
My code complies with the style guide.
Edited by Heitor Toledo Lassarote de Paula