Better documentation / restrictions on enum values for Declaration IDs

Milian Wolff mail at
Mon Jun 14 13:36:33 UTC 2010

On Monday, 14. June 2010 15:20:21 David Nolden wrote:
> Yes I guess we should document it. However clashing IDs should lead to
> an assertion very early, in the exact moment that the declaration is
> registered to the DUChain (which usually is done during static
> initialization), so at least the problem is not hard to debug.
> The problem is that, for efficiency reasons, the values shouldn't
> become too high, as currently KDevelop uses a simple array to map
> declaration-ids to their factories, and using something slower like a
> hash-map in that very frequently accessed place would suck.
> So maybe we should just enumerate all the languages that come into our
> mind, and give each language a range of 10 IDs. Should it ever be
> required, we can then assign additional ranges, but we should manage
> them centrally to prevent clashes.

I'll document the languages we have right now and assign them ranges of 10.

I hope we don't get much more in PHP since we already have 8 I think ;-)

BTW: Anything stored in the DUChain has such a Identity, right? Also contexts 
etc. pp., or?

Milian Wolff
mail at
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <>

More information about the KDevelop-devel mailing list