Class SymbolStringPoolEntry
Reference to an entry in a symbol string pool for ORC JIT v2
public sealed class SymbolStringPoolEntry : IEquatable<SymbolStringPoolEntry>, IDisposable
- Inheritance
-
SymbolStringPoolEntry
- Implements
- Inherited Members
Remarks
This holds a reference to the symbol string which is ONLY marshaled/converted to a managed string in the ToString() method. This allows comparing strings etc... without the need of conversion.
information
String conversion is lazy, so that once it is converted the managed string is cached and used as needed. Thus, the overhead of marshalling the string is realized only the first time it is needed.
important
The ref count nature of an Entry is NOT consistent across LLVM APIs and requires the caller to know the behavior of the API with respect to the ref count:
- Simple Reference. [Temporary] ownership remains with the caller
- API takes ownership. [Move] ownership is transferred to native implementation
- API performs an addref. [Native 'Clone'] ownership of original Entry remains with caller
Properties
- Name
Gets the name of this symbol
- ReadOnlySpan
Gets a readonly span for the data in this string
Methods
- AddRef()
Adds a reference count for the symbol resulting in a distinct managed instance with it's own ref count (released via Dispose())
- Dispose()
Release the reference to the string
- Equals(object?)
Determines whether the specified object is equal to the current object.
- Equals(ReadOnlySpan<byte>)
Tests if the span of characters for this string is identical to the provided span
- Equals(SymbolStringPoolEntry?)
Compares this string with another to determine if they contain the same contents
- GetHashCode()
Serves as the default hash function.
- GetHashCode(StringComparison)
Gets the hash code for the managed string
- ToString()
Gets the managed string form of the native string