On 11 Nov 2012, at 20:50, Walter Bright wrote:
What has also helped is refactoring. For example, the code to walk the expression trees tends to be duplicated a lot. By switching to a single walker coupled with an "apply" function, a number of latent bugs were fixed. I'd like to see more of this (see src/apply.c).

On a related note, and sorry to ping you about this again: Could you please have a look at http://d.puremagic.com/issues/show_bug.cgi?id=8957 resp. my »Expression::apply, DeclarationExp and a possible nested context bug« thread on this mailing list (http://forum.dlang.org/thread/cap9j_hxg8mttnoju9ywyusgzp1nqcdy0+7oehyoq2whnr-d...@mail.gmail.com)?

The question is whether Expression::apply should visit expressions evaluated as part of a DeclarationExp (i.e. initializers). I had to implement a workaround for this in LDC, since it causes an outright crash in its nested context creation code while for DMD the issue is just a rather obscure wrong-code bug, but from past experience I'd like to avoid unilaterally messing with the frontend as much as possible.

David
_______________________________________________
dmd-internals mailing list
[email protected]
http://lists.puremagic.com/mailman/listinfo/dmd-internals

Reply via email to