Record Class AllocationSet

java.lang.Object
java.lang.Record
org.kink_lang.kink.internal.compile.javaclassir.AllocationSet
Record Components:
recv - the set of local vars containing recv.
args - the mapping from local vars to arg indexes.
control - the local vars of preloaded control funs.
field - vars stored in fields of the fun val.
stack - vars stored in stack.

public record AllocationSet(Set<LocalVar> recv, Map<LocalVar,Integer> args, Set<LocalVar> control, List<LocalVar> field, List<LocalVar> stack) extends Record
Allocation analysis of localvars in a fast fun.
  • Constructor Details

    • AllocationSet

      public AllocationSet(Set<LocalVar> recv, Map<LocalVar,Integer> args, Set<LocalVar> control, List<LocalVar> field, List<LocalVar> stack)
      Creates an instance of a AllocationSet record class.
      Parameters:
      recv - the value for the recv record component
      args - the value for the args record component
      control - the value for the control record component
      field - the value for the field record component
      stack - the value for the stack record component
  • Method Details

    • get

      public Allocation get(LocalVar lvar)
      Gets the allocation of the lvar.
      Parameters:
      lvar - the local var.
      Returns:
      the allocation of the lvar.
    • valCaptureControlOverridden

      public static AllocationSet valCaptureControlOverridden(UsedDefinedVars vars)
      Analyzes the vars as of the val-capture fast fun for the case a local var of a control fun is overridden on the top level.
      Parameters:
      vars - of the val-capture fast fun.
      Returns:
      the analysis.
    • valCaptureControlUnchanged

      public static AllocationSet valCaptureControlUnchanged(UsedDefinedVars vars)
      Analyzes the vars as of the val-capture fast fun for the case that no local var of a control fun is NOT overridden on the top level.
      Parameters:
      vars - of the val-capture fast fun.
      Returns:
      the analysis.
    • bindingCaptureControlOverridden

      public static AllocationSet bindingCaptureControlOverridden(UsedDefinedVars vars)
      Analyzes the vars as of the binding-capture fast fun for the case a local var of a control fun is overridden on the top level.
      Parameters:
      vars - of the binding-capture fast fun.
      Returns:
      the analysis.
    • bindingCaptureControlUnchanged

      public static AllocationSet bindingCaptureControlUnchanged(UsedDefinedVars vars)
      Analyzes the vars as of the binding-capture fast fun for the case a local var of a control fun is NOT overridden on the top level.
      Parameters:
      vars - of the binding-capture fast fun.
      Returns:
      the analysis.
    • 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.
    • recv

      public Set<LocalVar> recv()
      Returns the value of the recv record component.
      Returns:
      the value of the recv record component
    • args

      public Map<LocalVar,Integer> args()
      Returns the value of the args record component.
      Returns:
      the value of the args record component
    • control

      public Set<LocalVar> control()
      Returns the value of the control record component.
      Returns:
      the value of the control record component
    • field

      public List<LocalVar> field()
      Returns the value of the field record component.
      Returns:
      the value of the field record component
    • stack

      public List<LocalVar> stack()
      Returns the value of the stack record component.
      Returns:
      the value of the stack record component