Table of Contents

Constructor CustomMaterializationUnit

Namespace
Ubiquity.NET.Llvm.OrcJITv2
Assembly
Ubiquity.NET.Llvm.dll

CustomMaterializationUnit(LazyEncodedString, MaterializationAction, IReadOnlyCollection<KeyValuePair<SymbolStringPoolEntry, SymbolFlags>>, SymbolStringPoolEntry?)

Initializes a new instance of the CustomMaterializationUnit class.

public CustomMaterializationUnit(LazyEncodedString name, MaterializationAction materializeAction, IReadOnlyCollection<KeyValuePair<SymbolStringPoolEntry, SymbolFlags>> symbols, SymbolStringPoolEntry? initSymbol = null)

Parameters

name LazyEncodedString

Name of this instance

materializeAction MaterializationAction

Action to perform to materialize the symbol

symbols IReadOnlyCollection<KeyValuePair<SymbolStringPoolEntry, SymbolFlags>>

symbols the materializer works on

initSymbol SymbolStringPoolEntry

Symbol of static initializer (if any)

CustomMaterializationUnit(LazyEncodedString, MaterializationAction, DiscardAction?, IReadOnlyCollection<KeyValuePair<SymbolStringPoolEntry, SymbolFlags>>, SymbolStringPoolEntry?)

Initializes a new instance of the CustomMaterializationUnit class.

public CustomMaterializationUnit(LazyEncodedString name, MaterializationAction materializeAction, DiscardAction? discardAction, IReadOnlyCollection<KeyValuePair<SymbolStringPoolEntry, SymbolFlags>> symbols, SymbolStringPoolEntry? initSymbol = null)

Parameters

name LazyEncodedString

Name of this instance

materializeAction MaterializationAction

Action to perform to materialize the symbol

discardAction DiscardAction

Action to perform when the JIT discards/replaces a symbol

symbols IReadOnlyCollection<KeyValuePair<SymbolStringPoolEntry, SymbolFlags>>

symbols the materializer works on

initSymbol SymbolStringPoolEntry

Symbol of static initializer (if any)

Remarks

This implementation will maintain the lifetime of the provided delegates via an internally allocated disposable until the materialization is completed or abandoned. If materializeAction is not called, then the discardAction is. This allows for cases where the data used by the materializeAction is not held by the action itself or needs to support early disposal instead of remaining at the whims of the GC.