Vanillnya / ohdl

Oxidized Hardware Description Language
3 stars 1 forks source link

Should we use name resolution just for imports? #2

Closed DasLixou closed 2 months ago

DasLixou commented 2 months ago

The current resolving / NameResolution stage works not just over imports/use-ings, but over all paths and types, which should later also include functions and type annotations inside arch blocks.

While I'm not entirely sure if I like the idea of splitting the code of path resolution into two different areas, it might be interesting to let the current resolving stage approach just handle imports, because they can be recursive and/or cyclic. Then later, when working on refining the architectures, instead of retrieving the import result via it's ImportId, the path would just be looked up (maybe with a fast thread-safe cache when doing parallelization? :3).