Skip to content

Remove error rules for reading and writing locals#550

Merged
dkcumming merged 4 commits into
masterfrom
remove-error-rules
May 1, 2025
Merged

Remove error rules for reading and writing locals#550
dkcumming merged 4 commits into
masterfrom
remove-error-rules

Conversation

@jberthold

@jberthold jberthold commented May 1, 2025

Copy link
Copy Markdown
Collaborator

Remove error rules for reading and writing locals (type mismatch, moved and uninitialised values) which should not occur in valid MIR. These cases will now get stuck instead of producing an explained error.
We still match on the preconditions for valid list indexing and could remove that, too, but we still have to index into the locals so there is no big gain not doing that.

Remove errors related to type mismatch and operand mismatch in binary and unary operation rules. Likewise, these are invalid MIR code and the operation will get stuck now. Also removed: the case of unimplemented operations.
NB dynamic errors (overflow and division by zero) are still signalled as specific errors.

@dkcumming dkcumming left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great

@jberthold jberthold marked this pull request as ready for review May 1, 2025 02:01
@dkcumming dkcumming merged commit c81b40e into master May 1, 2025
6 checks passed
@dkcumming dkcumming deleted the remove-error-rules branch May 1, 2025 02:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants