Hotfix avoid deref in refs - #654
Conversation
|
I've been thinking about whether changing from a function to a rewriting rule is really necessary. It feels like interim_simplification is maybe the more crucial part here? Naturally, if the intermediate steps can't be produced by rewriting, then interim_simplification won't be able to do anything. I'm just wondering if we need to double-check this. |
Re-tested it to be sure, and indeed the |
Before creating a reference or pointer, the pointee is evaluated using `#traverseProjection` and then the projections are reconstructed. This shortens out all `Deref` projections, avoiding the problem of creating a reference with offset `-1` (which can only happen when the returned value refers to another local reference or pointer and is dereferenced immediately).
Before creating a reference or pointer, the pointee is evaluated using
#traverseProjectionand then the projections are reconstructed. This shortens out allDerefprojections, avoiding the problem of creating a reference with offset-1(which can only happen when the returned value refers to another local reference or pointer and is dereferenced immediately).