Skip to content

Investigate whether it's beneficial to share P/Invokes with similar signatures #16673

@rolfbjarne

Description

@rolfbjarne

Example:

Messaging.void_objc_msgSend_IntPtr_nuint(base.Handle, Selector.GetHandle("setTitle:forState:"), intPtr, (nuint)(ulong)P_1);

P_1 is a [Native] enum, which is an n[u]int so it can have a different size on 32/64 bits architectures.
An IntPtr can also do this job and since we're already using them in many places (handles) we have a better chance to share an existing signature for objc_msg[Super]Send
e.g. void_objc_msgSend_IntPtr_IntPtr already exists

Potential:

  • smaller platform assembly (minor impact)
  • smaller app bundles for large apps (minor impact)

Metadata

Metadata

Assignees

No one assigned

    Labels

    app-sizeenhancementThe issue or pull request is an enhancementgeneratorIssues affecting the generator

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions