[netcore] Require use of MonoClass getters in Debug builds (mono/mono#18267)
authorAleksey Kliger (λgeek) <alklig@microsoft.com>
Mon, 13 Jan 2020 20:15:09 +0000 (15:15 -0500)
committerAlexander Köplinger <alex.koeplinger@outlook.com>
Mon, 13 Jan 2020 20:15:09 +0000 (21:15 +0100)
commit2b99d1687d3f43f88609b10bd3cc8364606e9be2
tree9f78dcc063325a66f728b92162ed6aa3a979a88d
parenta16ac070c745e6c75a3339e3c6d4f59427f97b6d
[netcore] Require use of MonoClass getters in Debug builds (mono/mono#18267)

1. Update `build.sh` to use `--enable-checked-build=private_types` which forces the use of getter methods to access `MonoClass` fields.
2. Fix up some places that were accessing MonoClass directly.
3. Get rid of a spurious comma operator usage from an earlier refactoring:
   ```c
      z = a, b, c;
   ```
   is the same as
   ```c
      z = a; b; c;
   ```
   which is the same as just `z = a;` if `b` and `c` have no side-effects.

Commit migrated from https://github.com/mono/mono/commit/6abab691ec71c3cb4f72dd6d8f630088c8330357
src/mono/mono/metadata/icall.c
src/mono/mono/mini/simd-intrinsics-netcore.c
src/mono/netcore/build.sh