Skip to content

Conversation

@topolarity
Copy link
Member

This can be useful for when an OpaqueClosure is desired, e.g., as an invalidation barrier or when you know it passes through an inference barrier naturally (in my case, a mutable type).

This is intentionally left undocumented for now.

@topolarity topolarity requested a review from Keno July 8, 2024 13:56
@Keno
Copy link
Member

Keno commented Jul 8, 2024

I think at that point you might be beyond @opaque and should just generate the Expr(:opaque_closure) directly.

@topolarity
Copy link
Member Author

I think at that point you might be beyond @opaque and should just generate the Expr(:opaque_closure) directly.

Do you mean generating the IR for the closure by hand?

@Keno
Copy link
Member

Keno commented Jul 9, 2024

Do you mean generating the IR for the closure by hand?

@eval $(Expr(:opaque_closure))

@topolarity
Copy link
Member Author

Oh, you mean keeping the lowering changes but not changing the macro - yeah, that's fine by me

@Keno
Copy link
Member

Keno commented Jul 9, 2024

Yes

@topolarity topolarity force-pushed the ct/opaque-closure-nopartial branch 2 times, most recently from 0773dab to ad99efe Compare July 9, 2024 12:51
@topolarity topolarity changed the title Allow opting out of PartialOpaque support via @opaque Allow opting out of PartialOpaque support via Expr(:opaque_closure, ...) Jul 9, 2024
@topolarity
Copy link
Member Author

@Keno OK to merge?

@topolarity topolarity merged commit 4f1af7f into JuliaLang:master Aug 29, 2024
KristofferC pushed a commit that referenced this pull request Sep 12, 2024
…, ...)` (#55068)

This can be useful for when an OpaqueClosure is desired, e.g., as an
invalidation barrier or when you know it passes through an inference
barrier naturally (in my case, a mutable type).

This is intentionally left undocumented for now.
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