public class FreeAddr extends java.lang.Object implements Instruction
FREE( ADDR )
Modifier and Type | Field and Description |
---|---|
protected @NotNull java.lang.String |
address
The address to be freed.
|
protected @Nullable Tree |
tree
The tree this instruction was declared at.
|
Constructor and Description |
---|
FreeAddr(@NotNull java.lang.String address)
Construct a new instruction that frees the given
address in the heap when
executed. |
FreeAddr(@NotNull Tree tree,
@NotNull java.lang.String address)
Construct a new instruction that frees the given
address in the heap when
executed. |
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 java.lang.String address
@Nullable protected final @Nullable Tree tree
public FreeAddr(@NotNull @NotNull java.lang.String address)
address
in the heap when
executed.address
- the address to be freed.java.lang.NullPointerException
- if the given address
is null.public FreeAddr(@NotNull @NotNull Tree tree, @NotNull @NotNull java.lang.String address)
address
in the heap when
executed.tree
- the tree from where this instruction was declared.address
- the address to be freed.java.lang.NullPointerException
- if the given tree
or address
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