Table of Contents

Class CilPurityClassifier

Namespace
Echo.Platforms.AsmResolver
Assembly
Echo.Platforms.AsmResolver.dll

Provides an implementation for the IPurityClassifier<TInstruction> interface that determines whether CIL instructions are considered pure or have side effects.

public class CilPurityClassifier : IPurityClassifier<CilInstruction>
Inheritance
CilPurityClassifier
Implements
Inherited Members

Constructors

CilPurityClassifier()

Creates a new instance of the CilPurityClassifier class.

public CilPurityClassifier()

Properties

ArrayWritePurity

Gets or sets a value indicating whether writes to arrays should be considered pure or not.

public Trilean ArrayWritePurity { get; set; }

Property Value

Trilean

DefaultFieldAccessPurity

Gets or sets a value indicating whether field read accesses should be considered pure or not by default.

public Trilean DefaultFieldAccessPurity { get; set; }

Property Value

Trilean

DefaultFieldWritePurity

Gets or sets a value indicating whether writes to field should be considered pure or not by default.

public Trilean DefaultFieldWritePurity { get; set; }

Property Value

Trilean

DefaultIndirectCallPurity

Gets or sets a value indicating whether indirect method calls should be considered pure or not by default.

public Trilean DefaultIndirectCallPurity { get; set; }

Property Value

Trilean

DefaultMethodAccessPurity

Gets or sets a value indicating whether method accesses (e.g. reading method pointers) should be considered pure or not by default.

public Trilean DefaultMethodAccessPurity { get; set; }

Property Value

Trilean

DefaultMethodCallPurity

Gets or sets a value indicating whether method calls should be considered pure or not by default.

public Trilean DefaultMethodCallPurity { get; set; }

Property Value

Trilean

DefaultTypeAccessPurity

Gets or sets a value indicating whether type access (e.g. pushing type tokens) should be considered pure or not by default.

public Trilean DefaultTypeAccessPurity { get; set; }

Property Value

Trilean

KnownImpureMethods

Gets a mutable collection of known methods that should be considered impure and guaranteed have side-effects.

public ICollection<IMethodDescriptor> KnownImpureMethods { get; }

Property Value

ICollection<IMethodDescriptor>

KnownPureMethods

Gets a mutable collection of known methods that should be considered pure.

public ICollection<IMethodDescriptor> KnownPureMethods { get; }

Property Value

ICollection<IMethodDescriptor>

LocalWritePurity

Gets or sets a value indicating whether writes to local variables should be considered pure or not.

public Trilean LocalWritePurity { get; set; }

Property Value

Trilean

PointerWritePurity

Gets or sets a value indicating whether writes to pointers should be considered pure or not.

public Trilean PointerWritePurity { get; set; }

Property Value

Trilean

Methods

IsPure(in CilInstruction)

Gets a value indicating whether a particular instruction is considered pure, that is, has no side effects.

public Trilean IsPure(in CilInstruction instruction)

Parameters

instruction CilInstruction

The instruction to classify.

Returns

Trilean

true if the instruction is pure, false if not, and Unknown if this could not be determined.