Record Class IRLocalMutation
java.lang.Object
java.lang.Record
io.github.protasm.jvmud.compiler.ir.IRLocalMutation
- All Implemented Interfaces:
IRExpression, IRNode
public record IRLocalMutation(int line, IRLocal local, int delta, boolean prefix)
extends Record
implements IRExpression
Numeric local increment/decrement expression with prefix or postfix result semantics.
-
Constructor Summary
ConstructorsConstructorDescriptionIRLocalMutation(int line, IRLocal local, int delta, boolean prefix) Creates an instance of aIRLocalMutationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintdelta()Returns the value of thedeltarecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanisPrefix()Returns true when the expression should evaluate to the updated local value.intline()Returns the value of thelinerecord component.local()Returns the value of thelocalrecord component.booleanprefix()Returns the value of theprefixrecord component.final StringtoString()Returns a string representation of this record class.type()
-
Constructor Details
-
IRLocalMutation
Creates an instance of aIRLocalMutationrecord class.- Parameters:
line- the value for thelinerecord componentlocal- the value for thelocalrecord componentdelta- the value for thedeltarecord componentprefix- the value for theprefixrecord component
-
-
Method Details
-
isPrefix
public boolean isPrefix()Returns true when the expression should evaluate to the updated local value. -
type
- Specified by:
typein interfaceIRExpression
-
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
-
local
Returns the value of thelocalrecord component.- Returns:
- the value of the
localrecord component
-
delta
public int delta()Returns the value of thedeltarecord component.- Returns:
- the value of the
deltarecord component
-
prefix
public boolean prefix()Returns the value of theprefixrecord component.- Returns:
- the value of the
prefixrecord component
-