Skip to content

Optimize handling of catch blocks #856

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

Optimize handling of catch blocks #856

DarkDimius opened this issue Oct 23, 2015 · 0 comments

Comments

@DarkDimius
Copy link
Contributor

Current code emitted by pattern-matcher is inefficient.
What it currently does is:

try {<code>} 
catch { <cases>}

is compiled as if it this was written:

try {<code>} catch {
  case e => e 
    match {<cases>; case _ => throw e}
  }
@sjrd sjrd self-assigned this Nov 18, 2015
@DarkDimius DarkDimius assigned nicolasstucki and unassigned sjrd Jun 9, 2016
nicolasstucki added a commit to nicolasstucki/dotty that referenced this issue Jun 10, 2016
Previously they were all lifted into a match with the came cases.
Now the first cases are handled directly by by the catch. If one
of the cases can not be handled the old scheme is applied to to it
and all subsequent cases.
nicolasstucki added a commit to nicolasstucki/dotty that referenced this issue Jun 10, 2016
Previously they were all lifted into a match with the came cases.
Now the first cases are handled directly by by the catch. If one
of the cases can not be handled the old scheme is applied to to it
and all subsequent cases.
nicolasstucki added a commit to nicolasstucki/dotty that referenced this issue Jun 10, 2016
Previously they were all lifted into a match with the came cases.
Now the first cases are handled directly by by the catch. If one
of the cases can not be handled the old scheme is applied to to it
and all subsequent cases.
nicolasstucki added a commit to nicolasstucki/dotty that referenced this issue Jun 22, 2016
Previously they were all lifted into a match with the came cases.
Now the first cases are handled directly by by the catch. If one
of the cases can not be handled the old scheme is applied to to it
and all subsequent cases.
nicolasstucki added a commit to nicolasstucki/dotty that referenced this issue Jun 24, 2016
Previously they were all lifted into a match with the came cases.
Now the first cases are handled directly by by the catch. If one
of the cases can not be handled the old scheme is applied to to it
and all subsequent cases.
nicolasstucki added a commit to nicolasstucki/dotty that referenced this issue Jun 24, 2016
Previously they were all lifted into a match with the came cases.
Now the first cases are handled directly by by the catch. If one
of the cases can not be handled the old scheme is applied to to it
and all subsequent cases.
nicolasstucki added a commit to dotty-staging/dotty that referenced this issue Jun 28, 2016
Previously they were all lifted into a match with the came cases.
Now the first cases are handled directly by by the catch. If one
of the cases can not be handled the old scheme is applied to to it
and all subsequent cases.
DarkDimius added a commit that referenced this issue Jun 30, 2016
Fix #856: Handle try/catch cases as catch cases if possible.
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

3 participants