Skip to content

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

Open
@ndrwrbgs

Description

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.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions