Conversation
Also remove these drop-glue i8 things… They for some reason make these completely non-MIR tests fail after dyndrop commit which has literally 0 changes around the regular old trans. Wut?
|
r? @jroesch (rust_highfive has picked a reviewer for you, use r? to override) |
|
NB: this is based on top of the initial dyndrop implementation PR. |
There was a problem hiding this comment.
I’m not sure about Immediate not needing any treatment here. Immediate only happens if common::type_is_immediate returns true, but to me it is not obvious that the function will never produce true in case of type having a Drop somewhere in it.
There was a problem hiding this comment.
Right, this cannot be ignored.
Also fix the tests to catch the double-drop on move.
|
Okay, so this won’t be as easy as I’ve initially thought. For example, call also consumes its arguments, although not through Sadly, zeroing after call is not as trivial as it sounds: worst-case introduces As for 2nd case… The alternative is to build a Any ideas, @nikomatsakis? |
| base::call_memset(&build::B(bcx), llptr, filling, size, align, false); | ||
| } | ||
|
|
||
| pub fn set_operand_dropped(&mut self, |
There was a problem hiding this comment.
This also feels seriously hacky to me, but I don’t see an obvious way to dropflag-fill a OperandValue::Immediate.
There was a problem hiding this comment.
You could use an out-of-line drop flag for these
|
☔ The latest upstream changes (presumably #31282) made this pull request unmergeable. Please resolve the merge conflicts. |
For example, one can do something like this |
|
(Did not mean to close.) |
|
I was proposing to @nagisa on IRC that we might want to restruct Example: alternatively, Anyway, the goal here is to address the fact that the store only occurs when things succeed, and hopefully ease the translation to LLVM IR (and also ease dataflow somewhat -- @pnkfelix had to add some special cases here too). |
|
@nagisa sorry, I've kind of lost track of the state here. do you think we should land this as a "work in progress", or should we wait till we can get things working more completely? |
This is, we think, is the last piece necessary for the fully functional implementation of dynamic dropping in MIR.