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

ReferenceEquals call should be replaced with equivalent IL (when possible) #121

Open
ndrwrbgs opened this issue Sep 30, 2019 · 0 comments
Open

Comments

@ndrwrbgs
Copy link
Contributor

I deleted the template, I'm a bad patron :(

Made unit test to try to compare the weave results against what the compiler would do (so instead of having a comment in the readme.md about what it's similar to, we could assert it's the same as that!) -- master...ndrwrbgs:testTheActualIL

However, note the TODOs in the test file

TODO: The compiler optimizes ReferenceEquals in Equals to brfalse and beq.s, we should also

master...ndrwrbgs:testTheActualIL#diff-487b86d49e3d25f0b2efe6336d19cc22R557

We should try to match what the compiler does in these cases, and prefer brfalse/beq.s instead of the call to object.ReferenceEquals, if that's the right thing to do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant