Class CloseGenerator
java.lang.Object
org.ek9lang.compiler.phase7.synthesis.AbstractSyntheticGenerator
org.ek9lang.compiler.phase7.synthesis.CloseGenerator
Generates synthetic IR for
default operator close (_close): nothing but the generated close chain
(CloseChain, deciding through CloseSteps).
Void _close():
REFERENCE _first, org.ek9.lang::Exception
owned region (shape B), empty body; finally, last acquired first:
_f = LOAD_FIELD this.field / IS_NULL / skip / CALL _f._close() (each in its own protected region)
CALL (Super)super._close() (when the super class has a close)
rethrow _first when a close failed
return
The same chain a hand-written close gets after its body (OperationDfnGenerator), so the two cannot
close different fields or in a different order. A vacuous default (nothing to close and no parent close) never
gets here: it is E81070.
-
Nested Class Summary
Nested classes/interfaces inherited from class AbstractSyntheticGenerator
AbstractSyntheticGenerator.CycleGuardEntry, AbstractSyntheticGenerator.ScopeSetup -
Field Summary
Fields inherited from class AbstractSyntheticGenerator
stackContext, synthesisedCallMetaData -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongenerate(MethodSymbol operatorSymbol, AggregateSymbol aggregateSymbol) Generate the _close operator IR for the given aggregate.Methods inherited from class AbstractSyntheticGenerator
aggregateHasOperator, constructorCall, createDebugInfo, createSynthesisScope, fieldTypeHasRealOperator, generateBinaryOperatorGuards, generateBooleanBranch, generateCycleGuardedRegion, generateCycleGuardEnter, generateFieldLoad, generateFieldLoad, generateFieldSetStatusCheck, generateIsSetGuard, generateIsSetGuard, generateLabelName, generatePoisonableCycleGuardedRegion, generateResultReturnBlock, generateResultReturnBlock, generateStringLiteralLoad, generateTempName, generateThisIsSetGuard, generateThisIsSetGuard, generateUnsetReturnBlockWithLabel, generateUnsetReturnBlockWithLabel, getAnyType, getAnyTypeName, getBitsType, getBitsTypeName, getBooleanType, getBooleanTypeName, getIntegerType, getIntegerTypeName, getReturnBlockHelper, getStringType, getStringTypeName, getSuperTypeName, getSyntheticFields, getType, getTypeName, getVoidTypeName, initializeScope, initializeScopeNoReturn, isAnyType, isTraitType, methodCall, nearestSuperOperator, needsCycleGuard, rendersNothing, servingOperatorParameterTypeName, superCallOwner, superContributesRepresentation, superHasOperator
-
Constructor Details
-
CloseGenerator
CloseGenerator(IRGenerationContext stackContext)
-
-
Method Details
-
generate
Generate the _close operator IR for the given aggregate.
-