Module aya.base

Record Class ResolveInfo

java.lang.Object
java.lang.Record
org.aya.resolve.ResolveInfo
Record Components:
primFactory - (global) all primitives shared among all modules in a compilation task.
shapeFactory - (scoped per file/ResolveInfo) CodeShape that are discovered during tycking this module, modified by tycker.
opSet - (scoped per file/ResolveInfo) binary operators.
opRename - rename-as-operators, only stores names that renamed in current module (and re-exported ops).
imports - modules imported using `import` command.
reExports - modules re-exported using `public open` command.
depGraph - dependency graph of definitions. for each (v, successors) in the graph, `successors` should be tycked first.

public record ResolveInfo(@NotNull ModuleContext thisModule, @NotNull kala.collection.immutable.ImmutableSeq<Stmt> program, PrimDef.Factory primFactory, AyaShape.Factory shapeFactory, @NotNull AyaBinOpSet opSet, @NotNull kala.collection.mutable.MutableMap<DefVar<?,?>,kala.tuple.Tuple3<ResolveInfo.RenamedOpDecl,BindBlock,Boolean>> opRename, @NotNull kala.collection.mutable.MutableMap<kala.collection.immutable.ImmutableSeq<String>,ResolveInfo> imports, @NotNull kala.collection.mutable.MutableMap<kala.collection.immutable.ImmutableSeq<String>,UseHide> reExports, @NotNull org.aya.util.terck.MutableGraph<TyckOrder> depGraph) extends Record
  • Constructor Details

    • ResolveInfo

      public ResolveInfo(@NotNull PrimDef.Factory primFactory, @NotNull AyaShape.Factory shapeFactory, @NotNull @NotNull AyaBinOpSet opSet, @NotNull @NotNull ModuleContext thisModule, @NotNull @NotNull kala.collection.immutable.ImmutableSeq<Stmt> thisProgram)
    • ResolveInfo

      public ResolveInfo(@NotNull PrimDef.Factory primFactory, @NotNull @NotNull ModuleContext thisModule, @NotNull @NotNull kala.collection.immutable.ImmutableSeq<Stmt> thisProgram)
    • ResolveInfo

      public ResolveInfo(@NotNull @NotNull ModuleContext thisModule, @NotNull @NotNull kala.collection.immutable.ImmutableSeq<Stmt> program, @NotNull PrimDef.Factory primFactory, @NotNull AyaShape.Factory shapeFactory, @NotNull @NotNull AyaBinOpSet opSet, @NotNull @NotNull kala.collection.mutable.MutableMap<DefVar<?,?>,kala.tuple.Tuple3<ResolveInfo.RenamedOpDecl,BindBlock,Boolean>> opRename, @NotNull @NotNull kala.collection.mutable.MutableMap<kala.collection.immutable.ImmutableSeq<String>,ResolveInfo> imports, @NotNull @NotNull kala.collection.mutable.MutableMap<kala.collection.immutable.ImmutableSeq<String>,UseHide> reExports, @NotNull @NotNull org.aya.util.terck.MutableGraph<TyckOrder> depGraph)
      Creates an instance of a ResolveInfo record class.
      Parameters:
      thisModule - the value for the thisModule record component
      program - the value for the program record component
      primFactory - the value for the primFactory record component
      shapeFactory - the value for the shapeFactory record component
      opSet - the value for the opSet record component
      opRename - the value for the opRename record component
      imports - the value for the imports record component
      reExports - the value for the reExports record component
      depGraph - the value for the depGraph record component
  • Method Details

    • renameOp

      public void renameOp(@NotNull @NotNull DefVar<?,?> defVar, @NotNull @NotNull ResolveInfo.RenamedOpDecl renamed, @NotNull @NotNull BindBlock bind, boolean definedHere)
      Parameters:
      definedHere - Is this operator renamed in this module, or publicly renamed by upstream?
      See Also:
    • open

      public void open(@NotNull @NotNull ResolveInfo other, @NotNull @NotNull org.aya.util.error.SourcePos sourcePos, @NotNull Stmt.Accessibility acc)
    • newTycker

      @NotNull public @NotNull ExprTycker newTycker(@NotNull @NotNull org.aya.util.reporter.Reporter reporter, @Nullable Trace.Builder builder)
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • thisModule

      @NotNull public @NotNull ModuleContext thisModule()
      Returns the value of the thisModule record component.
      Returns:
      the value of the thisModule record component
    • program

      @NotNull public @NotNull kala.collection.immutable.ImmutableSeq<Stmt> program()
      Returns the value of the program record component.
      Returns:
      the value of the program record component
    • primFactory

      @NotNull public PrimDef.Factory primFactory()
      Returns the value of the primFactory record component.
      Returns:
      the value of the primFactory record component
    • shapeFactory

      @NotNull public AyaShape.Factory shapeFactory()
      Returns the value of the shapeFactory record component.
      Returns:
      the value of the shapeFactory record component
    • opSet

      @NotNull public @NotNull AyaBinOpSet opSet()
      Returns the value of the opSet record component.
      Returns:
      the value of the opSet record component
    • opRename

      @NotNull public @NotNull kala.collection.mutable.MutableMap<DefVar<?,?>,kala.tuple.Tuple3<ResolveInfo.RenamedOpDecl,BindBlock,Boolean>> opRename()
      Returns the value of the opRename record component.
      Returns:
      the value of the opRename record component
    • imports

      @NotNull public @NotNull kala.collection.mutable.MutableMap<kala.collection.immutable.ImmutableSeq<String>,ResolveInfo> imports()
      Returns the value of the imports record component.
      Returns:
      the value of the imports record component
    • reExports

      @NotNull public @NotNull kala.collection.mutable.MutableMap<kala.collection.immutable.ImmutableSeq<String>,UseHide> reExports()
      Returns the value of the reExports record component.
      Returns:
      the value of the reExports record component
    • depGraph

      @NotNull public @NotNull org.aya.util.terck.MutableGraph<TyckOrder> depGraph()
      Returns the value of the depGraph record component.
      Returns:
      the value of the depGraph record component