Record Class FunctionLockSummary

java.lang.Object
java.lang.Record
org.ek9lang.compiler.phase5.lockanalysis.FunctionLockSummary
Record Components:
function - the function/method symbol this summary describes.
directEnters - enter() sites lexically inside this function's body.
directKeyBodies - MutexKey bodies lexically inside this function's body.
mayEnter - transitive enter records reachable from this function through the call graph (populated by Phase C.2).

public record FunctionLockSummary(ISymbol function, List<EnterCallSite> directEnters, List<MutexKeyBody> directKeyBodies, Set<TransitiveEnterRecord> mayEnter) extends Record
Per-function summary of lock activity.

directEnters and directKeyBodies are populated by Phase B.1's AST walk — everything visible inside this function's own body. mayEnter is populated by Phase C.2's inter-procedural SCC fixpoint and represents everything reachable transitively, including parameter-substituted identities and composed edge kinds.

  • Constructor Details

  • Method Details

    • empty

      public static FunctionLockSummary empty(ISymbol function)
      Convenience factory producing an empty summary backed by mutable collections. Phase B.1's AST walk populates directEnters/directKeyBodies; Phase C.2 populates mayEnter.
    • 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.
    • function

      public ISymbol function()
      Returns the value of the function record component.
      Returns:
      the value of the function record component
    • directEnters

      public List<EnterCallSite> directEnters()
      Returns the value of the directEnters record component.
      Returns:
      the value of the directEnters record component
    • directKeyBodies

      public List<MutexKeyBody> directKeyBodies()
      Returns the value of the directKeyBodies record component.
      Returns:
      the value of the directKeyBodies record component
    • mayEnter

      public Set<TransitiveEnterRecord> mayEnter()
      Returns the value of the mayEnter record component.
      Returns:
      the value of the mayEnter record component