GraphDependencies and completion
Andreas Lundblad
andreas.lundblad at oracle.com
Sat Oct 17 08:41:33 UTC 2015
On Fri, Oct 16, 2015 at 03:33:58PM -0700, Vicente-Arturo Romero-Zaldivar wrote:
> On 10/16/2015 02:17 PM, Maurizio Cimadamore wrote:
> >Would a delegation model work for problem 2? I.e. the dependencies
> >completer could be a 'spy' completer that did its own bit of logic
> >and then delegated to the completer originally installed (which
> >could be a real completer or the null completer).
>
> I also thought about this, but IMO the model could be more general.
> I mean it doesn't seem to be necessary to stablish an order between
> the dependencies completer and the "original" completer. It seems to
> me like they can be executed in any order thus effectively working
> as "event listeners". This could imply having a list, or set if you
> want to enforce uniqueness, of completers instead of only one
> completer.
If I understand you correctly, you're suggesting something like
symbol.completer = dependencies.wrapCompleter(someCompleter);
Jan suggested this as well. The drawback is that there are ~20 writes to the symbol.completer field, two of which are inside Symbol that doesn't have a reference to the context.
-- Andreas
More information about the compiler-dev
mailing list