public class PushCmpExecInstr0ExecInstr1 extends java.lang.Object implements Instruction
PUSH( CMP( EXEC( INSTR0 ) , EXEC( INSTR1 ) ) ) )
Modifier and Type | Field and Description |
---|---|
protected @NotNull Instruction |
instruction0
The first instruction in the problem.
|
protected @NotNull Instruction |
instruction1
The second instruction in the problem.
|
protected @Nullable Tree |
tree
The tree this instruction was declared at.
|
Constructor and Description |
---|
PushCmpExecInstr0ExecInstr1(@NotNull Instruction instruction0,
@NotNull Instruction instruction1)
Construct a new instruction that pushes the results of comparing the result of
executing the given
instruction0 with the results of executing the given
instruction1 . |
PushCmpExecInstr0ExecInstr1(@NotNull Tree tree,
@NotNull Instruction instruction0,
@NotNull Instruction instruction1)
Construct a new instruction that pushes the results of comparing the result of
executing the given
instruction0 with the results of executing the given
instruction1 . |
Modifier and Type | Method and Description |
---|---|
void |
exec(@NotNull Environment environment,
@NotNull Memory memory)
Execute this instruction with the given
environment and memory . |
@Nullable Tree |
getTree()
Return the tree from where this instruction was declared.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
create, create
@NotNull protected final @NotNull Instruction instruction0
@NotNull protected final @NotNull Instruction instruction1
@Nullable protected final @Nullable Tree tree
public PushCmpExecInstr0ExecInstr1(@NotNull @NotNull Instruction instruction0, @NotNull @NotNull Instruction instruction1)
instruction0
with the results of executing the given
instruction1
.instruction0
- the first instruction.instruction1
- the second instruction.java.lang.NullPointerException
- if the given instruction0
or instruction1
is null.public PushCmpExecInstr0ExecInstr1(@NotNull @NotNull Tree tree, @NotNull @NotNull Instruction instruction0, @NotNull @NotNull Instruction instruction1)
instruction0
with the results of executing the given
instruction1
.tree
- the tree from where this instruction was declared.instruction0
- the first instruction.instruction1
- the second instruction.java.lang.NullPointerException
- if the given tree
or instruction0
or
instruction1
is null.public void exec(@NotNull @NotNull Environment environment, @NotNull @NotNull Memory memory)
Instruction
environment
and memory
.exec
in interface Instruction
environment
- the environment this instruction is executed in.memory
- the memory holding the variables for this instruction to depend
on.@Nullable public @Nullable Tree getTree()
Instruction
getTree
in interface Instruction