On Thu, Aug 26, 2021 at 10:31:06AM +0800, The Other wrote:

> The original point of the distinction between get_locus_slow() and
> get_locus() was to avoid the overhead of virtual function calls
> whenever possible, but still have a way to access locations from
> abstract base classes like Expr.

If only we had Traits :)

> As such, I’d at least make the overridden calls ‘final override’ in
> the hope that the compiler can optimise out the virtual call.

Yes, makes sense. I'll sent an updated patch.

Thanks,

Mark

-- 
Gcc-rust mailing list
Gcc-rust@gcc.gnu.org
https://gcc.gnu.org/mailman/listinfo/gcc-rust

Reply via email to