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 some t-functions on PartialTuple arguments #31014

Merged
merged 1 commit into from
Feb 9, 2019

Conversation

JeffBezanson
Copy link
Sponsor Member

Fixes a performance regression (https://github.com/JuliaCI/BaseBenchmarkReports/blob/15bb00cd292352149ee0f216b76a12496dbfcedc/daily_2019_02_08/report.md) exposed by e456a72. Due to some t-funcs not handling PartialTuple.

@JeffBezanson JeffBezanson added the compiler:inference Type inference label Feb 8, 2019
@@ -301,6 +301,7 @@ function sizeof_nothrow(@nospecialize(x))
return true
end
isconstType(x) && (x = x.parameters[1])
x = widenconst(x)
Copy link
Sponsor Member

Choose a reason for hiding this comment

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

should this be in the else block (although widenconst is idempotent so it shouldn't matter)

@JeffBezanson JeffBezanson merged commit 0680f19 into master Feb 9, 2019
@JeffBezanson JeffBezanson deleted the jb/partialtupletfuncs branch February 9, 2019 19:40
@Keno
Copy link
Member

Keno commented Feb 9, 2019

Not part of your change, but does this look correct to you? I'm thinking that may have supposed to have been x.val in the second isa.

    if isa(x, Const)
        if !isa(x, Type)
            return true
        end

@JeffBezanson
Copy link
Sponsor Member Author

That definitely looks wrong.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler:inference Type inference
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants