Class NullCheckExceptionSpecification
An exception specification for an instruction parameter null check.
Inherited Members
Namespace: Flame.Compiler.Analysis
Assembly: Flame.Compiler.dll
Syntax
public sealed class NullCheckExceptionSpecification : ExceptionSpecification
Constructors
| Edit this page View SourceNullCheckExceptionSpecification(int, ExceptionSpecification)
Creates a null-check exception specification.
Declaration
public NullCheckExceptionSpecification(int parameterIndex, ExceptionSpecification nullCheckSpec)
Parameters
| Type | Name | Description |
|---|---|---|
| int | parameterIndex | The index of the instruction parameter that is null checked. |
| ExceptionSpecification | nullCheckSpec | The exception specification of the exception thrown if and when a null check fails. |
NullCheckExceptionSpecification(int, IType)
Creates a null-check exception specification.
Declaration
public NullCheckExceptionSpecification(int parameterIndex, IType exceptionType)
Parameters
| Type | Name | Description |
|---|---|---|
| int | parameterIndex | The index of the instruction parameter that is null checked. |
| IType | exceptionType | The type of exception that is thrown if and when a null check fails. |
Properties
| Edit this page View SourceCanThrowSomething
Tells if this exception specification allows for any exceptions at all to be thrown.
Declaration
public override bool CanThrowSomething { get; }
Property Value
| Type | Description |
|---|---|
| bool |
|
Overrides
| Edit this page View SourceNullCheckSpec
Gets the exception specification of the exception thrown if and when a null check fails.
Declaration
public ExceptionSpecification NullCheckSpec { get; }
Property Value
| Type | Description |
|---|---|
| ExceptionSpecification | An exception specification. |
ParameterIndex
Gets the index of the null-checked parameter,
Declaration
public int ParameterIndex { get; }
Property Value
| Type | Description |
|---|---|
| int | The index of the null-checked parameter. |
Methods
| Edit this page View SourceCanThrow(IType)
Tells if this exception specification allows for an exception of a particular type or a derived type to be thrown.
Declaration
public override bool CanThrow(IType exceptionType)
Parameters
| Type | Name | Description |
|---|---|---|
| IType | exceptionType | The type of exception to examine. |
Returns
| Type | Description |
|---|---|
| bool |
|