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

Round up and rebase approved compiler PRs #39036

Merged
merged 2 commits into from
Dec 30, 2020
Merged

Round up and rebase approved compiler PRs #39036

merged 2 commits into from
Dec 30, 2020

Conversation

Keno
Copy link
Member

@Keno Keno commented Dec 30, 2020

Rebases/Closes #37418, #37423. I'd like CI to run on these again before merging them and they're a few months stale at this point.

This has been there since #27126 (9100329)

Dudging by the use of `reverse_mapping[stmt_val]` below
this should either be a branch condition or an assert.
* Use the field index passed in in `lift_leaves`

    The caller has already done all the computation including bound checking.
    The `field` computed in this function is also affecting all the following iterations
    which is almost certainly wrong.

* Remove unnecessary type check on `field` in `lift_leaves` since it is always `Int`

* Move a branch disabling `return nothing` higher up

* Remove some duplicated calculation on field index in `getfield_elim_pass!`

* Fix `try_compute_fieldidx` to return `nothing` for non-`Int` `Integer` field index.

    This can cause `getfield_nothrow` to return incorrect result.
    It also gives the caller worse type info about the return value.

* Teach `getfield_nothrow` that `isbits` field cannot be undefined and getfield on such field cannot throw.

    This is already handled in `isdefined_tfunc`.

* Fix a few wrong use of `isbits` in dead branches

----

Ref #26948 (fa02d34)
Ref #27126 (9100329)
Copy link
Sponsor Member

@vtjnash vtjnash left a comment

Choose a reason for hiding this comment

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

RSLGTM

@Keno Keno merged commit aeb933c into master Dec 30, 2020
@Keno Keno deleted the kf/compilerroundup branch December 30, 2020 04:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants