If
data class If
Fields
Name | Description |
---|---|
val label: Label?
|
|
val result: ResultType
|
|
val positiveInstructions: List<Instruction>
|
|
val negativeInstructions: List<Instruction>
|
Constructors
<init>
constructor(label: Label?, result: ResultType, positiveInstructions: List<Instruction>, negativeInstructions: List<Instruction>)
Parameters
Name | Description |
---|---|
label: Label?
|
|
result: ResultType
|
|
positiveInstructions: List<Instruction>
|
|
negativeInstructions: List<Instruction>
|
Methods
flatten
fun flatten(expressionIndex: Int): List<Instruction>
Parameters
Name | Description |
---|---|
expressionIndex: Int
|
The index of this Instruction within a parent's flattened list. Used to configure start/end instructions and allow breaks/jumps to calculate instruction pointer offsets. |
ReturnValue
Name | Description |
---|---|
List<Instruction>
|
Flattens the instruction such that none of the Instructions returned contain nested instructions. May result in block-type instructions being converted to start/end variants, wrapping their block contents.