Skip to content
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

fix #26743, spurious return path in try-finally in tail position #26753

Merged
merged 1 commit into from
Apr 10, 2018

Conversation

JeffBezanson
Copy link
Member

This works by using a special value (#f) for expressions that don't yield values (return, goto), and then avoiding performing assignments and returns of those pseudo-values.

Example:

f(x) = (y = return x)

Before:

julia> @code_lowered f(0)
CodeInfo(:(begin 
        nothing
        return x
        y = nothing
        return
    end))

After:

julia> @code_lowered f(0)
CodeInfo(:(begin
      nothing
      Core.NewvarNode(:(y))
      return x
  end))

@JeffBezanson JeffBezanson added the compiler:lowering Syntax lowering (compiler front end, 2nd stage) label Apr 9, 2018
@JeffBezanson JeffBezanson merged commit bc219ed into master Apr 10, 2018
@JeffBezanson JeffBezanson deleted the jb/fix26743 branch April 10, 2018 19:41
mbauman added a commit that referenced this pull request Apr 12, 2018
* origin/master:
  A few more #26670 fixes (#26773)
  Revert "deprecate using the value of `.=`. fixes #25954" (#26754)
  change dim arguments for `diff` and `unique` to keyword args (#26776)
  reorder pmap arguments to allow do-block syntax (#26783)
  correct deprecated parametric method syntax (#26789)
  [NewOptimizer] handle new IR nodes correctly in binary format
  [NewOptimizer] support line number emission from new IR format
  fix #26453, require obviously-concrete lower bound for a var to be diagonal (#26567)
  fix #26743, spurious `return` path in try-finally in tail position (#26753)
  Also lift SelectInst addrspaces
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler:lowering Syntax lowering (compiler front end, 2nd stage)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant