-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
opaque_closure: Lookup optimized oc source inside code instance #53878
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given that our system can interpret optimized source, why isn't it allowed to put optimized code into method->source
?
It's not in general legal to re-run inference on it, but putting it in method->source might suggest it would be. Also, the validity is world age dependent, while method->source should not be. Of course opaque closure semantics make it more confusing, but I think this is better. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright, I understand. This approach is better than #53852 .
This is an alternative to #53852. I don't think it's semantically legal to put optimized source into the :source field of a method, but it should be fine to just look it up from the CodeInstance. That said, this is a bit of an unusual configuration. In particular it wasn't even reachable with the surface APIs, which assumed that inferred IR was always supposed to be compiled.
Reflection version of #53878.
Reflection version of #53878. --------- Co-authored-by: Shuhei Kadowaki <[email protected]> Co-authored-by: Shuhei Kadowaki <[email protected]>
This is an alternative to #53852. I don't think it's semantically legal to put optimized source into the :source field of a method, but it should be fine to just look it up from the CodeInstance. That said, this is a bit of an unusual configuration. In particular it wasn't even reachable with the surface APIs, which assumed that inferred IR was always supposed to be compiled.