Record Class IRInlineCallableLiteral
java.lang.Object
java.lang.Record
io.github.protasm.jvmud.compiler.ir.IRInlineCallableLiteral
- All Implemented Interfaces:
IRExpression, IRNode
public record IRInlineCallableLiteral(int line, IRExpression body, List<IRBlock> blocks, int arity, List<IRLocal> argumentLocals, List<IRLocal> captureLocals, List<IRLocal> helperLocals, RuntimeType type)
extends Record
implements IRExpression
IR value for an LPC inline callable literal, such as
(: $1 > 0 :).
The body is lowered with synthetic callback argument locals so callable invocation can execute expression and LDMud statement-block bodies through the same IR/bytecode machinery used by existing special-form callbacks.
-
Constructor Summary
ConstructorsConstructorDescriptionIRInlineCallableLiteral(int line, IRExpression body, int arity, List<IRLocal> argumentLocals, List<IRLocal> captureLocals, RuntimeType type) IRInlineCallableLiteral(int line, IRExpression body, List<IRBlock> blocks, int arity, List<IRLocal> argumentLocals, List<IRLocal> captureLocals, List<IRLocal> helperLocals, RuntimeType type) Creates an instance of aIRInlineCallableLiteralrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theargumentLocalsrecord component.intarity()Returns the value of thearityrecord component.blocks()Returns the value of theblocksrecord component.body()Returns the value of thebodyrecord component.Returns the value of thecaptureLocalsrecord component.final booleanIndicates whether some other object is "equal to" this one.booleanfinal inthashCode()Returns a hash code value for this object.Returns the value of thehelperLocalsrecord component.intline()Returns the value of thelinerecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
-
Constructor Details
-
IRInlineCallableLiteral
public IRInlineCallableLiteral(int line, IRExpression body, int arity, List<IRLocal> argumentLocals, List<IRLocal> captureLocals, RuntimeType type) -
IRInlineCallableLiteral
public IRInlineCallableLiteral(int line, IRExpression body, List<IRBlock> blocks, int arity, List<IRLocal> argumentLocals, List<IRLocal> captureLocals, List<IRLocal> helperLocals, RuntimeType type) Creates an instance of aIRInlineCallableLiteralrecord class.- Parameters:
line- the value for thelinerecord componentbody- the value for thebodyrecord componentblocks- the value for theblocksrecord componentarity- the value for thearityrecord componentargumentLocals- the value for theargumentLocalsrecord componentcaptureLocals- the value for thecaptureLocalsrecord componenthelperLocals- the value for thehelperLocalsrecord componenttype- the value for thetyperecord component
-
-
Method Details
-
hasBlockBody
public boolean hasBlockBody() -
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
line
-
body
Returns the value of thebodyrecord component.- Returns:
- the value of the
bodyrecord component
-
blocks
-
arity
public int arity()Returns the value of thearityrecord component.- Returns:
- the value of the
arityrecord component
-
argumentLocals
-
captureLocals
-
helperLocals
-
type
Returns the value of thetyperecord component.- Specified by:
typein interfaceIRExpression- Returns:
- the value of the
typerecord component
-