[cxx-abi-dev] Mangling "transaction-safe function"
Richard Smith
richardsmith at googlers.com
Wed Sep 30 00:34:44 UTC 2015
On 29 September 2015 at 11:09, Jason Merrill <jason at redhat.com> wrote:
> The Transactional Memory TS introduces "transaction-safe function" types,
> which are distinct from non-transaction-safe function types, though the
> former converts to the latter. So we need to represent this in mangling.
>
> I think no change to mangling of actual functions is necessary, since
> functions that differ only in their tx-qualifier cannot be overloaded.
I thought the intent was that we'd emit two function bodies for a
transaction-safe function definition (one for the case where we are inside
an atomic block, another for the case where we are not). Do we also need a
new function mangling for the former case?
> So we only need to worry about function types.
>
> One possibility for handling it would be to add a qualifier 'T' after the
> <ref-qualifier> at the end of <function-type>, but that complicates the
> ambiguity between these qualifiers and parameter types.
>
> I think my preference is to make it a normal type qualifier, perhaps using
> "Dx", so void (*)() transaction_safe becomes "PDxFvvE".
>
> We also need to add a __transaction_safe_mask to
> __pbase_type_info::__masks so that exception handlers can perform the
> transaction safety conversion.
>
Would you also use the same __function_type_info for the pointee type in
typeid(void (*)() transaction_safe) and typeid(void(*)())? That seems like
an odd fit for the language semantics ("transaction_safe" is part of the
function type, not a layer on top of it like cv-qualifiers are), but
necessary if we want the exception handler to be able to efficiently check
for a match.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sourcerytools.com/pipermail/cxx-abi-dev/attachments/20150929/0944eb23/attachment.html>
More information about the cxx-abi-dev
mailing list