pragma(explicit_gc)

Richard (Rikki) Andrew Cattermole richard at cattermole.co.nz
Thu May 2 01:52:14 UTC 2024


On 02/05/2024 1:45 PM, Timon Gehr wrote:
> Proposal: Add `pragma(explicit_gc)`. Functions marked with this pragma 
> will non-transitively error out on implicit GC allocations. This is a 
> useful tool to check expectations about escape analysis precision.

I have been proposing this for years under the name ``@localnogc``.

Although I would disallow new'ing an exception with it annotated.

At some point I want to do an attribute cleanup DIP.

Make all attributes positive, include negation form, introduce the 
throws set and of course ``@localnogc`` and ``@notls``.


More information about the dip.ideas mailing list