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
| Improve this Doc View SourceNullCheckExceptionSpecification(Int32, ExceptionSpecification)
Creates a null-check exception specification.
Declaration
public NullCheckExceptionSpecification(int parameterIndex, ExceptionSpecification nullCheckSpec)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | 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(Int32, IType)
Creates a null-check exception specification.
Declaration
public NullCheckExceptionSpecification(int parameterIndex, IType exceptionType)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | 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
| Improve this Doc 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 |
---|---|
System.Boolean |
|
Overrides
| Improve this Doc 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 |
---|---|
System.Int32 | The index of the null-checked parameter. |
Methods
| Improve this Doc 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 |
---|---|
System.Boolean |
|