Uses of Record Class
org.ek9lang.compiler.phase7.synthesis.support.SynthesisScope
Packages that use SynthesisScope
Package
Description
Synthetic operator and method generation for EK9.
Support classes for synthetic operator IR generation.
-
Uses of SynthesisScope in org.ek9lang.compiler.phase7.synthesis
Methods in org.ek9lang.compiler.phase7.synthesis that return SynthesisScopeModifier and TypeMethodDescriptionprotected SynthesisScopeAbstractSyntheticGenerator.createSynthesisScope(ISymbol symbol, String scopeLabel) Create an SynthesisScope for the given operator symbol.AbstractSyntheticGenerator.ScopeSetup.ctx()Returns the value of thectxrecord component.Methods in org.ek9lang.compiler.phase7.synthesis with parameters of type SynthesisScopeModifier and TypeMethodDescriptionAbstractSyntheticGenerator.generateBinaryOperatorGuards(String aggregateTypeName, ISymbol aggregateType, String paramName, String unsetLabel, SynthesisScope ctx) Generate isSet guards for binary operators (this and param).AbstractSyntheticGenerator.generateBooleanBranch(String booleanVar, String label, boolean branchIfTrue, SynthesisScope ctx) Extract primitive boolean from Boolean object and branch.AbstractSyntheticGenerator.generateCycleGuardedRegion(String exitMethod, AbstractSyntheticGenerator.CycleGuardEntry entry, List<IRInstr> body, String endLabel, SynthesisScope ctx) THE guarded region of a cycle-guarded operator whose exit returns nothing (?,==,<=>): the body runs as the try of a TRY_CATCH_FINALLY with NO catches whose finally is the guard's exit, so the exit runs on every path - including an exception thrown by a field's hand-written operator, which would otherwise leave this object's entry behind and make a later call read as a cycle (Contract 13).AbstractSyntheticGenerator.generateCycleGuardEnter(String enterMethod, AggregateSymbol aggregateSymbol, String otherVar, String onBackEdgeLabel, SynthesisScope ctx) Enter the runtime cycle guard for this object (and, for a comparison, the other operand):AbstractSyntheticGenerator.generateFieldLoad(String targetVar, String objectVar, String fieldName, String ownerTypeName, String fieldTypeName, SynthesisScope ctx) Generate field load using SynthesisScope with explicit type information.AbstractSyntheticGenerator.generateIsSetGuard(String variableName, String typeName, ISymbol type, String unsetLabel, SynthesisScope ctx) Generate isSet guard check for a variable using SynthesisScope.AbstractSyntheticGenerator.generatePoisonableCycleGuardedRegion(String exitMethod, AbstractSyntheticGenerator.CycleGuardEntry entry, List<IRInstr> body, String unsetLabel, String keepLabel, SynthesisScope ctx) THE guarded region of a representation ($,$$): asAbstractSyntheticGenerator.generateCycleGuardedRegion(String, AbstractSyntheticGenerator.CycleGuardEntry, List, String, SynthesisScope), but the exit in the finally also says whether a cycle was met while the body ran.AbstractSyntheticGenerator.generateReplacingUnsetReturnBlockWithLabel(String labelName, String returnTypeName, String returnVarName, SynthesisScope ctx) AbstractSyntheticGenerator.generateUnsetReturnBlockWithLabel(String, String, String, DebugInfo, String)for a label reached with the return variable possibly holding a value - a representation poisoned by a cycle, discarding what it built (AbstractSyntheticGenerator.generatePoisonableCycleGuardedRegion(String, AbstractSyntheticGenerator.CycleGuardEntry, List, String, String, SynthesisScope)), as well as the guard's back-edge, where it is still empty: the unset value is MOVED in and REPLACES whatever is there (SLOT_ASSIGN rtn, v [consume], lowered to RELEASE rtn - null-safe - then STORE).AbstractSyntheticGenerator.generateResultReturnBlock(String labelName, String returnVarName, SynthesisScope ctx) Generate result return block using SynthesisScope.AbstractSyntheticGenerator.generateThisIsSetGuard(String aggregateTypeName, ISymbol aggregateType, String unsetLabel, SynthesisScope ctx) Generate isSet guard for 'this' using SynthesisScope.AbstractSyntheticGenerator.generateUnsetReturnBlockWithLabel(String labelName, String returnTypeName, String returnVarName, SynthesisScope ctx) Generate unset return block using SynthesisScope.AbstractSyntheticGenerator.runUnderCycleGuard(AbstractSyntheticGenerator.CycleGuardEntry guard, String exitMethod, List<IRInstr> checks, String endLabel, String resultLabel, SynthesisScope ctx) THE tail of a cycle-guarded?,==or<=>: enter the guard, runchecks(whose outcome blocks store intortnand end atendLabel) as the guarded region, then go on to the operator's result return block.Constructors in org.ek9lang.compiler.phase7.synthesis with parameters of type SynthesisScopeModifierConstructorDescriptionprotectedScopeSetup(SynthesisScope ctx, List<IRInstr> instructions) Creates an instance of aScopeSetuprecord class. -
Uses of SynthesisScope in org.ek9lang.compiler.phase7.synthesis.support
Methods in org.ek9lang.compiler.phase7.synthesis.support with parameters of type SynthesisScopeModifier and TypeMethodDescriptionSyntheticMethodCallBuilder.build(SynthesisScope ctx) Build the IR instructions for this call using a SynthesisScope context.SyntheticMethodCallBuilder.buildReturning(String returnVariable, SynthesisScope ctx) Build the call and hand its result straight to the returning variable: the result is made forrtnand nothing else, so it is moved there (OwnershipStatements.returnFresh(String, String, DebugInfo)) rather than registered with the scope and copied.SyntheticMethodCallBuilder.buildVoid(SynthesisScope ctx) Build the IR instructions for a void method call using a SynthesisScope context.PrimitiveToEk9Conversion.convert(String resultVar, String primitiveVar, String ek9TypeName, String ofParamType, SynthesisScope ctx) Build theek9Type._of(primitiveVar)static-call sequence with ARC ownership: the_offactory hands back a fresh object at +1, so the scope owns it (DROP_AT_EXIT) and nothing retains it.PrimitiveToEk9Conversion.ofCall(String resultVar, String primitiveVar, String ek9TypeName, String ofParamType, SynthesisScope ctx) THEek9Type._of(primitiveVar)static call alone, for a caller that states the result's owner itself.