[mono] Don't use direct wrapper when invoking cctors, so all cctors can share one wrapper #102375
+74
−20
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Should improve interp startup time a bit, since right now we generate one wrapper for every cctor, and lots of cctors get called during app startup. From my testing this doesn't break AOT, but I can't tell whether this is accidentally causing us to interpret cctors that were AOT'd.
I added some new assertions in various places because of some crashes I hit while making my way to this change; happy to take them out.
cc @BrzVlad @kotlarmilos would appreciate thoughts on the right way to do this. this is just my first attempt that worked, i still don't understand all this code well
my thinking here: