Class LowerBox
A transform that lowers reference type creating 'box' instructions to 'newobj' instructions if possible and calls to well-known functions if not.
Inherited Members
Namespace: Flame.Clr.Transforms
Assembly: Flame.Clr.dll
Syntax
public sealed class LowerBox : IntraproceduralOptimization
Constructors
| Improve this Doc View SourceLowerBox(IAssembly)
Creates an instance of the box-lowering transform for CIL.
Declaration
public LowerBox(IAssembly corlib)
Parameters
Type | Name | Description |
---|---|---|
IAssembly | corlib | The corlib assembly. |
LowerBox(IMethod, IMethod)
Creates an instance of the box-lowering transform for CIL.
Declaration
public LowerBox(IMethod getTypeFromHandleMethod, IMethod createUninitializedObjectMethod)
Parameters
Type | Name | Description |
---|---|---|
IMethod | getTypeFromHandleMethod | A reference to a |
IMethod | createUninitializedObjectMethod | A reference to a |
LowerBox(TypeResolver)
Creates an instance of the box-lowering transform for CIL.
Declaration
public LowerBox(TypeResolver corlibResolver)
Parameters
Type | Name | Description |
---|---|---|
TypeResolver | corlibResolver | A type resolver for corlib. |
Properties
| Improve this Doc View SourceCreateUninitializedObjectMethod
Gets a reference to a GetUninitializedObject
method that
takes a type and produces a default-initialized object of that type.
Declaration
public IMethod CreateUninitializedObjectMethod { get; }
Property Value
Type | Description |
---|---|
IMethod | A method reference. |
GetTypeFromHandleMethod
Gets a reference to a GetTypeFromHandle
method that takes
a type token and produces a type.
Declaration
public IMethod GetTypeFromHandleMethod { get; }
Property Value
Type | Description |
---|---|
IMethod | A method reference. |
Methods
| Improve this Doc View SourceApply(FlowGraph)
Applies this intraprocedural optimization to a flow graph.
Declaration
public override FlowGraph Apply(FlowGraph graph)
Parameters
Type | Name | Description |
---|---|---|
FlowGraph | graph | The flow graph to transform. |
Returns
Type | Description |
---|---|
FlowGraph | A transformed flow graph. |