-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Possible inference improvement in iterated assignment where the RHS uses splatting #41022
Comments
martinholters
added a commit
that referenced
this issue
Aug 9, 2021
The first loop is left before `valtype` and `statetype` are updated from the current `stateordonet`, so the second loop should first process it before obtaining a new one instead of vice versa. Fixes #41022.
martinholters
added a commit
that referenced
this issue
Aug 9, 2021
If the first loop exits in the first iteration, the `statetype` is still `Bottom`. In that case, the new `stateordonet` needs to be determined with the two-arg version of `iterate` again. Fixes #41022.
martinholters
added a commit
that referenced
this issue
Aug 18, 2021
If the first loop exits in the first iteration, the `statetype` is still `Bottom`. In that case, the new `stateordonet` needs to be determined with the two-arg version of `iterate` again. Fixes #41022.
martinholters
added a commit
that referenced
this issue
Aug 19, 2021
If the first loop exits in the first iteration, the `statetype` is still `Bottom`. In that case, the new `stateordonet` needs to be determined with the two-arg version of `iterate` again. Fixes #41022.
martinholters
added a commit
that referenced
this issue
Aug 24, 2021
If the first loop exits in the first iteration, the `statetype` is still `Bottom`. In that case, the new `stateordonet` needs to be determined with the two-arg version of `iterate` again. Fixes #41022.
vtjnash
added a commit
that referenced
this issue
Aug 30, 2021
If the first loop exits in the first iteration, the `statetype` is still `Bottom`. In that case, the new `stateordonet` needs to be determined with the two-arg version of `iterate` again. Explicitly test that inference produces a sound (and reasonably precise) result when splatting an iterator (in this case a long range) that allows constant-propagation up to the `MAX_TUPLE_SPLAT` limit. Fixes #41022 Co-authored-by: Jameson Nash <[email protected]>
KristofferC
pushed a commit
that referenced
this issue
Aug 31, 2021
If the first loop exits in the first iteration, the `statetype` is still `Bottom`. In that case, the new `stateordonet` needs to be determined with the two-arg version of `iterate` again. Explicitly test that inference produces a sound (and reasonably precise) result when splatting an iterator (in this case a long range) that allows constant-propagation up to the `MAX_TUPLE_SPLAT` limit. Fixes #41022 Co-authored-by: Jameson Nash <[email protected]> (cherry picked from commit 92337b5)
KristofferC
pushed a commit
that referenced
this issue
Sep 3, 2021
If the first loop exits in the first iteration, the `statetype` is still `Bottom`. In that case, the new `stateordonet` needs to be determined with the two-arg version of `iterate` again. Explicitly test that inference produces a sound (and reasonably precise) result when splatting an iterator (in this case a long range) that allows constant-propagation up to the `MAX_TUPLE_SPLAT` limit. Fixes #41022 Co-authored-by: Jameson Nash <[email protected]> (cherry picked from commit 92337b5)
KristofferC
pushed a commit
that referenced
this issue
Sep 3, 2021
If the first loop exits in the first iteration, the `statetype` is still `Bottom`. In that case, the new `stateordonet` needs to be determined with the two-arg version of `iterate` again. Explicitly test that inference produces a sound (and reasonably precise) result when splatting an iterator (in this case a long range) that allows constant-propagation up to the `MAX_TUPLE_SPLAT` limit. Fixes #41022 Co-authored-by: Jameson Nash <[email protected]> (cherry picked from commit 92337b5)
LilithHafner
pushed a commit
to LilithHafner/julia
that referenced
this issue
Feb 22, 2022
If the first loop exits in the first iteration, the `statetype` is still `Bottom`. In that case, the new `stateordonet` needs to be determined with the two-arg version of `iterate` again. Explicitly test that inference produces a sound (and reasonably precise) result when splatting an iterator (in this case a long range) that allows constant-propagation up to the `MAX_TUPLE_SPLAT` limit. Fixes JuliaLang#41022 Co-authored-by: Jameson Nash <[email protected]>
LilithHafner
pushed a commit
to LilithHafner/julia
that referenced
this issue
Mar 8, 2022
If the first loop exits in the first iteration, the `statetype` is still `Bottom`. In that case, the new `stateordonet` needs to be determined with the two-arg version of `iterate` again. Explicitly test that inference produces a sound (and reasonably precise) result when splatting an iterator (in this case a long range) that allows constant-propagation up to the `MAX_TUPLE_SPLAT` limit. Fixes JuliaLang#41022 Co-authored-by: Jameson Nash <[email protected]>
staticfloat
pushed a commit
that referenced
this issue
Dec 23, 2022
If the first loop exits in the first iteration, the `statetype` is still `Bottom`. In that case, the new `stateordonet` needs to be determined with the two-arg version of `iterate` again. Explicitly test that inference produces a sound (and reasonably precise) result when splatting an iterator (in this case a long range) that allows constant-propagation up to the `MAX_TUPLE_SPLAT` limit. Fixes #41022 Co-authored-by: Jameson Nash <[email protected]> (cherry picked from commit 92337b5)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The RHS is inferred as a
Tuple
, although it's really aTuple{Vararg{Union{Int, Nothing}}}
In this case the variables may at least be inferred as
Union{Int, Nothing}
. Ideallya
andb
may be inferred asInt
s as the function will error if there are less than three elements on the right hand side.Edit: A simpler example:
In this case the variables must all be
Int
sThe text was updated successfully, but these errors were encountered: