Table of Contents

Struct AbiArgumentMapElement

Namespace
MonoMod.Core.Platforms
Assembly
MonoMod.Core.dll
A mapping of a method argument from one MethodAbi to another.
public readonly record struct AbiArgumentMapElement

Remarks

The following mappings are valid:

  • Any SourceArgument except UserArguments to itself
  • Any SourceArgument except UserArguments to TargetArgument=UserArguments, in which case the the source argument is mapped to the user argument with index TargetArgumentOffset
  • SourceArgument=UserArguments to TargetArgument=UserArguments, in which case the source user arguments will be mapped to the target user arguments starting at the user argument with index TargetArgumentOffset

In a full mapping, all of a method's target arguments must be bound to exactly one source argument.

In a full mapping, each source argument may be bound to at most one target argument.

In a full mapping, if a source argument is not mapped, that argument is mapped using the identity mapping, unless that mapping would conflict with an existing mapping, in which case it is dropped.

Constructors

AbiArgumentMapElement(SpecialArgumentKind, SpecialArgumentKind)
Constructs an AbiArgumentMapElement with a zero TargetArgumentOffset.
AbiArgumentMapElement(SpecialArgumentKind, SpecialArgumentKind, int)
A mapping of a method argument from one MethodAbi to another.

Properties

SourceArgument
The source argument being mapped.
TargetArgument
The destination argument to map to.
TargetArgumentOffset
The offset of the target argument, if TargetArgument is UserArguments.