[aarch64-port-dev ] RFR(s): 8251930: AArch64: Native types mismatch in hotspot

Andrew Haley aph at redhat.com
Wed Aug 19 17:03:24 UTC 2020


On 19/08/2020 14:10, Anton Kozlov wrote:
> With C++14, it is possible to avoid casts with use something like enable_if[1],
> so the code in macroassembler would look like 
> 
>     template<class T, typename std::enable_if_t<std::is_integral<T>::value>* = nullptr>
>     void mov(Register r, T imm) { ... }
> 
>     template<class T, typename std::enable_if_t<std::is_class<T>::value>* = nullptr>
>     void mov(Register r, T addr) { ... }
> 
> Compared to the current patch, I don't think such template would be less
> error-prone or more maintainable. I would stick to the current version.

OK. I rather like the template version: it's clear to me what the
intention is. But I agree it's marginal.

-- 
Andrew Haley  (he/him)
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
https://keybase.io/andrewhaley
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671



More information about the aarch64-port-dev mailing list