Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Generate a compile error if opcodes that are known to be invalid are generated. #350

Closed
sezna opened this issue Nov 1, 2021 · 0 comments · Fixed by #366
Closed

Generate a compile error if opcodes that are known to be invalid are generated. #350

sezna opened this issue Nov 1, 2021 · 0 comments · Fixed by #366
Labels
compiler General compiler. Should eventually become more specific as the issue is triaged enhancement New feature or request team:compiler Compiler Team

Comments

@sezna
Copy link
Contributor

sezna commented Nov 1, 2021

  1. GM 0x01 will always panic from a script, so if it is called directly from a script, it should be a compile error.
  2. MINT and BURN shouldn't ever be used in an external context.
  3. GM 0x02 also shouldn't ever be used in an external context.
  4. Various things like S{R,W}W{,X} shouldn't ever be used in an external context either.

If there are any other opcodes that can be predicted to fail, we should err on those, as well.

@sezna sezna added enhancement New feature or request compiler General compiler. Should eventually become more specific as the issue is triaged labels Nov 1, 2021
@sezna sezna changed the title Generate a compile error if GM 0x01 is called from within a script. Generate a compile error if opcodes that are known to be invalid are generated. Nov 1, 2021
@sezna sezna closed this as completed in #366 Nov 4, 2021
@IGI-111 IGI-111 added the team:compiler Compiler Team label Feb 10, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
compiler General compiler. Should eventually become more specific as the issue is triaged enhancement New feature or request team:compiler Compiler Team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants