-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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
cmd/compile: don't compile some unexported, inlined functions #41117
Comments
At what line would it report a compile error if not compiled? |
We’d still have to typecheck it. |
I've been working on this to introduce myself to the compiler code base, and I think I understand most of the changes to make. I'd like to take it. Specifically, my plan so far:
I'll be working on this assuming that plan is fine, but I'll probably be slow about it. |
Change https://golang.org/cl/264277 mentions this issue: |
One particular case of this has been addressed by CL 282892: if a function-scoped function literal is no longer needed as a function literal (e.g., all of its uses have been inlined or removed by dead-code removal) then we don't separately compile it anymore. |
If a function is:
then we don't need to compile that function.
I suspect that these conditions are frequently met, cheap to check, and reasonably easy to implement.
I thought we had an issue for this, but I don't see one. I don't plan to work on this. I'm filing it in case someone else wants to. :)
The text was updated successfully, but these errors were encountered: