Commit 1ea4166
authored
Remove decimal alignment quirk from the type loader (#38603)
System.Decimal fields did not match Win32 DECIMAL type for historic reasons. It required type loader to have a quirk to artificially inflate System.Decimal alignment to match the alignment of Win32 DECIMAL type to make interop work well.
This change is fixing the System.Decimal fields to match Win32 DECIMAL type and removing the quirk from the type loader since it does not belong there.
The downsides are:
- Slightly lower code quality on 32-bit platforms. 32-bit platforms are not our high performance targets anymore.
- Explicit implementation of ISerializable is required on System.Decimal for binary serialization compatibility.
Fixes #383901 parent c8b3106 commit 1ea4166
5 files changed
Lines changed: 111 additions & 140 deletions
File tree
- src
- coreclr/src/vm
- libraries
- System.Private.CoreLib/src/System
- System.Runtime/ref
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | 35 | | |
45 | 36 | | |
46 | 37 | | |
47 | | - | |
48 | 38 | | |
49 | 39 | | |
50 | 40 | | |
51 | | - | |
52 | 41 | | |
53 | 42 | | |
54 | 43 | | |
| |||
103 | 92 | | |
104 | 93 | | |
105 | 94 | | |
106 | | - | |
107 | 95 | | |
108 | 96 | | |
109 | 97 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9724 | 9724 | | |
9725 | 9725 | | |
9726 | 9726 | | |
9727 | | - | |
9728 | | - | |
9729 | | - | |
9730 | | - | |
9731 | | - | |
9732 | | - | |
9733 | | - | |
9734 | | - | |
9735 | | - | |
9736 | | - | |
9737 | | - | |
9738 | | - | |
9739 | | - | |
9740 | | - | |
9741 | | - | |
9742 | | - | |
9743 | | - | |
9744 | 9727 | | |
9745 | 9728 | | |
9746 | 9729 | | |
| |||
Lines changed: 28 additions & 30 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | | - | |
19 | | - | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
| 25 | + | |
30 | 26 | | |
31 | 27 | | |
32 | 28 | | |
| |||
50 | 46 | | |
51 | 47 | | |
52 | 48 | | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
53 | 55 | | |
54 | 56 | | |
55 | 57 | | |
56 | 58 | | |
| 59 | + | |
57 | 60 | | |
58 | 61 | | |
59 | | - | |
| 62 | + | |
60 | 63 | | |
61 | 64 | | |
62 | | - | |
| 65 | + | |
63 | 66 | | |
64 | 67 | | |
65 | 68 | | |
| |||
85 | 88 | | |
86 | 89 | | |
87 | 90 | | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
| 91 | + | |
| 92 | + | |
95 | 93 | | |
96 | 94 | | |
97 | 95 | | |
| |||
163 | 161 | | |
164 | 162 | | |
165 | 163 | | |
166 | | - | |
| 164 | + | |
167 | 165 | | |
168 | 166 | | |
169 | 167 | | |
| |||
1249 | 1247 | | |
1250 | 1248 | | |
1251 | 1249 | | |
1252 | | - | |
| 1250 | + | |
1253 | 1251 | | |
1254 | | - | |
| 1252 | + | |
1255 | 1253 | | |
1256 | | - | |
| 1254 | + | |
1257 | 1255 | | |
1258 | | - | |
1259 | | - | |
| 1256 | + | |
| 1257 | + | |
1260 | 1258 | | |
1261 | | - | |
| 1259 | + | |
1262 | 1260 | | |
1263 | 1261 | | |
1264 | 1262 | | |
1265 | 1263 | | |
1266 | 1264 | | |
1267 | 1265 | | |
1268 | 1266 | | |
1269 | | - | |
| 1267 | + | |
1270 | 1268 | | |
1271 | | - | |
| 1269 | + | |
1272 | 1270 | | |
1273 | 1271 | | |
1274 | 1272 | | |
| |||
1899 | 1897 | | |
1900 | 1898 | | |
1901 | 1899 | | |
1902 | | - | |
| 1900 | + | |
1903 | 1901 | | |
1904 | 1902 | | |
1905 | | - | |
| 1903 | + | |
1906 | 1904 | | |
1907 | 1905 | | |
1908 | 1906 | | |
| |||
0 commit comments