Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Backport move(Emplace) fixes from Phobos #3133

Merged
merged 2 commits into from
Sep 15, 2020

Conversation

MoonlightSentinel
Copy link
Contributor

No description provided.

@dlang-bot
Copy link
Contributor

Thanks for your pull request and interest in making D better, @MoonlightSentinel! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please verify that your PR follows this checklist:

  • My PR is fully covered with tests (you can see the coverage diff by visiting the details link of the codecov check)
  • My PR is as minimal as possible (smaller, focused PRs are easier to review than big ones)
  • I have provided a detailed rationale explaining my changes
  • New or modified functions have Ddoc comments (with Params: and Returns:)

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 references

Auto-close Bugzilla Severity Description
20869 enhancement std.algorithm.mutation : move is overly trusting of opPostMove

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub run digger -- build "master + druntime#3133"

else
target = source;

static if (hasElaborateMove!T)
__move_post_blt(target, source);
Copy link
Contributor

@kinke kinke Jun 10, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I confess I didn't know this already exists. Good lord, another half-complete feature (copy ctors...), as the compiler AFAIK doesn't emit any calls for the (many) implicit moves...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't this __move_post_blt and opPostMove business become a non-starter due to qualifier hell?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It certainly needs more work but the druntime/phobos versions of these functions shouldn't differ.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll just ping @RazvanN7 in hopes of clarifying the status of __move_post_blt. If it's dead, quite a few changes would need to be made.

Copy link
Contributor

@12345swordy 12345swordy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@12345swordy
Copy link
Contributor

cc @thewilsonator

@radcapricorn
Copy link
Contributor

I'd rather if this was looked over wrt __move_post_blt and the de-facto status of DIP1014.

@MoonlightSentinel
Copy link
Contributor Author

Ping, move should not have different in druntime and Phobos (regardless of the state of opPostMove)

@dlang-bot dlang-bot merged commit 31c0b96 into dlang:master Sep 15, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Enhancement New functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants