Table of Contents

Struct DeclarationReferences

Namespace
RDCore.SDK.Semantics
Assembly
RDCore.SDK.dll

Every reference to a declaration there is, counted by what the reference does.

public readonly record struct DeclarationReferences : IEquatable<DeclarationReferences>
Implements
Inherited Members

Remarks

These are the references, all of them: a count is only ever stated for a declaration that nothing outside the code the pass analyzed can refer to (References). An expression that is passed as an argument is a reference of its own kind, because what it does is not what the expression says: the procedure it is passed to may read it, write to it, or both, when its parameter is ByRef.

Constructors

DeclarationReferences(int, int, int)

Every reference to a declaration there is, counted by what the reference does.

public DeclarationReferences(int Reads, int Writes, int PassedAsArguments)

Parameters

Reads int

How many expressions refer to it for its value, or to call it.

Writes int

How many expressions write to it (AssignmentTarget).

PassedAsArguments int

How many expressions pass it as an argument of a call (PassedAsArgument).

Remarks

These are the references, all of them: a count is only ever stated for a declaration that nothing outside the code the pass analyzed can refer to (References). An expression that is passed as an argument is a reference of its own kind, because what it does is not what the expression says: the procedure it is passed to may read it, write to it, or both, when its parameter is ByRef.

Properties

PassedAsArguments

How many expressions pass it as an argument of a call (PassedAsArgument).

public int PassedAsArguments { get; init; }

Property Value

int

Reads

How many expressions refer to it for its value, or to call it.

public int Reads { get; init; }

Property Value

int

Total

The number of references of any kind.

public int Total { get; }

Property Value

int

Writes

How many expressions write to it (AssignmentTarget).

public int Writes { get; init; }

Property Value

int