Variables to registers map does not handle shadowing #420

Closed
opened 2022-10-25 19:34:12 +09:00 by ghallak · 1 comment
ghallak commented 2022-10-25 19:34:12 +09:00 (Migrated from gitlab.com)

When running the compiler with the debug_info flag, the expected variables_registers omits shadowed variables, and their registers will be unknown in the output as a result.

Code example:

contract C =
  entrypoint f(x) =
    let x = x + x
    x + x

The variables_registers map in the output from the compilation of the above example:

variables_registers => #{{"C","f","x"} => {var,0}}

In the above map, the register associated with the argument x (which should be {arg, 0}) does not show in the map because the arg x is shadowed by the variable x.

When running the compiler with the `debug_info` flag, the expected `variables_registers` omits shadowed variables, and their registers will be unknown in the output as a result. Code example: ``` contract C = entrypoint f(x) = let x = x + x x + x ``` The `variables_registers` map in the output from the compilation of the above example: ``` variables_registers => #{{"C","f","x"} => {var,0}} ``` In the above map, the register associated with the argument `x` (which should be `{arg, 0}`) does not show in the map because the arg `x` is shadowed by the variable `x`.
ghallak commented 2023-08-05 19:49:26 +09:00 (Migrated from gitlab.com)

This issue is not relevant anymore, as the variables_registers is not a part of the compiler output since release v7.2.0.

This issue is not relevant anymore, as the `variables_registers` is not a part of the compiler output since release `v7.2.0`.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: QPQ-AG/sophia#420