Skip to content

[PR-210] Add named conditionals

Konstantin Ivanov requested to merge martoon/pr210-named-conditionals into master

Description

Problem: every time I use IsGt or a similar conditional, I'm scared of that stack operands may go in a wrong order. Also, it is a good practice for Lorentz to, when where are several values of the same type on stack, assign names for them, but our conditionals interfere with doing so because they require unnamed entities.

Solution: add conditionals which expect named entities and require explicit passing of compared entities names, e.g. #old <=. #new.

Related issue(s)

https://issues.serokell.io/issue/PR-210

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 the changelog if my changes are externally visible.

Stylistic guide (mandatory)

Edited by Konstantin Ivanov

Merge request reports