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 enum
Escape level classification.static enum
Lifetime scope classification. -
Constructor Summary
ConstructorsConstructorDescriptionEscapeMetaDataDetails
(EscapeMetaDataDetails.EscapeLevel escapeLevel, EscapeMetaDataDetails.LifetimeScope lifetimeScope, Set<String> optimizationHints) Creates an instance of aEscapeMetaDataDetails
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.static EscapeMetaDataDetails
escapeGlobal
(EscapeMetaDataDetails.LifetimeScope lifetimeScope) Creates metadata for values that escape globally.Returns the value of theescapeLevel
record component.static EscapeMetaDataDetails
escapeParameter
(EscapeMetaDataDetails.LifetimeScope lifetimeScope) Creates metadata for values that escape to parameters.final int
hashCode()
Returns a hash code value for this object.Returns the value of thelifetimeScope
record component.static EscapeMetaDataDetails
noEscape
(EscapeMetaDataDetails.LifetimeScope lifetimeScope) Creates metadata for values that don't escape their scope.Returns the value of theoptimizationHints
record 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 aEscapeMetaDataDetails
record class.- Parameters:
escapeLevel
- the value for theescapeLevel
record componentlifetimeScope
- the value for thelifetimeScope
record componentoptimizationHints
- the value for theoptimizationHints
record 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 theescapeLevel
record component.- Returns:
- the value of the
escapeLevel
record component
-
lifetimeScope
Returns the value of thelifetimeScope
record component.- Returns:
- the value of the
lifetimeScope
record component
-
optimizationHints
-