Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ILLink: Remove ScopeStack from MarkStep (dotnet#102282)
Removes the ScopeStack from the MarkStep to make the MessageOrigin flow clearly traceable. This should be very helpful as we transition to the dependency analysis framework. The changes were fairly mechanical, each place that pushed a scope onto the stack, a new MessageOrigin was created, and all places that used ScopeStack.CurrentScope added a new origin parameter, and the parameter bubbled up to the ProcessX methods. Passing MessageOrigin by value was slightly faster than as an in parameter (and overall this is slightly faster than main), so I made MessageOrigin.ILOffset a non-nullable int to make the struct a bit smaller. I ran the aspnetcore benchmarks trim step and didn't run into issues, so the stack should be large enough to handle it.
- Loading branch information