Record Class JavaClassIr

java.lang.Object
java.lang.Record
org.kink_lang.kink.internal.compile.javaclassir.JavaClassIr
Record Components:
valFieldCount - the number of val fields which capture free vars or the enclosing binding.
doResumeInsns - the insns of doResume method.
traces - the traces.
desc - the desc of the fun.
childJcirFactories - the factories of the IRs of child funs.

public record JavaClassIr(int valFieldCount, List<Insn> doResumeInsns, Map<Integer,Trace> traces, String desc, List<JcirFactory> childJcirFactories) extends Record
The IR of the generated fun in the precursor form of a Java class.
  • Field Details

    • TYPE_BASE

      public static final org.objectweb.asm.Type TYPE_BASE
      The base name of the generated class. Note that suffix is added to the class name when the class is defined by defineHiddenClass.
  • Constructor Details

    • JavaClassIr

      public JavaClassIr(int valFieldCount, List<Insn> doResumeInsns, Map<Integer,Trace> traces, String desc, List<JcirFactory> childJcirFactories)
      Constructs an IR.
      Parameters:
      valFieldCount - the number of val fields which capture free vars or the enclosing binding.
      doResumeInsns - the insns of doResume method.
      traces - the traces.
      desc - the desc of the fun.
      childJcirFactories - the factories of the IRs of child funs.
  • Method Details

    • dataStackUsageUpperBound

      public int dataStackUsageUpperBound()
      Returns the upper bound of data stack usage within the fun not including spreading.
      Returns:
      the upper bound of data stack usage within the fun not including spreading.
    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      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.
    • valFieldCount

      public int valFieldCount()
      Returns the value of the valFieldCount record component.
      Returns:
      the value of the valFieldCount record component
    • doResumeInsns

      public List<Insn> doResumeInsns()
      Returns the value of the doResumeInsns record component.
      Returns:
      the value of the doResumeInsns record component
    • traces

      public Map<Integer,Trace> traces()
      Returns the value of the traces record component.
      Returns:
      the value of the traces record component
    • desc

      public String desc()
      Returns the value of the desc record component.
      Returns:
      the value of the desc record component
    • childJcirFactories

      public List<JcirFactory> childJcirFactories()
      Returns the value of the childJcirFactories record component.
      Returns:
      the value of the childJcirFactories record component