Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/linker.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSven Boemer <sbomer@gmail.com>2022-06-07 21:23:01 +0300
committerGitHub <noreply@github.com>2022-06-07 21:23:01 +0300
commit42eddb34cbde2364da89dc40dac722957f225b15 (patch)
treeb4d7b99aeb02c19a57fd1fb5a0062a7d5a834e4d /test/Mono.Linker.Tests.Cases/LinqExpressions
parent1481a51970586b26208a7bc6173dc77d658f3508 (diff)
Scan compiler-generated methods as a group (#2792)
This scans compiler-generated methods together as a group when marking the corresponding user code. There are two scans that we do: 1. An initial scan to determine whether we need to run the dataflow scanner. It is also what marks static dependencies of the method IL. 2. The full dataflow scan (only if the initial scan says we need to). This produces warnings and marks reflection dependencies. Both scans are now done for the group of compiler-generated methods when marking the user code. For now, we only do the dataflow scan once per method, but in a later change, we will need to allow re-scanning compiler-generated callees (as part of the full scan for the corresponding user code) to properly track captured state. When compiler-generated code is accessed via reflection, we now don't do a dataflow scan because we don't have the context that might be captured from user code. This also means that reflection-dependencies of the compiler-generated code aren't kept, and dataflow warnings aren't produced, unless the code is reached through the corresponding user method. To guard against this, there are new warnings on reflection access to compiler-generated code. The reflection access warnings are only for compiler-generated code which would normally require the reflection method body scanner. This is a heuristic meant to conservatively approximate "this compiler-generated code would produce dataflow warnings if invoked by reflection with an unknown context".
Diffstat (limited to 'test/Mono.Linker.Tests.Cases/LinqExpressions')
0 files changed, 0 insertions, 0 deletions