Store modification times in Declaration Data class?

David Nolden zwabel at googlemail.com
Mon Jul 4 20:59:16 UTC 2011


2011/7/4 Sven Brauch <svenbrauch at googlemail.com>:
> Hi David,
>
> thanks for your response.
> I imagined this to work like this: As soon as a file is parsed, it
> throws all its type hints at all relevant declarations. Those stay
> valid until the file is re-parsed; if it's re-parsed, it just creates
> *new* type hints, which then are valid instead of the old ones. The
> old ones will then be invalidated by comparing their creation time
> with the current modification revision of the file, and noticing that
> they're old. However, I don't know how much performance that would
> eat.
>
> Still, your approach is probably more elegant. I'm just not entirely
> sure if a type-hint can be bound to a specific use in all cases; it
> *might* be a more complex expression. However, for the basic
> function-argument hints I want to implement now I think that should
> work.
> I didn't exactly understand how your example works, tough... I do not
> want to delete declarations if uses go away, I want to store a list of
> types for a declaration which are deleted if their "uses" go away. How
> is that to be realized with your example?

There would need to be a version of UnsureType, where each sub-type
attached to the UnsureType is conditioned by a specific use.

Greetings, David




More information about the KDevelop-devel mailing list