October 06

Summary of Progress (September 29 - October 06)

This week, I further eliminated some semantic function calls inside AST node files, and I am still working on some of the previous issues I encountered during this process.

What I Worked On

  1. Moved ClassReferenceExp.getFieldIndex and StructLiteralExp.getFieldIndex to dmd/expressionsem.d to eliminate calls to Type.size (See Merged PR).

  2. Broke semantic dependency of dmd/expression.d on dmd/typesem.d by moving Expression.isLvalue to dmd/expressionsem.d to eliminate calls to typesem.mutableOf and typesem.unSharedOf (See Merged PR).

  3. (WIP) Still figuring out the proper places to call oneMembers and computeIsTrivialAlias (See PR).

  4. (WIP) Fixing the problem of casting TemplateDeclaration.instances from void * to TemplateInstance[TemplateInstanceBox] to break semantic dependency of dtemplate.d on templatesem.d. There is an issue, however, with an old bootstrap compiler (v2.079) when doing the following:

auto instances = new TemplateInstance[TemplateInstanceBox];

The error message is (as far as I remember): can only new structs, classes and dynamic arrays, not TemplateInstance[TemplateInstanceBox].
Therefore, we did a workaround by using root.aav.AssocArray; however, this implementation does not support .remove or .clear operations that are needed by various functions in templatesem.d and traits.d (See PR).