Skip to content

Commit

Permalink
Support ldelem.u8, ldelem.u opcode aliases (#18081)
Browse files Browse the repository at this point in the history
  • Loading branch information
brianrourkeboll authored Dec 2, 2024
1 parent 60d686c commit 11316da
Show file tree
Hide file tree
Showing 4 changed files with 551 additions and 2 deletions.
1 change: 1 addition & 0 deletions docs/release-notes/.FSharp.Compiler.Service/9.0.200.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* Fix missing nullness warning in case of method resolution multiple candidates ([PR #17917](https://github.com/dotnet/fsharp/pull/17918))
* Fix failure to use bound values in `when` clauses of `try-with` in `seq` expressions ([PR #17990](https://github.com/dotnet/fsharp/pull/17990))
* Fix locals allocating for the special `copyOfStruct` defensive copy ([PR #18025](https://github.com/dotnet/fsharp/pull/18025))
* Fix lowering of computed array expressions when the expression consists of a simple mapping from a `uint64` or `unativeint` array. [PR #18081](https://github.com/dotnet/fsharp/pull/18081)

### Added

Expand Down
4 changes: 2 additions & 2 deletions src/Compiler/AbstractIL/ilwrite.fs
Original file line number Diff line number Diff line change
Expand Up @@ -2026,11 +2026,11 @@ module Codebuf =
| I_ldelem dt ->
emitInstrCode codebuf
(match dt with
| DT_I -> i_ldelem_i
| DT_I | DT_U -> i_ldelem_i
| DT_I1 -> i_ldelem_i1
| DT_I2 -> i_ldelem_i2
| DT_I4 -> i_ldelem_i4
| DT_I8 -> i_ldelem_i8
| DT_I8 | DT_U8 -> i_ldelem_i8
| DT_U1 -> i_ldelem_u1
| DT_U2 -> i_ldelem_u2
| DT_U4 -> i_ldelem_u4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,18 @@ let ``for Failure _ | _ in ...`` () = [|for Failure _ | _ in [||] do 0|]
let ``for true | false in ...`` () = [|for true | false in [||] do 0|]
let ``for true | _ in ...`` () = [|for true | _ in [||] do 0|]
let ``for _ | true in ...`` () = [|for _ | true in [||] do 0|]

// https://github.com/dotnet/fsharp/issues/18066
let ``[|for x in sbyteArray -> x|]`` (xs : sbyte array) = [|for x in xs -> x|]
let ``[|for x in byteArray -> x|]`` (xs : byte array) = [|for x in xs -> x|]
let ``[|for x in int16Array -> x|]`` (xs : int16 array) = [|for x in xs -> x|]
let ``[|for x in uint16Array -> x|]`` (xs : uint16 array) = [|for x in xs -> x|]
let ``[|for x in charArray -> x|]`` (xs : char array) = [|for x in xs -> x|]
let ``[|for x in intArray -> x|]`` (xs : int array) = [|for x in xs -> x|]
let ``[|for x in uintArray -> x|]`` (xs : uint array) = [|for x in xs -> x|]
let ``[|for x in int64Array -> x|]`` (xs : int64 array) = [|for x in xs -> x|]
let ``[|for x in uint64Array -> x|]`` (xs : uint64 array) = [|for x in xs -> x|]
let ``[|for x in nativeintArray -> x|]`` (xs : nativeint array) = [|for x in xs -> x|]
let ``[|for x in unativeintArray -> x|]`` (xs : unativeint array) = [|for x in xs -> x|]
let ``[|for x in floatArray -> x|]`` (xs : float array) = [|for x in xs -> x|]
let ``[|for x in float32Array -> x|]`` (xs : float32 array) = [|for x in xs -> x|]
Loading

0 comments on commit 11316da

Please sign in to comment.