Record Class EnterCallSite

java.lang.Object
java.lang.Record
org.ek9lang.compiler.phase5.lockanalysis.EnterCallSite
Record Components:
stableId - wire-form identifier — derived from enclosingFunctionFqn + callLocation. Used as foreign-key value in DeadlockChain steps and TransitiveEnterRecord.
enclosingFunction - the function/method containing this call. Navigation target for "jump to the enclosing function declaration."
callLocation - source token of the enter() call expression itself. Navigation target for "jump to the enter() call site."
lockIdentityIds - FKs into LockAnalysis.identitiesById() — the set of lock identities this enter() may acquire. In the common case the set is a singleton; branch joins, polymorphic-getter resolution, and call-site argument substitution can introduce multi-element sets. C.3 iterates outer × inner cross-product when applying the deadlock verdict.
receiverDisplayForm - pre-rendered receiver expression for one-line display, e.g. "this.lockedAddressSet", "args.outerLock".
kind - EnterKind.ENTER or EnterKind.TRY_ENTER.

public record EnterCallSite(String stableId, ISymbol enclosingFunction, IToken callLocation, Set<String> lockIdentityIds, String receiverDisplayForm, EnterKind kind) extends Record
A single MutexLock.enter(...) or MutexLock.tryEnter(...) call site observed during analysis.
  • Constructor Details

    • EnterCallSite

      public EnterCallSite(String stableId, ISymbol enclosingFunction, IToken callLocation, Set<String> lockIdentityIds, String receiverDisplayForm, EnterKind kind)
      Creates an instance of a EnterCallSite record class.
      Parameters:
      stableId - the value for the stableId record component
      enclosingFunction - the value for the enclosingFunction record component
      callLocation - the value for the callLocation record component
      lockIdentityIds - the value for the lockIdentityIds record component
      receiverDisplayForm - the value for the receiverDisplayForm record component
      kind - the value for the kind record component
  • Method Details

    • singleLockIdentityId

      public String singleLockIdentityId()
      Convenience for the common singleton case. Returns the sole identity or throws if the set is empty / multi-element. Use lockIdentityIds() when iterating possibilities is required.
    • 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.
    • stableId

      public String stableId()
      Returns the value of the stableId record component.
      Returns:
      the value of the stableId record component
    • enclosingFunction

      public ISymbol enclosingFunction()
      Returns the value of the enclosingFunction record component.
      Returns:
      the value of the enclosingFunction record component
    • callLocation

      public IToken callLocation()
      Returns the value of the callLocation record component.
      Returns:
      the value of the callLocation record component
    • lockIdentityIds

      public Set<String> lockIdentityIds()
      Returns the value of the lockIdentityIds record component.
      Returns:
      the value of the lockIdentityIds record component
    • receiverDisplayForm

      public String receiverDisplayForm()
      Returns the value of the receiverDisplayForm record component.
      Returns:
      the value of the receiverDisplayForm record component
    • kind

      public EnterKind kind()
      Returns the value of the kind record component.
      Returns:
      the value of the kind record component