Skip to content

[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: STACKTYPE is converted to a Nop, which may include a WithLoc as well. It's bizarre and confuses the debugger.
    • Solution: Add STACKTYPE typed ExtInstr. Patch the type-checker to include such instruction.
    • Problem: FN is inlined in the code block and its WithLoc meta-instructions will point at the typed stack function definition, with no reference to its usage site.
    • Solution: Add typed Fn meta-instruction. Patch the type-checker to include such instruction and add a WithLoc when producing such instruction as well.

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

    • I checked whether I should update the docs and did so if necessary:
    • I updated changelog files of all affected packages released to Hackage if my changes are externally visible.

Stylistic guide (mandatory)

Edited by Heitor Toledo Lassarote de Paula

Merge request reports