Skip to content

Allow SyntaxOffset in EnC state machine map to be negative#61667

Merged
tmat merged 2 commits intodotnet:release/dev17.3from
tmat:FixAwaitSyntaxOffset
Jun 3, 2022
Merged

Allow SyntaxOffset in EnC state machine map to be negative#61667
tmat merged 2 commits intodotnet:release/dev17.3from
tmat:FixAwaitSyntaxOffset

Conversation

@tmat
Copy link
Copy Markdown
Member

@tmat tmat commented Jun 2, 2022

Use the same pattern for encoding the blob as other EnC debug infos with syntax offsets: Negative syntax offsets are rare - only when the syntax node is in an initializer of a field or property. To optimize for size calculates the base offset and adds it to all syntax offsets. In common cases (no negative offsets) this base offset is gonna be 0. Otherwise it's gonna be the lowest negative offset.

TODO:

@ghost ghost added the Area-Interactive label Jun 2, 2022
@tmat tmat marked this pull request as ready for review June 2, 2022 20:44
@tmat tmat requested a review from a team as a code owner June 2, 2022 20:44
@Cosifne Cosifne changed the base branch from main to release/dev17.3 June 2, 2022 20:50
@Cosifne
Copy link
Copy Markdown
Member

Cosifne commented Jun 2, 2022

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 4 pipeline(s).

@jcouv
Copy link
Copy Markdown
Member

jcouv commented Jun 2, 2022

    private static unsafe ImmutableArray<StateMachineStateDebugInfo> UncompressStateMachineStates(ImmutableArray<byte> compressedStateMachineStates)

nit: consider adding description from OP as comment


Refers to: src/Compilers/Core/Portable/Emit/EditAndContinueMethodDebugInformation.cs:307 in 6cbf42f. [](commit_id = 6cbf42f, deletion_comment = False)

Copy link
Copy Markdown
Member

@jcouv jcouv left a comment

Choose a reason for hiding this comment

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

LGTM Thanks (iteration 1)

@jcouv jcouv self-assigned this Jun 2, 2022
@tmat tmat requested a review from a team as a code owner June 3, 2022 03:42
@tmat tmat enabled auto-merge (squash) June 3, 2022 03:58
@tmat tmat merged commit 0c2fb6c into dotnet:release/dev17.3 Jun 3, 2022
@tmat tmat deleted the FixAwaitSyntaxOffset branch June 3, 2022 06:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants