Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch IP mapping lists to use jitstd::list (dotnet#61822)
We may want to change the logic around how IP mappings are reported to the EE, and the manually maintained singly-linked lists made it hard to understand the logic that goes on here. Switch to jitstd::list which allows us to simplify the logic by directly removing the mappings we do not want to emit. There are two small behavior changes here: 1. The previous logic would record superfluous IL offset 0 mappings under the assumption that the previous mapping was the prolog; this is not always the case, so check this explicitly 2. The previous logic would record _all_ CALL_INSTRUCTION mappings and would not use these to check whether to remove NO_MAP mappings. This is superfluous as well, if we have a regular mapping at a native offset it does not give any information to add a NO_MAP mapping at the same native offset. All diffs therefore look like the following. Case 1: -IP mapping count : 7 +IP mapping count : 6 IL offs PROLOG : 0x00000000 ( STACK_EMPTY ) IL offs 0x0000 : 0x00000009 ( STACK_EMPTY ) IL offs 0x0000 : 0x000000F4 ( STACK_EMPTY ) -IL offs 0x0000 : 0x000000F4 ( STACK_EMPTY ) IL offs NO_MAP : 0x00000114 ( STACK_EMPTY ) IL offs EPILOG : 0x0000011D ( STACK_EMPTY ) IL offs 0x0000 : 0x00000124 ( STACK_EMPTY ) Case 2: IL offs 0x0000 : 0x000000D7 ( STACK_EMPTY ) IL offs 0x0001 : 0x000000DE ( CALL_INSTRUCTION ) -IL offs NO_MAP : 0x000000E9 ( STACK_EMPTY ) IL offs 0x000B : 0x000000E9 ( CALL_INSTRUCTION ) IL offs NO_MAP : 0x000000F7 ( STACK_EMPTY )
- Loading branch information