Translate _d_arraysetlengthT to template#2656
Conversation
|
Thanks for your pull request and interest in making D better, @Vild! 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 fetch digger
dub run digger -- build "master + druntime#2656" |
src/rt/array/capacity.d
Outdated
| */ | ||
| Tarr _d_arraysetlengthT(Tarr : T[], T)(return scope ref Tarr arr, size_t newlength) @trusted | ||
| { | ||
| version (D_BetterC) |
There was a problem hiding this comment.
I'm trying to figure out why this check is necessary, but I haven't succeeded yet. It shouldn't be required, but this check is a successful workaround. Until I can figure it out, please use D_TypeInfo instead of D_BetterC. I think GDC does not support betterC, but instead has individual flags like -fno-rtti, -fno-exceptions, etc. Using the more specific version specifier should make this code more portable. The error message would also need to be updated e.g. "Cannot resize arrays if compiling without support for runtime type information."
There was a problem hiding this comment.
Thanks, I will do the same changes on the other PRs.
50c4fdd to
d95b906
Compare
|
LGTM |
d95b906 to
53764aa
Compare
Signed-off-by: Dan Printzell <xwildn00bx@gmail.com>
53764aa to
3478600
Compare
I don't think this auto-tester error have anything to do with my changes. |
|
This good to go? |
Yes! :) |
dmd PR: dlang/dmd#10106
rt.array.capacity._d_arraysetlengthTwill call the_d_arraysetlength{,iT}depending on ifTis zero initialized, this logic used to be inside of dmd.