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

make object_ids and hashes in precompiled modules more stable #17405

Merged
merged 1 commit into from
Jul 26, 2016

Conversation

JeffBezanson
Copy link
Member

This makes object_id and the default hash function reliable for types in precompiled modules.

I also discovered that module UUIDs were not very unique, since uv_now is not updated very often. Many submodules of Base actually had the same UUID.

@quinnj
Copy link
Member

quinnj commented Jul 13, 2016

Fixes #17043?

@JeffBezanson
Copy link
Member Author

Yes, it should.

@tkelman
Copy link
Contributor

tkelman commented Jul 14, 2016

ci failures are #16091 (av win32) and #17409 (travis osx)

@JeffBezanson
Copy link
Member Author

@vtjnash ok to merge?

if (jl_egal(dtv->name->primary, v))
return bitmix(bitmix(h, dtv->name->uid), 0xaa5566aa);
return bitmix(bitmix(h, dtv->name->uid), hash_svec(dtv->parameters));
return bitmix(~dtv->name->hash, hash_svec(dtv->parameters));
Copy link
Member

Choose a reason for hiding this comment

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

might it be worthwhile to have a special case for emptysvec (microoptimization) for jl_f_is & hash?

return dta->name == dtb->name &&
    ((dta->parameters == jl_emptysvec) == (dtb->parameters == jl_emptysvec)) &&
    compare_svec(dta->parameters, dtb->parameters);

@vtjnash
Copy link
Member

vtjnash commented Jul 25, 2016

yes, lgtm

@kshyatt kshyatt added the compiler:precompilation Precompilation of modules label Jul 25, 2016
@JeffBezanson JeffBezanson merged commit d7848f8 into master Jul 26, 2016
@tkelman tkelman deleted the jb/stableids branch July 26, 2016 18:33
@tkelman tkelman mentioned this pull request Aug 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler:precompilation Precompilation of modules
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants