Record Class EscapeMetaDataDetails
java.lang.Object
java.lang.Record
org.ek9lang.compiler.ir.data.EscapeMetaDataDetails
public record EscapeMetaDataDetails(EscapeMetaDataDetails.EscapeLevel escapeLevel, EscapeMetaDataDetails.LifetimeScope lifetimeScope, Set<String> optimizationHints)
extends Record
Escape analysis metadata for IR optimisation phase.
Indicates whether values can escape their current scope and enables
backend optimizations like stack allocation instead of reference counting.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumEscape level classification.static enumLifetime scope classification. -
Constructor Summary
ConstructorsConstructorDescriptionEscapeMetaDataDetails(EscapeMetaDataDetails.EscapeLevel escapeLevel, EscapeMetaDataDetails.LifetimeScope lifetimeScope, Set<String> optimizationHints) Creates an instance of aEscapeMetaDataDetailsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.static EscapeMetaDataDetailsescapeGlobal(EscapeMetaDataDetails.LifetimeScope lifetimeScope) Creates metadata for values that escape globally.Returns the value of theescapeLevelrecord component.static EscapeMetaDataDetailsescapeParameter(EscapeMetaDataDetails.LifetimeScope lifetimeScope) Creates metadata for values that escape to parameters.final inthashCode()Returns a hash code value for this object.Returns the value of thelifetimeScoperecord component.static EscapeMetaDataDetailsnoEscape(EscapeMetaDataDetails.LifetimeScope lifetimeScope) Creates metadata for values that don't escape their scope.Returns the value of theoptimizationHintsrecord component.toString()Returns a string representation of this record class.
-
Constructor Details
-
EscapeMetaDataDetails
public EscapeMetaDataDetails(EscapeMetaDataDetails.EscapeLevel escapeLevel, EscapeMetaDataDetails.LifetimeScope lifetimeScope, Set<String> optimizationHints) Creates an instance of aEscapeMetaDataDetailsrecord class.- Parameters:
escapeLevel- the value for theescapeLevelrecord componentlifetimeScope- the value for thelifetimeScoperecord componentoptimizationHints- the value for theoptimizationHintsrecord component
-
-
Method Details
-
noEscape
Creates metadata for values that don't escape their scope. -
escapeParameter
public static EscapeMetaDataDetails escapeParameter(EscapeMetaDataDetails.LifetimeScope lifetimeScope) Creates metadata for values that escape to parameters. -
escapeGlobal
Creates metadata for values that escape globally. -
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
escapeLevel
Returns the value of theescapeLevelrecord component.- Returns:
- the value of the
escapeLevelrecord component
-
lifetimeScope
Returns the value of thelifetimeScoperecord component.- Returns:
- the value of the
lifetimeScoperecord component
-
optimizationHints
-