Translate _d_arrayassign{,_l,_r} to templates#14310
Conversation
|
Thanks for your pull request and interest in making D better, @teodutu! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please see CONTRIBUTING.md for more information. If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment. Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog. Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub run digger -- build "master + dmd#14310" |
72cbfbd to
088579a
Compare
088579a to
4e1be99
Compare
|
Could you please double check that the build kite failures are unrelated? Otherwise this looks good. Please ping me when you're done. |
- Implement template `_d_arrayassign{_l,_r}`
- Lower array asignment expressions to the above templates
- Remove old lowering from e2ir.d
- Remove the old `_d_arrayassign{,_l,_r}` hooks
- Merge the usage of `_d_arrayassign` with that of `_d_arrayassign_l`
Signed-off-by: Teodor Dutu <teodor.dutu@gmail.com>
4e1be99 to
9d3e496
Compare
|
@thewilsonator The buildkite failures were related. They were caused by the temporary variable used for _tmp = rhs, _d_arrayappend_r(lhs, _tmp);I was not adding the |
|
cc @dkorpel |
|
This change introduced unnecessary out-of-bounds checking when doing array operations. e.g.: https://github.com/dlang/dmd/pull/14310/files#diff-c9a721f453e1e17d997f8603ca3e4e65c765f0ebf0dd1cfb972ddddc959bdbb1R92-R94 |
|
@schveiguy Are these checks relevant given that they're disabled when compiling with maximum optimisations, i.e. |
|
Yes, they are relevant. First, because they are redundant, the entire operation is bounds checked first (see here) And second, because it's a template, it will be compiled under whatever options the user is using at the time. |
|
This pull request introduced a regression: |
* Remove RTLSYM for Translation PR #15819: Removed NEWARRAYMITX, NEWARRAYMITX, TRACENEWARRAYMTX and TRACENEWARRAYMITX * Remove RTLSYM for Translation PR #15299: Removed NEWARRAYT, NEWARRAYIT, TRACENEWARRAYT and TRACENEWARRAYIT * Remove RTLSYM for Translation PR #14837: Removed NEWCLASS, TRACENEWCLASS * Remove RTLSYM for Translation PR #14664: Removed NEWITEMT, NEWITEMIT, TRACENEWITEMT and TRACENEWITEMIT * Remove RTLSYM for Translation PR #14550: Removed ARRAYCATNTX, ARRAYCATT, TRACEARRAYCATNTX and TRACEARRAYCATT * Remove RTLSYM for Translation PR #14382: Removed ARRAYSETASSIGN * Remove RTLSYM for Translation PR #14310: Removed ARRAYASSIGN * Remove RTLSYM for Translation PR #13495: Removed ARRAYAPPENDT, ARRAYAPPENDCTX, TRACEARRAYAPPENDT and TRACEARRAYAPPENDCTX
_d_arrayassign{_l,_r}._d_arrayassign_{l,r}and_d_arrayassigas its usage was merged with_d_arrayassign_l.