public class Simulator extends Object
Note: This class is not thread-safe. If multiple threads need to use a single instance, they must synchronize access explicitly between themselves.
| Constructor and Description |
|---|
Simulator(Machine machine,
ConcreteMethod method)
Constructs an instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
simulate(ByteBlock bb,
Frame frame)
Simulates the effect of executing the given basic block.
|
int |
simulate(int offset,
Frame frame)
Simulates the effect of the instruction at the given offset, by
making appropriate calls on the given frame.
|
public Simulator(Machine machine, ConcreteMethod method)
machine - non-null; machine to use when simulatingmethod - non-null; method data to usepublic void simulate(ByteBlock bb, Frame frame)
bb - non-null; the basic blockframe - non-null; frame to operate onpublic int simulate(int offset,
Frame frame)
offset - >= 0; offset of the instruction to simulateframe - non-null; frame to operate onCopyright © 2016. All Rights Reserved.