[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [CEDET-devel] CEDET completion-at-point-function

From: Stefan Monnier
Subject: Re: [CEDET-devel] CEDET completion-at-point-function
Date: Wed, 18 Jun 2014 21:47:08 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux)

> to better comment.  There is an expense expanding from some symbol p (which
> could be port) past the ->, and to the next symbol.  If there happen to be
> 10 possible "p" expansions that are all also some sort of struct, then p->f,
> the f could be a rather large  number of possible things, and thus be
> expensive if not handled carefully.


> For example if the code had 4 variables "port1" "port2", etc that were
> all the same type.  When expanding the ->f, that should happen once
> instead of 4 times because we know all the types are the same.

A bit of caching should go a long way, but in any case, as you mention:
we'll cross that bridge when we get there.

> reference.  "d" is generally derived the same as f and a, but we apply one
> last filter of the return type, so if you had:
> q = p->f->a->d;
> Then d's type should be similar to q.

That's odd.  Does that mean that the user might have been unable to use
completion on the "p->f->a" part (before typing "->d") because the "a"
field was not of a similar type as q?
Or do you first use this "type similar to context" filter an if the
filter doesn't let anything through, then you drop the filter (kind of
like we filter out files that match completion-ignored-extensions,
except when that results in "no match")?

> I hope that helps, though I'm pretty sure it won't impact your current
> experiment much since these are all thoughts of optional optimizations.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]