Record Class DeclarationParts
java.lang.Object
java.lang.Record
org.ek9lang.compiler.phase7.generator.DeclarationParts
- Record Components:
declaration- the declarations, in orderinitialisation- the value production, in order
public record DeclarationParts(List<IRInstr> declaration, List<IRInstr> initialisation)
extends Record
A variable declaration's instructions as its two halves, known where they are generated: the DECLARATION (the
variable's slot, and any declaration that must outlive the evaluation with it) and the INITIALISATION (everything
else - the value production). THE structured split (FLOW-14a): a try expression relocates the initialisation of its
returning variable into its guarded body by these halves, never by scanning the generated IR's opcodes.
-
Constructor Summary
ConstructorsConstructorDescriptionDeclarationParts(List<IRInstr> declaration, List<IRInstr> initialisation) Creates an instance of aDeclarationPartsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionall()The whole declaration: the declaration, then the initialisation.Returns the value of thedeclarationrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theinitialisationrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
DeclarationParts
Creates an instance of aDeclarationPartsrecord class.- Parameters:
declaration- the value for thedeclarationrecord componentinitialisation- the value for theinitialisationrecord component
-
-
Method Details
-
all
-
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). -
declaration
Returns the value of thedeclarationrecord component.- Returns:
- the value of the
declarationrecord component
-
initialisation
Returns the value of theinitialisationrecord component.- Returns:
- the value of the
initialisationrecord component
-