Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@lambdageek
Copy link
Member

@lambdageek lambdageek commented Mar 1, 2018

Use MonoClass getters in the rest of the code in mono/metadata/

  1. Add mono_class_contextbound_bit_offset() which returns the bit offset of MonoClass:contextbound which is needed by remoting.c
  2. Add mono_class_create_array_fill_type which is used by sgen to write over unused nursery fragments.
  3. Alllow metadata-cross-helpers.c to access MonoClass fields directly. Rationale: it needs to compute field offsets.
  4. Everything else shouldn't have any functional changes.

#6925

@lambdageek
Copy link
Member Author

I can feed this one bit by bit instead, if this is impossible to review...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not a maintainable hack. We should eliminate those bitfields we need to address.

@lambdageek
Copy link
Member Author

Test failures are related. I messed something up in here.

@lambdageek lambdageek force-pushed the use-getters-metadata branch from 7aeb95c to 7f02a52 Compare March 6, 2018 15:46
@lambdageek lambdageek force-pushed the use-getters-metadata branch from 7f02a52 to bb017f1 Compare March 6, 2018 15:48
@akoeplinger
Copy link
Member

The license/cla status is flaky, merging as per discussion in Slack.

@akoeplinger akoeplinger merged commit 8ba4947 into mono:master Mar 7, 2018
@lambdageek lambdageek deleted the use-getters-metadata branch March 28, 2018 18:26
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
…7354)

Use `MonoClass` getters in the rest of the code in `mono/metadata/`
1. Add `mono_class_contextbound_bit_offset()` which returns the bit offset of `MonoClass:contextbound` which is needed by `remoting.c`
2. Add `mono_class_create_array_fill_type` which is used by sgen to write over unused nursery fragments.
3. Alllow `metadata-cross-helpers.c` to access `MonoClass` fields directly. Rationale: it needs to compute field offsets.
4. Everything else shouldn't have any functional changes.

mono/mono#6925

---

* [metadata] Fix warnings in class-accessors.c

Fix warnings about missing prototypes for class-abi-details.h functions.

* [cominterop] Use MonoClass getters in cominterop.c

* [loader] Use MonoClass getters in loader.c

* [runtime] Use MonoClass getters in icall.c

* [metadata] Add mono_class_contextbound_bit_offset() accessor

Compute the bit offset of MonoClass:countextbound

* [remoting] Use MonoClass getters for remoting.c

* [boehm] Use MonoClass getters in boehm-gc.c

* [callspec] Use MonoClass getters in callspec.c

* [sre] Use MonoClass getters in dynamic-image.c

* [w32] Use MonoClass getters in w32process.c

* [debug] Use MonoClass getters in mono-debug.c

* [runtime] Use MonoClass getters in method-builder.c

* [runtime] Use MonoClass getters in security-manager.c

* [coop] Use MonoClass getters in handle.c

* [reflection] Use MonoClass getters in reflection.c

* [sgen] Add mono_class_create_array_fill_type

Used by sgen to fill nursery fragments before a collection

* [sgen] Use MonoClass getters in sgen-mono.c and the GC bridges

* [verify] Use MonoClass getters in the verifier

* [sre] Use MonoClass getters in SRE

* [custom_attr] Use MonoClass getters in custom-attrs.c

* [metadata] Use MonoClass getters in gc.c

* [security-core-clr] Use MonoClass getters in security-core-clr.c

* [metadata] Use MonoClass getters in metadata.c

* [metadata] Allow metadata-cross-helpers to access MonoClass fields

* [coop handle] Use MonoClass getter in mono_handle_unbox_unsafe


Commit migrated from mono/mono@8ba4947
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants