digitalmars.D.learn - DMD semantic passes overview?
- Nick Sabalausky (10/10) Dec 02 2011 I don't suppose there's any information out there on how DMD's sematic
- Jacob Carlborg (5/15) Dec 04 2011 You can always run DMD with the verbose option which will give you some
I don't suppose there's any information out there on how DMD's sematic passes work? (esp, regarding types, forward reference resolution and DSymbol::scope as used by AggregateDeclaration, but I suppose getting that specific might be asking too much). I've been digging through the code, and so far what I've been able to grok is that there's theree passes (semantic, semantic2 and semantic3), each node in the AST tries to run the (same) semantic pass for it's own members and for anything they reference, and during the first pass some stuff gets deferred to right after the first pass. I'll keep digging though, but any help would be, umm, helpful :)
Dec 02 2011
On 2011-12-02 19:01, Nick Sabalausky wrote:I don't suppose there's any information out there on how DMD's sematic passes work? (esp, regarding types, forward reference resolution and DSymbol::scope as used by AggregateDeclaration, but I suppose getting that specific might be asking too much). I've been digging through the code, and so far what I've been able to grok is that there's theree passes (semantic, semantic2 and semantic3), each node in the AST tries to run the (same) semantic pass for it's own members and for anything they reference, and during the first pass some stuff gets deferred to right after the first pass. I'll keep digging though, but any help would be, umm, helpful :)You can always run DMD with the verbose option which will give you some idea of what DMD does. But you might already figured out that. -- /Jacob Carlborg
Dec 04 2011