[PATCHv2] Get rid of get_locus_slow

2021-08-26 Thread Mark Wielaard
In various places there was the following hack: /* HACK: slow way of getting location from base expression through virtual methods. */ virtual Location get_locus_slow () const { return Location (); } The problem with get_locus_slow () is that if a subclass didn't override it then there w

Re: [PATCH] Get rid of get_locus_slow

2021-08-26 Thread Mark Wielaard
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. I