Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

declaration capture phase in compilation

languages like C and C++ rely on forward declarations to resolve cyclic dependencies in type or function declarations. In C#, this is not required anymore because the declaration capture phase is split in two phases; one capturing symbol names and a second one actually doing the symbol declaration construction.

Is there a standard name for the symbol name capture phase? i would assume that declaration capture would be left for the traditional phase that involves resolving all symbols in the declaration

like image 579
lurscher Avatar asked Aug 07 '26 17:08

lurscher


1 Answers

The C# compiler actually has a declaration phase where it builds the symbol table. The Roslyn C# compiler is not so clear, because not everything is done in large sweeping phases. Instead, each symbol is constructed individually, on demand. However, there is still a step where type and member declarations in syntax are converted into symbols. The binding phase comes after this logically, where references to type and member names are resolved using the declared symbol table.

like image 86
Matt Warren Avatar answered Aug 09 '26 07:08

Matt Warren



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!