Seems like a typo - the setter method was assigned to the Getter property
The test GuessAccessors needed adjustments in the generated code.
ILSpy is more eager to merge property assignments
Use `Unsafe.As` to adjust the type of a managed reference if necessary (without converting to a pointer type).
This also adds support for the `ReadUnaligned`/`WriteUnaligned` intrinsics.
C# has some special rules for allowed expressions inside a fixed statement.
In the non-allowed cases, emit an `Unsafe.AsRef()` call to prevent compiler errors.
Let's distinguish between the original pinned locals and the PinnedRegion locals.
The format need declarations if any are left over after transformations; the latter don't.
The previously emitted `ref *(TTo*)(&source)` only compiles when `source` is a local variable; otherwise C# complains about the memory not being pinned.
Note that we special-case local variables to keep the previous behavior around; this avoids pulling in `System.Runtime.CompilerServices.Unsafe.dll` when it's unnecessary.
Not every pinned region has a clean `P = null` assignment to mark its end.
If a second pinned region starts with the same variable `P`, consider that to mark the end of the previous pinned region for that variable.
Also, fix a bunch of special cases with empty pinned regions.
Unreachable code is not part of the dominator tree, which most of our transforms are based on.
In particular, dominance-based loop detection runs into the problem where unreachable code might have jumps into two independent loops. In that case, it's impossible to place the unreachable code in a way that avoids assertions / generating invalid C#.
We establish the invariant that all blocks in a BlockContainer must be statically reachable from the entry point (-> every block is part of the dominator tree). This means transforms no longer have to deal with special cases for unreachable code.
The "Remove dead and side effect free code" option still has an effect on dead stores, but unreachable code is now always removed (previously this also was dependent on this option).