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

Support ldftn #42488

Merged
8 commits merged into from
Mar 28, 2020
Merged

Commits on Mar 27, 2020

  1. Support ldftn

    This change enables an address-of operator (&) to target a method group,
    and for that result to be converted a function pointer type. Much like a
    method-group-to-delegate conversion, an address-of-method-group
    has no natural type, and must be target-typed to something with a
    compatible function pointer type signature. Compatible is defined in
    our function pointer spec here:
    https://github.com/dotnet/csharplang/blob/master/proposals/function-pointers.md#function-pointer-conversions
    An address of a method group, if valid, will load the function with the
    ldftm CIL instruction, and this token can then be `calli`'d. This PR
    does not implement support for `NativeCallableAttribute`, that will
    come in a future PR. When that does, it will change the calling
    convention that the method can be converted to.
    333fred committed Mar 27, 2020
    Configuration menu
    Copy the full SHA
    2908863 View commit details
    Browse the repository at this point in the history
  2. PR Feedback

    Some spelling changes as requested.
    Fixed a bug by specifying the parameter name to PerformOverloadResolution
    Updated baselines
    Added a test for `void*`
    333fred committed Mar 27, 2020
    Configuration menu
    Copy the full SHA
    4cc0ba0 View commit details
    Browse the repository at this point in the history
  3. Address PR Feedback:

    Handle additional conversion cases.
    Clean up error reporting.
    Add more tests.
    Handle a couple of bad-code crashes.
    333fred committed Mar 27, 2020
    Configuration menu
    Copy the full SHA
    77b08e3 View commit details
    Browse the repository at this point in the history
  4. Readd parameter check.

    333fred committed Mar 27, 2020
    Configuration menu
    Copy the full SHA
    a3ac488 View commit details
    Browse the repository at this point in the history
  5. PR Feedback

    Additional calling convention validation.
    Test adjustments.
    333fred committed Mar 27, 2020
    Configuration menu
    Copy the full SHA
    d8440d9 View commit details
    Browse the repository at this point in the history
  6. PR Feedback

    Adjust some error messages and reporting for clarity.
    Add new test for invalid metadata.
    333fred committed Mar 27, 2020
    Configuration menu
    Copy the full SHA
    c196e3b View commit details
    Browse the repository at this point in the history
  7. Addressed PR feedback

    Error wording.
    Simply if.
    333fred committed Mar 27, 2020
    Configuration menu
    Copy the full SHA
    28bc3db View commit details
    Browse the repository at this point in the history
  8. Rerun bound node generator.

    333fred committed Mar 27, 2020
    Configuration menu
    Copy the full SHA
    0946f8c View commit details
    Browse the repository at this point in the history