Skip to content

Add ability to do branching via gotos, labels and conditionals #9

Description

@Philogy

Currently BALLS only supports continuous code to avoid having to write as much Huff it'd be useful to support some basic constructs that make branching possible:

  • labels: labels allow marking a certain part of the code as a possible control flow arrival point, separating logic into before/after (EVM: JUMPDEST)
  • gotos: jumps to a label unconditionally (EVM: JUMP)
  • conditional gotos: just a conditional goto, accepts a value and jumps if the value is non-zero (EVM: JUMPI)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew functionality that didn't exist

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions