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

Slight improvement to type-stability of StackTraces.lookup #41847

Merged
merged 1 commit into from
Aug 9, 2021

Conversation

thchr
Copy link
Contributor

@thchr thchr commented Aug 9, 2021

I was playing around with SnoopCompile and came across the StackTraces.lookup function (that I don't really know what is doing - but it featured non-negligibly in PyCall precompile time).
I noticed that there was a slight type-instability in the line variable since the if-else statement in one cases branches to line = meth.line where meth::Method and fieldtype(Method, :line) == Int32 and in the other case branches to 0::Int. This fixes that.

Copy link
Member

@Sacha0 Sacha0 left a comment

Choose a reason for hiding this comment

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

Thanks Thomas! :)

@KristofferC KristofferC merged commit a1e9fd3 into JuliaLang:master Aug 9, 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.

4 participants