[WIP] Fix internal error caused by the missing ldind/stind pickler combinator for inline IL #5528
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a fix for #5527
Right now the ldind / stind keyword is known and handled (https://github.com/Microsoft/visualfsharp/blob/master/src/absil/illex.fsl#L145) here (https://github.com/Microsoft/visualfsharp/blob/master/src/absil/ilascii.fs#L196)
and here (https://github.com/Microsoft/visualfsharp/blob/master/src/absil/illex.fsl#L63) and here, but not yet possible to emit the corresponding bytecode because of the missing TAST pickler combinators (https://github.com/Microsoft/visualfsharp/blob/master/src/fsharp/TastPickle.fs#L1157) How the TAST (Pickler) versioning supposed to work? Is it OK to extend it with new functionality and tags? Please forgive me if I made some mistakes, this is my first pull request for F#.
Please note: I intentionally did not propose any new functionality for NativePtr in this pull request, so no surface area change are required.
Please note: Right now every access (including ldobj/stobj) assume aligned access in F#, which is perfectly fine on x86 and unaligned access is also inexpressible in C#. However this should be addressed in the future, because other architectures for example ARM does have a problem with unaligned access [1] (I have a quick and dirty inline IL prototype, and will be introduced later after cleanup)
[1] "An operation that performs an unaligned access can abort on any memory access that it makes, and can abort on more than one access. This means that an unaligned access that occurs across a page boundary can generate an abort on either side of the boundary."