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
-
Moved
ClassReferenceExp.getFieldIndex
andStructLiteralExp.getFieldIndex
todmd/expressionsem.d
to eliminate calls toType.size
(See Merged PR). -
Broke semantic dependency of
dmd/expression.d
ondmd/typesem.d
by movingExpression.isLvalue
todmd/expressionsem.d
to eliminate calls totypesem.mutableOf
andtypesem.unSharedOf
(See Merged PR). -
(WIP) Still figuring out the proper places to call
oneMembers
andcomputeIsTrivialAlias
(See PR). -
(WIP) Fixing the problem of casting
TemplateDeclaration.instances
fromvoid *
toTemplateInstance[TemplateInstanceBox]
to break semantic dependency ofdtemplate.d
ontemplatesem.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).