[SAOC 2025] Separate Semantic Routines from AST Nodes Weekly Update #4

Mohamed El Shorbagy mohrizq895 at gmail.com
Mon Oct 13 16:56:55 UTC 2025


# Summary of Progress (October 06 - October 13)

## What I Worked On

- Deferred most of the `TupleExp` constructor (that takes a 
`TupleDeclaration` as a parameter) to the semantic phase where it 
is needed to eliminate the call of the `expressionsem.getDsymbol` 
and hence break the semantic dependency of `expression.d` on 
`expressionsem.d` (See [Merged 
PR](https://github.com/dlang/dmd/pull/21951/)).

- Moved `TemplateParameter.declareParameter` to `templatesem.d` 
to break the semantic dependency of `dtemplate.d` on `typesem.d` 
(See [Merged PR](https://github.com/dlang/dmd/pull/21950/)).

- Found the issue with casting a `void *` to an associative 
array, which marked the end of refactoring `dtemplate.d` for 
direct semantic dependency on `templatesem.d` (See [Merged 
PR](https://github.com/dlang/dmd/pull/21949)).

- Found that there is an indirect dependency of AST files on 
semantic functions through `dscope.d` although `Scope` is only 
used during the semantic phase. Therefore, we had to move the 
functions related to the semantic phase from `dscope.d` -- 
`Scope.createGlobal`, `Scope.alignment`, `Scope.search_correct`, 
and `Scope.search` (See [Merged PR 
1](https://github.com/dlang/dmd/pull/21956), [Merged PR 
2](https://github.com/dlang/dmd/pull/21957), [Merged PR 
3](https://github.com/dlang/dmd/pull/21959), and [Merged PR 
4](https://github.com/dlang/dmd/pull/21962)).


More information about the Digitalmars-d mailing list