dlang-community / dsymbol

Basic symbol lookup/resolution for libdparse (Deprecated, see link)
https://github.com/dlang-community/DCD/tree/master/dsymbol
Boost Software License 1.0
16 stars 19 forks source link

Make `ModuleCache` recursion guard using `char` ptr instead of `string` #132

Closed ghost closed 5 years ago

ghost commented 5 years ago

Since strings representing the module name are actually istring we can store the first character of the module being cached.

ghost commented 5 years ago

BTW I wonder if this recursion guard could be the cause of failing completion where mutually dependent modules are involved. See DCD issues. A better system would be to use a counter. IIRC DMD uses an arbitrary number, 5000, over that threshold semantic is cancelled.