Class RuleBasedPrototypeExceptionSpecs
Assigns exception specifications to prototypes based on a set of user-configurable rules.
Inherited Members
Namespace: Flame.Compiler.Analysis
Assembly: Flame.Compiler.dll
Syntax
public sealed class RuleBasedPrototypeExceptionSpecs : PrototypeExceptionSpecs
Constructors
| Improve this Doc View SourceRuleBasedPrototypeExceptionSpecs()
Creates an empty set of prototype exception spec rules.
Declaration
public RuleBasedPrototypeExceptionSpecs()
RuleBasedPrototypeExceptionSpecs(RuleBasedPrototypeExceptionSpecs)
Creates a copy of another set of prototype exception spec rules.
Declaration
public RuleBasedPrototypeExceptionSpecs(RuleBasedPrototypeExceptionSpecs other)
Parameters
Type | Name | Description |
---|---|---|
RuleBasedPrototypeExceptionSpecs | other |
Fields
| Improve this Doc View SourceDefault
Gets the default prototype exception spec rules.
Declaration
public static readonly RuleBasedPrototypeExceptionSpecs Default
Field Value
Type | Description |
---|---|
RuleBasedPrototypeExceptionSpecs | The default prototype exception spec rules. |
Methods
| Improve this Doc View SourceGetExceptionSpecification(InstructionPrototype)
Gets the exception specification for a particular instruction prototype.
Declaration
public override ExceptionSpecification GetExceptionSpecification(InstructionPrototype prototype)
Parameters
Type | Name | Description |
---|---|---|
InstructionPrototype | prototype | The prototype to examine. |
Returns
Type | Description |
---|---|
ExceptionSpecification | An exception specification for |
Overrides
| Improve this Doc View SourceRegister(String, ExceptionSpecification)
Registers a function that assigns a fixed exception specification to a particular type of intrinsic.
Declaration
public void Register(string intrinsicName, ExceptionSpecification exceptionSpec)
Parameters
Type | Name | Description |
---|---|---|
System.String | intrinsicName | The name of the intrinsic to assign the exception specifications to. |
ExceptionSpecification | exceptionSpec | The exception specification for all intrinsic prototypes with
name |
Register(String, Func<IntrinsicPrototype, ExceptionSpecification>)
Registers a function that computes exception specifications for a particular type of intrinsic.
Declaration
public void Register(string intrinsicName, Func<IntrinsicPrototype, ExceptionSpecification> getExceptionSpec)
Parameters
Type | Name | Description |
---|---|---|
System.String | intrinsicName | The name of the intrinsic to compute exception specifications for. |
System.Func<IntrinsicPrototype, ExceptionSpecification> | getExceptionSpec | A function that takes an intrinsic prototype with
name |
Register<T>(ExceptionSpecification)
Maps a particular type of instruction prototype to an exception specification.
Declaration
public void Register<T>(ExceptionSpecification exceptionSpec)
where T : InstructionPrototype
Parameters
Type | Name | Description |
---|---|---|
ExceptionSpecification | exceptionSpec | The exception specification to register. |
Type Parameters
Name | Description |
---|---|
T | The type of instruction prototypes to which
|
Register<T>(Func<T, ExceptionSpecification>)
Registers a function that computes exception specifications for a particular type of instruction prototype.
Declaration
public void Register<T>(Func<T, ExceptionSpecification> getExceptionSpec)
where T : InstructionPrototype
Parameters
Type | Name | Description |
---|---|---|
System.Func<T, ExceptionSpecification> | getExceptionSpec | A function that computes exception specifications for all instruction prototypes of type T. |
Type Parameters
Name | Description |
---|---|
T | The type of instruction prototypes to which
|