Skip to content

Assembly: Strict mode #1820

@chriseth

Description

@chriseth

Assembly should be strict than currently defined. Issues should be warned about for now and turn into errors later. Only the following aspects of assembly should be allowed:

  • directly below a block, only the following is allowed:
    • function definition
    • variable declaration
    • functional assignment
    • function call with zero returns
    • functional instruction that has zero returns
    • block
    • for
    • switch
    • break
    • continue
    • subassembly
  • invalidJumpTag should be replaced by revert() / invalid()
  • jumps are disallowed
  • DUP and SWAP instructions are disallowed
  • labels are disallowed
  • statements (elements of a block) are disallowed if they return something onto the stack at the end.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions