Uses of Class
org.ek9lang.compiler.ir.instructions.IRConstruct
Packages that use IRConstruct
Package
Description
B - For the EK9 compiler itself.
Backend Code Generation - Target-specific code generation infrastructure.
JVM Bytecode Generation - Transforms EK9 IR into JVM bytecode.
Common parts of processing that can be reused across various phases.
K - Intermediate Representation Generation.
M - Intermediate Representation Analysis and Optimization.
-
Uses of IRConstruct in org.ek9lang.compiler
Methods in org.ek9lang.compiler that return types with arguments of type IRConstructMethods in org.ek9lang.compiler with parameters of type IRConstructModifier and TypeMethodDescriptionvoidIRModule.add(IRConstruct node) Adds a new construct operation node (i.e. -
Uses of IRConstruct in org.ek9lang.compiler.backend
Classes in org.ek9lang.compiler.backend that implement interfaces with type arguments of type IRConstructModifier and TypeClassDescriptionclassGiven a TargetArchitecture from the configFlags, this function will provide a function that NAMES the File for a Construct.Methods in org.ek9lang.compiler.backend that return IRConstructModifier and TypeMethodDescriptionConstructTargetTuple.construct()Returns the value of theconstructrecord component.Methods in org.ek9lang.compiler.backend that return types with arguments of type IRConstructConstructors in org.ek9lang.compiler.backend with parameters of type IRConstructModifierConstructorDescriptionConstructTargetTuple(IRConstruct construct, String relativeFileName, CompilerFlags compilerFlags, File targetFile, int moduleTotalCoverageProbeCount, Map<String, String> typeHierarchy, ConstructOutputSink sink) Creates an instance of aConstructTargetTuplerecord class. -
Uses of IRConstruct in org.ek9lang.compiler.backend.jvm
Classes in org.ek9lang.compiler.backend.jvm that implement interfaces with type arguments of type IRConstructModifier and TypeClassDescription(package private) final classTHE test of whether a construct is an abstract TEXT base type (not a locale-specific variant).(package private) final classTHE test of whether a construct is a TEXT locale-specific variant (e.g., Greeting_en, Greeting_de).final classReturns File Object in the appropriate location for jvm output.Methods in org.ek9lang.compiler.backend.jvm with parameters of type IRConstructModifier and TypeMethodDescriptionOutputFileAccess.apply(IRConstruct construct, String projectDotEK9Directory) (package private) Ek9MethodKindMethodKindClassifier.classifyConstructor(IRConstruct construct, OperationInstr operation) Classify a general constructor funnel emission.(package private) Ek9MethodKindMethodKindClassifier.classifyMethod(IRConstruct construct, OperationInstr operation) Classify a general (non-ctor, non-_c_init/_i_init/_main) funnel method.voidSmapGenerator.collectFromIRConstruct(IRConstruct construct) Collect all debug information from IR construct operations.(package private) StringSuperConstructorAsmGenerator.determineSuperclassName(IRConstruct construct) Determine the JVM superclass name for a construct.(package private) voidAnyComparisonBridgeAsmGenerator.generate(org.objectweb.asm.ClassWriter classWriter, IRConstruct construct, MethodKindTable methodKindTable) (package private) voidCovariantBridgeAsmGenerator.generate(org.objectweb.asm.ClassWriter classWriter, IRConstruct construct, MethodKindTable methodKindTable) (package private) voidEqualsHashCodeBridgeAsmGenerator.generate(org.objectweb.asm.ClassWriter classWriter, IRConstruct construct, MethodKindTable methodKindTable) (package private) voidFunctionSingletonAsmGenerator.generateGetInstanceMethod(org.objectweb.asm.ClassWriter classWriter, IRConstruct construct, MethodKindTable methodKindTable) Generate static getInstance() method for function singleton pattern.(package private) voidFunctionSingletonAsmGenerator.generateSingletonField(org.objectweb.asm.ClassWriter classWriter, IRConstruct construct) Generate static INSTANCE field for function singleton pattern.(package private) voidFunctionSingletonAsmGenerator.generateSingletonInit(org.objectweb.asm.MethodVisitor mv, IRConstruct construct) Emit the singleton construction into the static initializer:INSTANCE = new FunctionType();(package private) voidTextSubsystemAsmGenerator.generateTextBaseNoArgConstructor(IRConstruct construct, MethodKindTable methodKindTable) (package private) voidTextSubsystemAsmGenerator.generateTextFactoryMethod(IRConstruct construct, MethodKindTable methodKindTable) Generate a static _textFactory(String) method on the abstract TEXT base class.(package private) voidSuperConstructorAsmGenerator.injectSuperConstructorCall(org.objectweb.asm.MethodVisitor mv, IRConstruct construct) Inject appropriate super constructor call for the construct.(package private) booleanMethodKindClassifier.isScenario2Wrapper(IRConstruct construct) A Scenario-2 wrapper: a parameterised type whose GENERIC template is externally implemented (a built-in generic likeList/Optional/Dictparameterised with a user type).(package private) booleanSuperConstructorAsmGenerator.needsSuperCallInjected(IRConstruct construct) Check if construct needs a super constructor call injected.booleanIsTextBaseConstruct.test(IRConstruct construct) booleanIsTextLocaleVariant.test(IRConstruct construct) voidOutputVisitor.visit(IRConstruct construct) Method parameters in org.ek9lang.compiler.backend.jvm with type arguments of type IRConstructModifier and TypeMethodDescriptionvoidConstantsClassGenerator.generate(String moduleName, List<IRConstruct> constants, File outputDirectory) Generate the _Constants.class file for a module. -
Uses of IRConstruct in org.ek9lang.compiler.backend.llvm
Classes in org.ek9lang.compiler.backend.llvm that implement interfaces with type arguments of type IRConstructModifier and TypeClassDescriptionfinal classCreates the File Object in the appropriate location for llvm output.Methods in org.ek9lang.compiler.backend.llvm with parameters of type IRConstructModifier and TypeMethodDescriptionOutputFileAccess.apply(IRConstruct construct, String projectDotEK9Directory) -
Uses of IRConstruct in org.ek9lang.compiler.common
Methods in org.ek9lang.compiler.common with parameters of type IRConstructModifier and TypeMethodDescriptiondefault voidINodeVisitor.visit(IRConstruct construct) voidNodePrinter.visit(IRConstruct construct) -
Uses of IRConstruct in org.ek9lang.compiler.phase7
Classes in org.ek9lang.compiler.phase7 that implement interfaces with type arguments of type IRConstructModifier and TypeClassDescription(package private) final classCreates the appropriate IR Construct for an application declaration.(package private) final classCreates the appropriate IR Construct for a class declaration.(package private) final classCreates the appropriate IR Construct for a component declaration.(package private) final classCreates the appropriate IR Construct for a constant declaration.(package private) final classCreates the appropriate IR Construct for a constrained type declaration.final classCreates the appropriate IR Construct for a dynamic class declaration (anonymous inline class).final classCreates the appropriate IR Construct for a dynamic function (anonymous closure).(package private) final classCreates the appropriate IR Construct for an enumeration declaration.(package private) final classCreates the appropriate IR Construct for a standalone function.(package private) final classCreates the appropriate IR Construct for an Aggregate of type 'program'.(package private) final classCreates the appropriate IR Construct for a record declaration.(package private) final classCreates the appropriate IR Construct for a service declaration.(package private) final classCreates the IR Construct for the abstract base text class.(package private) final classCreates the appropriate IR Construct for a text declaration.(package private) final classCreates the appropriate IR Construct for a trait declaration.Methods in org.ek9lang.compiler.phase7 that return IRConstructModifier and TypeMethodDescriptionApplicationDfnGenerator.apply(EK9Parser.ApplicationDeclarationContext ctx) ClassDfnGenerator.apply(EK9Parser.ClassDeclarationContext ctx) ComponentDfnGenerator.apply(EK9Parser.ComponentDeclarationContext ctx) ConstantDfnGenerator.apply(EK9Parser.ConstantDeclarationContext ctx) ConstrainedTypeDfnGenerator.apply(EK9Parser.TypeDeclarationContext ctx) DynamicClassDfnGenerator.apply(AggregateWithTraitsSymbol symbol, EK9Parser.DynamicClassDeclarationContext ctx) DynamicFunctionDfnGenerator.apply(FunctionSymbol functionSymbol, EK9Parser.DynamicFunctionDeclarationContext ctx) EnumerationDfnGenerator.apply(EK9Parser.TypeDeclarationContext ctx) FunctionDfnGenerator.apply(EK9Parser.FunctionDeclarationContext ctx) ProgramDfnGenerator.apply(EK9Parser.MethodDeclarationContext ctx) RecordDfnGenerator.apply(EK9Parser.RecordDeclarationContext ctx) ServiceDfnGenerator.apply(EK9Parser.ServiceDeclarationContext ctx) TextBaseDfnGenerator.apply(AggregateSymbol baseTextSymbol) TextDfnGenerator.apply(EK9Parser.TextDeclarationContext ctx) TraitDfnGenerator.apply(EK9Parser.TraitDeclarationContext ctx) Scenario2WrapperIRGenerator.generate(PossibleGenericSymbol parameterizedType) Generate the complete IR construct for a Scenario 2 delegation wrapper.Scenario3SourceIRGenerator.generate(PossibleGenericSymbol parameterizedType) Generate the complete IR construct for a Scenario 3 user-defined parameterized type.protected IRConstructAggregateDfnGenerator.processAggregate(AggregateSymbol aggregateSymbol, EK9Parser.AggregatePartsContext ctx) An aggregate whose members are declared in itsaggregateParts(a class, record, trait or component, or a monomorphised copy of one): those parts also hold the property initialisers of its_i_init.protected IRConstructAggregateDfnGenerator.processAggregate(AggregateSymbol aggregateSymbol, EK9Parser.AggregatePartsContext propertiesCtx, OperationBodyLocator bodies) THE construct skeleton of an aggregate: traits, fields,_c_init,_i_init(frompropertiesCtx, null when the aggregate has no property initialisers to run), then every method and operator - each written body found throughbodies, everything else synthesised.Methods in org.ek9lang.compiler.phase7 with parameters of type IRConstructModifier and TypeMethodDescriptionprotected voidAbstractDfnGenerator.createEmptyInitOperation(IRConstruct construct, IScope scope, String methodName) THE empty init operation (_c_initor_i_init): nothing to do but return, as for a program, an application, a dynamic function's instance init (its captures are constructor arguments) and the abstract text base.protected voidAggregateDfnGenerator.createFieldDeclarations(IRConstruct construct, AggregateSymbol aggregateSymbol) Create field declarations using AggregateSymbol.getProperties().protected voidAggregateDfnGenerator.createInitializationOperations(IRConstruct construct, AggregateSymbol aggregateSymbol, EK9Parser.AggregatePartsContext ctx) Create the three-phase initialization operations for the class: 1.protected voidAbstractDfnGenerator.createInitOperation(IRConstruct construct, IScope aggregateSymbol, ISymbol superType) Create _c_init operation for class/static initialization.protected voidAbstractDfnGenerator.createInstanceInitOperation(IRConstruct construct, IScope symbol, EK9Parser.AggregatePartsContext ctx) Create _i_init operation for instance initialization.protected voidAggregateDfnGenerator.createOperationsForAggregateParts(IRConstruct construct, AggregateSymbol aggregateSymbol, OperationBodyLocator bodies) (package private) voidScenario2EqualityGenerator.generate(IRConstruct construct, MethodSymbol method) Generate an equality operation that handles wrapper-to-wrapper comparison.(package private) voidScenario2FunctionWrapperGenerator.generate(IRConstruct construct, FunctionSymbol functionSymbol, String baseTypeName) Generate all operations for a FunctionSymbol wrapper.(package private) voidScenario2AggregateWrapperGenerator.generateConstructorOperation(IRConstruct construct, MethodSymbol method, String baseTypeName) Generate constructor that creates the delegate instance.(package private) voidScenario2AggregateWrapperGenerator.generateDelegationOperation(IRConstruct construct, MethodSymbol method, String baseTypeName) Generate a delegation operation for a single method.(package private) voidScenario2AggregateWrapperGenerator.generateFunctionAcceptingMethod(IRConstruct construct, MethodSymbol method, String baseTypeName) Generate inline implementation for methods that accept function wrapper types.(package private) voidScenario2AggregateWrapperGenerator.generateIsSetAsHasNext(IRConstruct construct, MethodSymbol method) An Iterator wrapper's?:this.hasNext(), dispatched, as the baseIterator's own is.(package private) voidScenario2AggregateWrapperGenerator.generateWrappingConstructor(IRConstruct construct, AggregateSymbol aggregateSymbol, String baseTypeName) Generate wrapping constructor that takes the base type as parameter. -
Uses of IRConstruct in org.ek9lang.compiler.phase7.generator
Method parameters in org.ek9lang.compiler.phase7.generator with type arguments of type IRConstructModifier and TypeMethodDescription<T extends ICanCaptureVariables & ISymbol>
List<IRInstr> DynamicConstructEmitter.emit(T dynamicSymbol, Function<IRGenerationContext, IRConstruct> generate, EK9Parser.DynamicVariableCaptureContext captureCtx, DebugInfo debugInfo, String resultVariable, Function<List<ISymbol>, CallMetaDataDetails> metaData) Emit the dynamic construct and the instructions that construct it. -
Uses of IRConstruct in org.ek9lang.compiler.phase7.support
Methods in org.ek9lang.compiler.phase7.support with parameters of type IRConstructModifier and TypeMethodDescriptionvoidConstructFieldDeclarations.addCapturesTo(IRConstruct construct, IRGenerationContext stackContext, ICanCaptureVariables canCaptureVariables) Declare the captured variables of a function (or anything that captures) as fields onconstruct.voidCycleGuardOwner.addIfNeeded(IRConstruct construct, IScope scope, IRInstructionBuilder cInitBuilder, DebugInfo debugInfo, Ek9Types ek9Types) THE step every_c_initgenerator calls (there are two:AbstractDfnGeneratorandScenario3SourceIRGeneratorfor a developer's parameterised generic): when the type's generated operators are guarded, declare the constant on the construct and make it in the_c_initbeing built.voidConstructFieldDeclarations.addPropertiesAndCapturesTo(IRConstruct construct, IRGenerationContext stackContext, AggregateSymbol aggregateSymbol) Declare the fields of an aggregate onconstruct: each property, then each captured variable.voidCycleGuardOwner.declare(IRConstruct construct, DebugInfo debugInfo, Ek9Types ek9Types) Declare the static field on the construct (not traced: it holds a constant that lives as long as the type).Constructors in org.ek9lang.compiler.phase7.support with parameters of type IRConstruct -
Uses of IRConstruct in org.ek9lang.compiler.phase9
Classes in org.ek9lang.compiler.phase9 that implement interfaces with type arguments of type IRConstructModifier and TypeClassDescriptionfinal classTHE static acyclicity of a generated aggregate for the cycle collector (EK9_NATIVE_CYCLE_COLLECTOR_DESIGN.md §4.2, §12.2 items 4-5, §14.2 S3).final classTHE callback-reachable operations of a program: those the runtime may call - directly, or through other operations - while one of its C frames is live below them (EK9_NATIVE_CYCLE_COLLECTOR_DESIGN.md §14.3).final classTHE placement ofCANCEL_POINT(EK9_BACKEND_IR_CONTRACTS.md Contract 24): an IR_OPTIMISATION pass over the ownership form, run afterSafePointPlacement, which states which operations arecallback-reachable.final classV-C (EK9_BACKEND_IR_CONTRACTS.md Contract 24), over the placed IR beside V-S: aCANCEL_POINTonly in an operationCancelPointPlacement.isPlacedIn(OperationInstr)accepts - never in code no async task can run, nor in a class initialiser - and in every such operation at the end of every loop body (BackEdgePoints.isLoopBody(CompositeInstr.NestedList)), so no loop a task runs can keep it from stopping.(package private) final classTHE findings of a per-body ownership check over every operation of a construct, each as"operation: problem", in operation order; an operation with no body has none.final classTHE borrow rule of the ownership form, V-I (EK9_IR_OWNERSHIP_MODEL.md §8, EK9_IR_OWNERSHIP_STAGE4_DESIGN.md §6): no borrowed value is used after its source may have let it go.final classTHE per-path rules of the ownership form (EK9_IR_OWNERSHIP_STAGE4_DESIGN.md): V-A - every OWNED value is consumed exactly once on every path to a normal exit and to every exceptional exit - and V-J - a path that ends in a Panic owes nothing.final classTHE local rules of the ownership form (EK9_IR_OWNERSHIP_MODEL.md §11.2; stage-1 design §7) - the ones that need only the structured lists, not a per-path analysis: V-C only an OWNED value is consumed, not twice in one straight list, and a value MOVED on a path (byDROPor a[consume]assignment) is not used after it on that path - its count now belongs to where it went, which may release it (Swift's use-after-move rule); V-D aCASTforwards its operand's kind, and consumes an OWNED operand; V-E the arms of a chain hand back values of one kind; V-FDROP_AT_EXITnames a scope open in the current activation (the A11 rule); V-G a slot's owner is open (or the CALLER or OBJECT) where the slot is first filled - its declaration, or its first[init]assignment when it is declared before its owner is entered (Contract 3: a try's resources and its region's first failure) - a slot is declared once per activation, and a slot is never itself dropped; V-H a consumed argument is consumed by its call; an unmanaged result carries no count; V-M the IR is in the ownership form ONLY:RETAIN,RELEASE,RELEASE_FIELDandSCOPE_REGISTERareOwnershipLowering's output, never phase 7's, andREFERENCE/TYPED_REFERENCEdeclares only a compiler temporary that holds no count of its own - every named variable is aSLOT_DECLAREwith its owner (stage 3).final classTHEPublishedValuesof a whole program (S2b): the registered-type fact by name - every aggregate the program knows, core ones included (aList of Stringa registered component holds is registered; one nothing published reaches is not), and every construct in its IR, read throughIsRegisteredType- failing closed for a name it does not know; andCalleeOfCallover the program's constructs and module-level symbols (a parameterisation such as_List_<digest>is found there, not by a search for its name), then a fully qualified search.final classTHE placement ofPUBLISH(EK9_NATIVE_CYCLE_COLLECTOR_DESIGN.md §13.11, S2): an IR_OPTIMISATION pass afterSafePointPlacement, over the ownership form, before the lowering.final classV-P (EK9_NATIVE_CYCLE_COLLECTOR_DESIGN.md §13.11, S2 and S2b), two checks over every operation: exact: each instruction is immediately preceded by exactly thePUBLISHesPublishedValuessays, in order, holders included; and everyPUBLISHis one of those.final classTHE placement ofSAFE_POINT(EK9_NATIVE_CYCLE_COLLECTOR_DESIGN.md §14.4, S2): the first IR_OPTIMISATION pass, over the ownership form, before the lowering.final classV-S (EK9_NATIVE_CYCLE_COLLECTOR_DESIGN.md §14.5): aSAFE_POINTonly in an operation that is not callback-reachable - a collection under a runtime frame could free what that frame holds uncounted.Methods in org.ek9lang.compiler.phase9 with parameters of type IRConstructModifier and TypeMethodDescriptionCancelPointVerifier.apply(IRConstruct construct) OwnershipBorrowVerifier.apply(IRConstruct construct) The V-I findings of every operation of a construct, as"operation: problem".OwnershipPathVerifier.apply(IRConstruct construct) The per-path findings of every operation of a construct, as"operation: problem"; empty when every path of every operation keeps V-A.OwnershipVerifier.apply(IRConstruct construct) THE check of a construct in the ownership form (IR_ANALYSIS, and every IR fixture): each operation's problems as"operation: problem"; empty when every operation keeps every local rule.PublishVerifier.apply(IRConstruct construct) SafePointVerifier.apply(IRConstruct construct) voidOwnershipLowering.lower(IRConstruct construct) Lower every operation of a construct, then verify the lowered construct (V-L).(package private) PublishedValues.WherePublishedValues.of(IRConstruct construct, OperationInstr operation) Where the instructions of this operation of this construct are.booleanAcyclicTypes.test(IRConstruct construct) Is every objectconstructallocates proven never to lie on a reference cycle.RetainReleaseBalanceVerifier.verify(IRConstruct construct) Verify every operation body in the construct and return all findings (empty when balanced).(package private) List<RetainReleaseBalanceVerifier.Finding> RetainReleaseBalanceVerifier.verify(IRConstruct construct, Function<OperationInstr, Set<String>> movedOut) Verify a LOWERED construct: asRetainReleaseBalanceVerifier.verify(IRConstruct), told for each operation the variables its ownership form moved out of (MovedOutOf).Method parameters in org.ek9lang.compiler.phase9 with type arguments of type IRConstructModifier and TypeMethodDescriptionvoidCancelPointPlacement.accept(Collection<IRConstruct> constructs) voidPublishPlacement.accept(Collection<IRConstruct> constructs) voidSafePointPlacement.accept(Collection<IRConstruct> constructs) CallbackReachableOperations.apply(Collection<IRConstruct> constructs) ProgramPublishedValues.apply(CompilableProgram program, Collection<IRConstruct> constructs) CallbackReachableOperations.callEdges(Collection<IRConstruct> constructs) THE call edges of a program as this analysis follows them: for each operation, the operations a CALL in it may run - the named type's operations of that name, and for a virtual or trait call the same name on every type below it.