Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for checksum-based interceptors #72814

Merged
merged 24 commits into from
Apr 15, 2024

Conversation

RikkiGibson
Copy link
Contributor

Implementation of #72133

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-Compilers untriaged Issues and PRs which have not yet been triaged by a lead labels Mar 30, 2024
@RikkiGibson RikkiGibson marked this pull request as ready for review April 1, 2024 21:25
@RikkiGibson RikkiGibson requested review from a team as code owners April 1, 2024 21:25
CyrusNajmabadi

This comment was marked as outdated.

Copy link
Member

@CyrusNajmabadi CyrusNajmabadi left a comment

Choose a reason for hiding this comment

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

Liked everything i saw about the API and the internal impl of the interceptablelocation type. didn't look beyond that.

const int positionIndex = hashIndex + hashSize;
const int positionSize = sizeof(int);
const int displayNameIndex = positionIndex + positionSize;
const int minLength = displayNameIndex;
Copy link
Member

Choose a reason for hiding this comment

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

minLength

Consider inlining, to reduce the number of constants (slightly).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I prefer this factoring as it's more self-documenting.

Copy link
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.

Done with review pass (iteration 22)

Copy link
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 22)

@jcouv
Copy link
Member

jcouv commented Apr 8, 2024

Note: the TODO2 will need to be resolved for CI

@RikkiGibson
Copy link
Contributor Author

@cston Please take a look

var locationSpecifier = model.GetInterceptableLocation(node)!;
Assert.Equal("(7,9)", locationSpecifier.GetDisplayLocation());
AssertEx.Equal("""[global::System.Runtime.CompilerServices.InterceptsLocationAttribute(1, "jB4qgCy292LkEGCwmD+R6FIAAAA=")]""", locationSpecifier.GetInterceptsLocationAttributeSyntax());
}
Copy link
Member

Choose a reason for hiding this comment

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

}

Consider testing intercepting this invocation.

@RikkiGibson
Copy link
Contributor Author

/azp run

Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@RikkiGibson RikkiGibson merged commit 839e1ab into dotnet:main Apr 15, 2024
24 of 27 checks passed
@dotnet-policy-service dotnet-policy-service bot added this to the Next milestone Apr 15, 2024
@RikkiGibson RikkiGibson deleted the interceptablelocation branch April 15, 2024 19:06
@RikkiGibson RikkiGibson restored the interceptablelocation branch April 15, 2024 19:06
@RikkiGibson RikkiGibson deleted the interceptablelocation branch April 15, 2024 19:47
@dibarbet dibarbet modified the milestones: Next, 17.11 P1 Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Compilers untriaged Issues and PRs which have not yet been triaged by a lead
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants