Record Class PlaceholderToken

java.lang.Object
java.lang.Record
org.ek9lang.compiler.phase5.flow.PlaceholderToken
Record Components:
paramFqn - fully-qualified name of the parameter symbol — uniquely identifies "parameter N of function F" across the program even if multiple functions share the same parameter name.

public record PlaceholderToken(String paramFqn) extends Record
Symbolic identity for a MutexLock parameter whose underlying object is unknown until resolved at a specific call site.

Used by LockIdentityValue as one of its two identity-token variants (the other being an opaque Object reference for allocation tokens). Equality is structural on paramFqn — two placeholders for the same parameter, minted at different times or in different inference instances, must compare equal so the mayEnter fixpoint sees consistent identities across call-graph propagation passes.

Resolution happens during inter-procedural propagation (InterproceduralLockAnalyzer): when a record carrying a placeholder identity is composed into a caller's mayEnter, the propagator looks up the call-edge's argument binding for the placeholder's paramFqn and substitutes whatever caller-side identity the argument resolved to. The placeholder is the static-analysis analogue of "fill this slot when you push the next stack frame."

  • Constructor Details

    • PlaceholderToken

      public PlaceholderToken(String paramFqn)
      Creates an instance of a PlaceholderToken record class.
      Parameters:
      paramFqn - the value for the paramFqn record component
  • Method Details

    • 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.
    • paramFqn

      public String paramFqn()
      Returns the value of the paramFqn record component.
      Returns:
      the value of the paramFqn record component