[WIP] Fixes needed for the _d_arrayappend{T,cTX} dmd PR#2718
[WIP] Fixes needed for the _d_arrayappend{T,cTX} dmd PR#2718Vild wants to merge 3 commits intodlang:masterfrom
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#2718" |
Signed-off-by: Dan Printzell <xwildn00bx@gmail.com>
Signed-off-by: Dan Printzell <xwildn00bx@gmail.com>
Signed-off-by: Dan Printzell <xwildn00bx@gmail.com>
1b79661 to
0ec45b3
Compare
| @@ -139,7 +147,7 @@ template _d_arrayappendTImpl(Tarr : T[], T) | |||
| * Run postblit on `t` if it is a struct and needs it. | |||
| * Or if `t` is a array, run it on the children if they have a postblit. | |||
| */ | |||
There was a problem hiding this comment.
If the return type is changing, I recommend updating the DDoc comment to include a Returns explanation.
| * if the postblit is callable in a `pure` scope, if it exist. | ||
| * if it does not exist, return true. | ||
| */ | ||
| template isPostblitPure(T) { |
| __traits(isSame, T, __traits(parent, T.init.__xpostblit))) | ||
| enum isPostblitPure = isPure!(T.init.__xpostblit); | ||
| else | ||
| enum isPostblitNoThrow = true; |
There was a problem hiding this comment.
isPostblitPure instead of isPostblitNoThrow?
| t.__xpostblit(); | ||
| { | ||
| import core.internal.array.utils : isPure; | ||
| static if (isPure!(t.__xpostblit)) |
There was a problem hiding this comment.
Should this be static if (isPostblitPure!T)? I don't see isPostblitPure used anywhere.
| auto sizeelem = T.sizeof; | ||
|
|
||
| _d_arrayappendcTXImpl!Tarr._d_arrayappendcTX(x, y.length); | ||
| if (_d_arrayappendcTXImpl!Tarr._d_arrayappendcTX(x, y.length) is null) |
There was a problem hiding this comment.
Under what condition would _d_arrayappendcTxImpl return null?
No description provided.