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

Improve handling of duplicate slotnames #486

Merged
merged 4 commits into from
Jun 2, 2021
Merged

Conversation

pfitzseb
Copy link
Member

@pfitzseb pfitzseb commented Jun 2, 2021

Turns out that we can sometimes end up with duplicate slotnames, which breaks the current logic in prepare_slotfunction.

E.g.

function debug(x)
    for iter in Iterators.CartesianIndices(x)
        i = iter[1]
        c = i
        a, b, c, d = tmp()
    end
    return x
end

results in

julia> c = @code_lowered debug((1,2,3));

julia> c.slotnames
10-element Vector{Symbol}:
 Symbol("#self#")
 :x
 Symbol("")
 Symbol("")
 :iter
 :d
 :b
 :a
 :c
 :i

which means that we never insert the proper assignment for i (because Symbol("") is in there twice).

@pfitzseb pfitzseb requested review from timholy and KristofferC June 2, 2021 10:23
@codecov
Copy link

codecov bot commented Jun 2, 2021

Codecov Report

Merging #486 (b71da5a) into master (8e7bac9) will decrease coverage by 0.04%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #486      +/-   ##
==========================================
- Coverage   86.94%   86.90%   -0.05%     
==========================================
  Files          12       12              
  Lines        2344     2336       -8     
==========================================
- Hits         2038     2030       -8     
  Misses        306      306              
Impacted Files Coverage Δ
src/breakpoints.jl 95.37% <100.00%> (-0.21%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8e7bac9...b71da5a. Read the comment docs.

Copy link
Member

@KristofferC KristofferC left a comment

Choose a reason for hiding this comment

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

Looks like CI want some special handling for Julia 1.0.

@pfitzseb pfitzseb merged commit 5f6fb30 into master Jun 2, 2021
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.

2 participants