Skip to content

verify the structure of basic blocks #20

@mnikander

Description

@mnikander
  • created a separate preprocessing pass as part of the static analysis
  • enforce static single assignment (each variable only defined once in the source code)
  • enforce labels at the start of every block
  • enforce phi nodes at the start of the block, no other instructions before the phi nodes
  • enforce terminator instructions only at the end of a block
  • enforce that all variables which are used somewhere, are actually defined somewhere
  • design decisions documented for each of these properties
  • revise the design decision about not validating the structure of the input code (there are a lot of properties which must be upheld, so it's worth checking them to avoid weird bugs)
  • document the decision to use typed javascript arrays for the input: this allows the type-checker to check them, so a separate pass to check the validity of the instructions is not required

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions