Skip to content

[#435] Handle lambda execution properly

Description

Problem: Lambdas do not create stack frames when being executed. Also, the stack that was present outside of the lambda should not be shown inside of it.

Solution: Check for EXEC when creating a stack frame. Change the code a bit so that instead of concatenating the "outer" stacks of all stack frames every time (that is, the "diff" of the frames), they are now saved already concatenated with the previous one. This allows us to push an empty stack in the case of EXEC. Also, added an example contract.

This merge request is based on !669 (merged) and !662 (merged).

Related issue(s)

Resolves #435 (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