Translate _d_array{,set}ctor to templates#2655
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#2655" |
2a15fba to
5cb42f6
Compare
5cb42f6 to
774f81a
Compare
| } | ||
| } | ||
| catch (Exception o) | ||
| { |
There was a problem hiding this comment.
Just for reference, this means calling destructors will not be done if the postblit threw a non-exception throwable. IIRC the language spec allows this behaviour @WalterBright @andralex ?
There was a problem hiding this comment.
See
Lines 180 to 199 in ab890e0
|
LGMT, but the windows Makefile needs to be fixed. @Vild is this PR ready? |
src/rt/array/construction.d
Outdated
| { | ||
| walker--; | ||
| auto elem = cast(Unqual!T*)&p[walker]; | ||
| static if (__traits(hasMember, T, "__xdtor") && |
There was a problem hiding this comment.
Should this code be calling object.destroy instead?
There was a problem hiding this comment.
I changed it object.destroy and object._postblitRecurse for the postblit.
774f81a to
c5fffe3
Compare
|
I would call this PR ready. About the windows build problem, I'm not sure why this is happening. But the file exist when I check: |
|
@rainers We're getting the following build error on Windows It appears all the right makefile modifications have been made. Do you happen to know why this error is occurring? |
The problem is that the output directory does not exist. It should be added similar to https://github.com/dlang/druntime/blob/master/mak/WINDOWS#L57 While you are at it, you could also add |
c5fffe3 to
7e9b792
Compare
|
It seems like the exception paths are not tested, could you add some tests that exercise those? Otherwise looks good. |
Signed-off-by: Dan Printzell <xwildn00bx@gmail.com>
Signed-off-by: Dan Printzell <xwildn00bx@gmail.com>
bd31a2f to
fb70963
Compare
Signed-off-by: Dan Printzell <xwildn00bx@gmail.com>
fb70963 to
b2b03a0
Compare
|
@thewilsonator done This PR is ready to be merged. |
DMD PR: dlang/dmd#10102
rt.util.arraytomak/COPYas its a dependency for_d_arrayctor_d_array{,set}ctoruses@trustedto not break code,pureandnothrowcan be automatically deduced by the compiler_d_arraysetctorno longer returns a return value as it causes warnings: