d: Merge upstream dmd 8508c4e68.
authorIain Buclaw <ibuclaw@gdcproject.org>
Sun, 28 Jun 2020 15:46:18 +0000 (17:46 +0200)
committerIain Buclaw <ibuclaw@gdcproject.org>
Sun, 28 Jun 2020 16:04:20 +0000 (18:04 +0200)
commitce56fd949f359a62b86a45aaf975ac2ecc48fa64
treedcaa656a7457469c1b72556b0f88eaa377680dd1
parentb62cac6d92ff251213753475b69ec0b269cb7fae
d: Merge upstream dmd 8508c4e68.

Fixes a performance bug where 'static foreach' would take an
exponentially long time to expand during CTFE.

In the following example:

    static foreach (i; 0..30000) {}

Compilation time had been reduced from around 40 to 0.08 seconds.
Memory consumption is also reduced from 3.5GB to 55MB.

Reviewed-on: https://github.com/dlang/dmd/pull/11335

gcc/d/ChangeLog:

* dmd/MERGE: Merge upstream dmd 8508c4e68.
gcc/d/dmd/MERGE
gcc/d/dmd/cond.c