Uses of Class
org.ek9lang.compiler.symbols.PossibleGenericSymbol
Packages that use PossibleGenericSymbol
Package
Description
B - For the EK9 compiler itself.
Common parts of processing that can be reused across various phases.
G - Full Symbol Resolution can now take place.
H - Generic/Parameterised types can have their methods checked when used in specific contexts.
K - Intermediate Representation Generation.
Contains critical general components used in the
Ek9Compiler listeners.
This is the main source of EK9 Symbols used within the compiler.
-
Uses of PossibleGenericSymbol in org.ek9lang.compiler
Methods in org.ek9lang.compiler that return types with arguments of type PossibleGenericSymbolModifier and TypeMethodDescriptionResolvedOrDefineResult.symbol()Returns the value of thesymbolrecord component.Methods in org.ek9lang.compiler with parameters of type PossibleGenericSymbolModifier and TypeMethodDescriptionCompilableProgram.resolveOrDefine(PossibleGenericSymbol possibleGenericSymbol) When using generic types, the parameterised type goes into the same module namespace as the Generic Type.Constructor parameters in org.ek9lang.compiler with type arguments of type PossibleGenericSymbolModifierConstructorDescriptionResolvedOrDefineResult(Optional<PossibleGenericSymbol> symbol, boolean newlyDefined) Creates an instance of aResolvedOrDefineResultrecord class. -
Uses of PossibleGenericSymbol in org.ek9lang.compiler.common
Methods in org.ek9lang.compiler.common that return types with arguments of type PossibleGenericSymbolModifier and TypeMethodDescriptionScopeStack.traverseBackUpStackToNearestGeneric()The nearest enclosing GENERIC type or function - the one whose type parameters a body here can name.Methods in org.ek9lang.compiler.common with parameters of type PossibleGenericSymbolModifier and TypeMethodDescriptionSymbolsAndScopes.resolveOrDefine(PossibleGenericSymbol parameterisedSymbol, SemanticErrorReporter errorListener) Resolve or define a parameterised type here. -
Uses of PossibleGenericSymbol in org.ek9lang.compiler.phase3
Classes in org.ek9lang.compiler.phase3 that implement interfaces with type arguments of type PossibleGenericSymbolModifier and TypeClassDescription(package private) final classProvides the PossibleGenericSymbol type of the symbol if it has been typed, or empty.Methods in org.ek9lang.compiler.phase3 that return types with arguments of type PossibleGenericSymbolModifier and TypeMethodDescription -
Uses of PossibleGenericSymbol in org.ek9lang.compiler.phase4
Classes in org.ek9lang.compiler.phase4 that implement interfaces with type arguments of type PossibleGenericSymbolModifier and TypeClassDescription(package private) final classValidates that parameterised function call arguments are compatible with substituted parameters.(package private) final classDoes the detailed for of checking a specific possible generic symbol.Methods in org.ek9lang.compiler.phase4 with parameters of type PossibleGenericSymbolModifier and TypeMethodDescriptionvoidParameterisedFunctionCallOrError.accept(PossibleGenericSymbol possibleGenericSymbol) voidParameterisedTypeOrError.accept(PossibleGenericSymbol possibleGenericSymbol) -
Uses of PossibleGenericSymbol in org.ek9lang.compiler.phase5.construction
Methods in org.ek9lang.compiler.phase5.construction that return types with arguments of type PossibleGenericSymbolModifier and TypeMethodDescriptionParameterisations.all()Every concrete parameterisation of a developer's generic that exists in the program.Parameterisations.concreteOf(PossibleGenericSymbol generic) The concrete parameterisations of a generic, in a stable order.(package private) Optional<PossibleGenericSymbol> Parameterisations.lookup(PossibleGenericSymbol generic, List<ISymbol> arguments) The existing parameterisation of a generic with exactly these (concrete) arguments, if there is one.Methods in org.ek9lang.compiler.phase5.construction with parameters of type PossibleGenericSymbolModifier and TypeMethodDescriptionParameterisations.concreteOf(PossibleGenericSymbol generic) The concrete parameterisations of a generic, in a stable order.(package private) Optional<PossibleGenericSymbol> Parameterisations.lookup(PossibleGenericSymbol generic, List<ISymbol> arguments) The existing parameterisation of a generic with exactly these (concrete) arguments, if there is one. -
Uses of PossibleGenericSymbol in org.ek9lang.compiler.phase7
Classes in org.ek9lang.compiler.phase7 that implement interfaces with type arguments of type PossibleGenericSymbolModifier and TypeClassDescriptionfinal classDetects which monomorphization scenario applies to a parameterized type.Fields in org.ek9lang.compiler.phase7 declared as PossibleGenericSymbolModifier and TypeFieldDescription(package private) PossibleGenericSymbolScenario2WrapperHelper.parameterizedAggregateMethods in org.ek9lang.compiler.phase7 with parameters of type PossibleGenericSymbolModifier and TypeMethodDescriptionMonomorphizationScenarioDetector.apply(PossibleGenericSymbol parameterizedType) 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. -
Uses of PossibleGenericSymbol in org.ek9lang.compiler.support
Classes in org.ek9lang.compiler.support that implement interfaces with type arguments of type PossibleGenericSymbolModifier and TypeClassDescriptionclassGiven some sort of generic type a function or a type with a set of 'type parameters', create a unique internal name for that combination.classThis will just create an Aggregate/Function 'parameterized type' of the 'generic type' with the 'type arguments' But note it will have not - repeat NOT have - traversed the 'generic type' and cloned over the methods and altered all the 'T', 'K', 'V' - 'type parameters' for each of the 'type arguments' There is a separate function (TypeSubstitution) that does that.classThis will just create an Aggregate/Function 'parameterized type' of the 'generic type' with the 'type arguments' But note it will have not - repeat NOT have - traversed the 'generic type' and cloned over the methods and altered all the 'T', 'K', 'V' - 'type parameters' for each of the 'type arguments' There is a separate function (TypeSubstitution) that does that.classAccepts an aggregate or a function that has been parameterized with 'type arguments'.final classDoes a few checks on a PossibleGenericSymbol in terms of checking types and the generic type it is configured with.Methods in org.ek9lang.compiler.support that return PossibleGenericSymbolModifier and TypeMethodDescriptionParameterizedSymbolCreator.apply(PossibleGenericSymbol possibleGenericSymbol, List<ISymbol> typeArguments) TypeSubstitution.apply(PossibleGenericSymbol parameterisedSymbol) GenericInGenericData.dependent()Returns the value of thedependentrecord component.SymbolFactory.newParameterisedSymbol(PossibleGenericSymbol genericType, List<ISymbol> typeArguments) GenericInGenericData.parent()Returns the value of theparentrecord component.Methods in org.ek9lang.compiler.support that return types with arguments of type PossibleGenericSymbolModifier and TypeMethodDescriptionstatic Optional<PossibleGenericSymbol> TargetTypedConstruction.forCall(SymbolsAndScopes symbolsAndScopes, EK9Parser.CallContext call, ISymbol generic) The parameterisation a bareG()at this call is completed to from its declared target, if it has one.static Optional<PossibleGenericSymbol> TargetTypedConstruction.parameterisationOf(ISymbol generic, ISymbol target) THE strict condition: the target type is a parameterisation of exactly this generic (not a sub or super type).Methods in org.ek9lang.compiler.support with parameters of type PossibleGenericSymbolModifier and TypeMethodDescriptionvoidValidPossibleGenericSymbolOrException.accept(PossibleGenericSymbol possibleGenericSymbol) InternalNameFor.apply(PossibleGenericSymbol possibleGenericSymbol, List<ISymbol> typeArguments) ParameterizedSymbolCreator.apply(PossibleGenericSymbol possibleGenericSymbol, List<ISymbol> typeArguments) TypeSubstitution.apply(PossibleGenericSymbol parameterisedSymbol) static booleanGenericBodyReference.isDependentOf(PossibleGenericSymbol generic, ISymbol symbol) True when the symbol is a dependent reference of the generic - see the class description.SymbolFactory.newParameterisedSymbol(PossibleGenericSymbol genericType, List<ISymbol> typeArguments) ConceptualTypeReplacement.rebuild(PositionalConceptualLookupMapping.Mapping typeMapping, PossibleGenericSymbol forType, IToken triggeredByToken) Rebuild a parameterised type against concrete type arguments, unconditionally.voidTypeSubstitution.substituteLateReference(PossibleGenericSymbol genericSymbol, PossibleGenericSymbol reference) THE late generic-in-generic reference: a parameterised type that a generic's body makes by INFERENCE during FULL_RESOLUTION (List(item),[item]or{key: item}inferring aList of T) is a dependent of that generic exactly as a declaredList of Tis (phase 2 records those, before any substitution).Constructors in org.ek9lang.compiler.support with parameters of type PossibleGenericSymbolModifierConstructorDescriptionGenericInGenericData(PossibleGenericSymbol parent, PossibleGenericSymbol dependent) Creates an instance of aGenericInGenericDatarecord class.Constructor parameters in org.ek9lang.compiler.support with type arguments of type PossibleGenericSymbolModifierConstructorDescriptionConceptualTypeReplacement(BiFunction<PossibleGenericSymbol, IToken, ISymbol> onParameterisedType) Construct the replacement with the action to apply to each rebuilt parameterised type.ParameterizedSymbolCreator(BiFunction<PossibleGenericSymbol, List<ISymbol>, String> internalNameFor) TypeSubstitution(Function<PossibleGenericSymbol, ResolvedOrDefineResult> resolveOrDefine, SemanticErrorReporter errorListener) Construct a type substitutor. -
Uses of PossibleGenericSymbol in org.ek9lang.compiler.symbols
Subclasses of PossibleGenericSymbol in org.ek9lang.compiler.symbolsModifier and TypeClassDescriptionclassThis is typically a 'class' or an interface type where it can include the definitions of new properties.classAn aggregate, but one that can have zero or more traits (like interfaces).classSpecial type that is super of Aggregate and super of Function (if they don't have supers).classScope for functions that are part of a module.Methods in org.ek9lang.compiler.symbols that return PossibleGenericSymbolModifier and TypeMethodDescriptionprotected PossibleGenericSymbolPossibleGenericSymbol.cloneIntoPossibleGenericSymbol(PossibleGenericSymbol newCopy) Methods in org.ek9lang.compiler.symbols that return types with arguments of type PossibleGenericSymbolModifier and TypeMethodDescriptionICanBeGeneric.getGenericSymbolReferences()Used to keep track of any generic types/functions used in a generic type that use some or all of the generic type parameters or arguments.PossibleGenericSymbol.getGenericSymbolReferences()ICanBeGeneric.getGenericType()Not only can a class/function that implements this interface be generic in nature, they can also be a 'parameterised type'.PossibleGenericSymbol.getGenericType()PossibleGenericSymbol.getSubstitutedParameterisations()The parameterisations of this generic substituted so far - seePossibleGenericSymbol.addSubstitutedParameterisation(PossibleGenericSymbol).Methods in org.ek9lang.compiler.symbols with parameters of type PossibleGenericSymbolModifier and TypeMethodDescriptionvoidModuleScope.addGenericInGenericReference(PossibleGenericSymbol genericSymbol, PossibleGenericSymbol reference, SemanticErrorReporter errorListener) Record that a generic type or function's body makes, by INFERENCE in FULL_RESOLUTION, a parameterised type that is still conceptual in the generic's own type parameters (a generic-in-generic reference), and bring it through for every parameterisation of the generic already substituted - seeTypeSubstitution.substituteLateReference(PossibleGenericSymbol, PossibleGenericSymbol).voidICanBeGeneric.addGenericSymbolReference(PossibleGenericSymbol genericSymbolReference) Provides a mechanism to record 'dependent generic types'.voidPossibleGenericSymbol.addGenericSymbolReference(PossibleGenericSymbol genericSymbolReference) Add a reference to a parameterised function.voidPossibleGenericSymbol.addSubstitutedParameterisation(PossibleGenericSymbol parameterisation) Record a parameterisation of this generic as substituted.protected PossibleGenericSymbolPossibleGenericSymbol.cloneIntoPossibleGenericSymbol(PossibleGenericSymbol newCopy) ModuleScope.resolveOrDefine(PossibleGenericSymbol parameterisedSymbol, SemanticErrorReporter errorListener) Used when resolving or needing to define a parameterised type, like 'List of String' for example.voidPossibleGenericSymbol.setGenericType(PossibleGenericSymbol genericType) Method parameters in org.ek9lang.compiler.symbols with type arguments of type PossibleGenericSymbolModifier and TypeMethodDescriptionvoidPossibleGenericSymbol.setGenericType(Optional<PossibleGenericSymbol> genericType) Used parameterizing a generic type with type arguments.