Module org.kink_lang.kink
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 Summary
Modifier and TypeFieldDescriptionstatic final org.objectweb.asm.Type
The base name of the generated class. -
Constructor Summary
ConstructorDescriptionJavaClassIr
(int valFieldCount, List<Insn> doResumeInsns, Map<Integer, Trace> traces, String desc, List<JcirFactory> childJcirFactories) Constructs an IR. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thechildJcirFactories
record component.int
Returns the upper bound of data stack usage within the fun not including spreading.desc()
Returns the value of thedesc
record component.Returns the value of thedoResumeInsns
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.final String
toString()
Returns a string representation of this record class.traces()
Returns the value of thetraces
record component.int
Returns the value of thevalFieldCount
record component.
-
Field Details
-
TYPE_BASE
public static final org.objectweb.asm.Type TYPE_BASEThe 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
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. -
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. -
equals
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 withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
valFieldCount
public int valFieldCount()Returns the value of thevalFieldCount
record component.- Returns:
- the value of the
valFieldCount
record component
-
doResumeInsns
Returns the value of thedoResumeInsns
record component.- Returns:
- the value of the
doResumeInsns
record component
-
traces
Returns the value of thetraces
record component.- Returns:
- the value of the
traces
record component
-
desc
Returns the value of thedesc
record component.- Returns:
- the value of the
desc
record component
-
childJcirFactories
Returns the value of thechildJcirFactories
record component.- Returns:
- the value of the
childJcirFactories
record component
-