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 Symbol redefinition warnings #16173

Merged
merged 4 commits into from
May 4, 2016
Merged

Fix Symbol redefinition warnings #16173

merged 4 commits into from
May 4, 2016

Conversation

tkelman
Copy link
Contributor

@tkelman tkelman commented May 3, 2016

And fix a review issue from #16154.

If there's a cleaner place to put these methods to avoid redefinition warnings, suggestions are welcome. Symbol is a builtin type and base/expr.jl gets included both in coreimg.jl and sysimg.jl, but looks like the vararg Symbol constructor is not needed in Inference (and string isn't defined yet there anyway).

there are dot operators that are more than 2 characters long that these
loops may want to extend to in the future, leaving the 2:end the way it
was will be less error prone
expr.jl is included in both Inference and Base, so split these methods
into coreimg.jl and sysimg.jl
Symbol(s::UTF8String) = Symbol(s.data)
Symbol(a::Array{UInt8,1}) =
ccall(:jl_symbol_n, Ref{Symbol}, (Ptr{UInt8}, Int32), a, length(a))

Copy link
Contributor

Choose a reason for hiding this comment

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

I think most of the builtin type constructors are defined in boot.jl. Putting it here should be good also as long as nothing before this depends on it.

and an unnecessary identity method
@tkelman tkelman merged commit 81bc6e7 into master May 4, 2016
@tkelman tkelman deleted the tk/cleanup branch May 4, 2016 01:48
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.

None yet

3 participants