Skip to content

Create Expr(:thisfunction) as pre-lowering form of var"#self#" #58940

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

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

MilesCranmer
Copy link
Member

This is v2 of #58913 which introduces a directive Expr(:thisfunction) that gets expanded to var"#self#". Expr(:thisfunction) was recommended by @JeffBezanson to complement Expr(:thismodule).

After this PR, the @__FUNCTION__ macro in #58909 could be updated to emit Expr(:thisfunction). Part of the motivation is to ease analysis in lowering tools like JuliaLowering.jl, especially because @__FUNCTION__ would be part of the public API.

@c42f @JeffBezanson let me know if this is close to what you had in mind. I'm not too familiar with this level of Julia so please let me know if I'm doing something wrong.

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