Skip to content

Commit fd29258

Browse files
authored
Backport :: Bugfix :: Support ldelem.u8, ldelem.u opcode aliases (#18081) (#18096)
1 parent f07a914 commit fd29258

File tree

4 files changed

+551
-3
lines changed

4 files changed

+551
-3
lines changed

eng/Versions.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<!-- F# Version components -->
1515
<FSMajorVersion>9</FSMajorVersion>
1616
<FSMinorVersion>0</FSMinorVersion>
17-
<FSBuildVersion>100</FSBuildVersion>
17+
<FSBuildVersion>101</FSBuildVersion>
1818
<FSRevisionVersion>0</FSRevisionVersion>
1919
<!-- -->
2020
<!-- F# Language version -->

src/Compiler/AbstractIL/ilwrite.fs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2026,11 +2026,11 @@ module Codebuf =
20262026
| I_ldelem dt ->
20272027
emitInstrCode codebuf
20282028
(match dt with
2029-
| DT_I -> i_ldelem_i
2029+
| DT_I | DT_U -> i_ldelem_i
20302030
| DT_I1 -> i_ldelem_i1
20312031
| DT_I2 -> i_ldelem_i2
20322032
| DT_I4 -> i_ldelem_i4
2033-
| DT_I8 -> i_ldelem_i8
2033+
| DT_I8 | DT_U8 -> i_ldelem_i8
20342034
| DT_U1 -> i_ldelem_u1
20352035
| DT_U2 -> i_ldelem_u2
20362036
| DT_U4 -> i_ldelem_u4

tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForXInArray_ToArray.fs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,18 @@ let ``for Failure _ | _ in ...`` () = [|for Failure _ | _ in [||] do 0|]
3535
let ``for true | false in ...`` () = [|for true | false in [||] do 0|]
3636
let ``for true | _ in ...`` () = [|for true | _ in [||] do 0|]
3737
let ``for _ | true in ...`` () = [|for _ | true in [||] do 0|]
38+
39+
// https://github.com/dotnet/fsharp/issues/18066
40+
let ``[|for x in sbyteArray -> x|]`` (xs : sbyte array) = [|for x in xs -> x|]
41+
let ``[|for x in byteArray -> x|]`` (xs : byte array) = [|for x in xs -> x|]
42+
let ``[|for x in int16Array -> x|]`` (xs : int16 array) = [|for x in xs -> x|]
43+
let ``[|for x in uint16Array -> x|]`` (xs : uint16 array) = [|for x in xs -> x|]
44+
let ``[|for x in charArray -> x|]`` (xs : char array) = [|for x in xs -> x|]
45+
let ``[|for x in intArray -> x|]`` (xs : int array) = [|for x in xs -> x|]
46+
let ``[|for x in uintArray -> x|]`` (xs : uint array) = [|for x in xs -> x|]
47+
let ``[|for x in int64Array -> x|]`` (xs : int64 array) = [|for x in xs -> x|]
48+
let ``[|for x in uint64Array -> x|]`` (xs : uint64 array) = [|for x in xs -> x|]
49+
let ``[|for x in nativeintArray -> x|]`` (xs : nativeint array) = [|for x in xs -> x|]
50+
let ``[|for x in unativeintArray -> x|]`` (xs : unativeint array) = [|for x in xs -> x|]
51+
let ``[|for x in floatArray -> x|]`` (xs : float array) = [|for x in xs -> x|]
52+
let ``[|for x in float32Array -> x|]`` (xs : float32 array) = [|for x in xs -> x|]

0 commit comments

Comments
 (0)