Skip to content

Implement @switch #854

New issue

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

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

Already on GitHub? Sign in to your account

Closed
DarkDimius opened this issue Oct 23, 2015 · 0 comments
Closed

Implement @switch #854

DarkDimius opened this issue Oct 23, 2015 · 0 comments

Comments

@DarkDimius
Copy link
Contributor

Current implementation of pattern matcher does not optimize switch blocks on primitive constants.

@sjrd sjrd self-assigned this Nov 18, 2015
sjrd added a commit to sjrd/dotty that referenced this issue Feb 5, 2016
This does not yet unable the checks that `@switch` verifies that
the compiler was indeed able to perform the optimization.

This implementation also does not support guards. A match with
guards will never be optimized as a switch.
sjrd added a commit to sjrd/dotty that referenced this issue Feb 5, 2016
This does not yet unable the checks that `@switch` verifies that
the compiler was indeed able to perform the optimization.

This implementation also does not support guards. A match with
guards will never be optimized as a switch.
sjrd added a commit to sjrd/dotty that referenced this issue Feb 5, 2016
This does not yet unable the checks that `@switch` verifies that
the compiler was indeed able to perform the optimization.

This implementation also does not support guards. A match with
guards will never be optimized as a switch.
sjrd added a commit to sjrd/dotty that referenced this issue Feb 8, 2016
This does not yet unable the checks that `@switch` verifies that
the compiler was indeed able to perform the optimization.

This implementation also does not support guards. A match with
guards will never be optimized as a switch.
DarkDimius added a commit that referenced this issue Mar 31, 2016
Fix #854: Optimize matches on primitive constants as switches.
DarkDimius pushed a commit to dotty-linker/dotty that referenced this issue Jun 27, 2016
This does not yet unable the checks that `@switch` verifies that
the compiler was indeed able to perform the optimization.

This implementation also does not support guards. A match with
guards will never be optimized as a switch.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants