|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--autohit.vm.VM | +--autohit.SimVM
A VM for a Sim. This version does not handle scope caches for headers or body elements. I'm not sure how much faster they would make the VM, so I'll wait.
NOTES for Sim coders --------------------------------------------------
A string will only be resolved once, therefore a variable may only be substituted in
a string once. No references to reference. :-)
SET. Both name and value will be resolved. All variables preceded with a '!' will be
set on the registered transport. It will *not* be removed from the transport when
it falls out of scope!
WAIT. This instruction will block the VM until the time expires.
-----------------------------------------------------------------------
This VM expects the following environment variables to be set
before the execute() method is called. If they aren't set, the defaults
will be used.
VAR | DESC | DEFAULT | ------------------------------------------------------------------------ $sname$ | Session name. Added to log | The Sim.name | | entries | |
VM
,
Sim
Field Summary | |
Log |
myLog
The logging mechinism. |
Transport |
myTransport
The transport mechinism. |
Verify |
myVerify
The verificationt mechinism. |
Fields inherited from class autohit.vm.VM |
ip,
scDirty,
scope,
state,
STATE_DONE,
STATE_NEW,
STATE_NO_VM,
STATE_PAUSED,
STATE_RUNNING,
TIME_GRAN,
vars |
Constructor Summary | |
SimVM(Sim theSim,
Log logTarget,
Transport theTransport,
Verify theVerify)
Constructor. |
Method Summary | |
void |
execute()
Implements the inherited abstract method execute(). |
void |
prepare()
Prepare for execution of the first instruction. |
Methods inherited from class autohit.vm.VM |
discardScopeFrame,
getIntegerVar,
getState,
getVar,
pause,
popScope,
pushScope,
removeVar,
resume,
setVar,
start,
subVar,
ticks |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public Log myLog
Log
public Transport myTransport
Transport
public Verify myVerify
Verify
Constructor Detail |
public SimVM(Sim theSim, Log logTarget, Transport theTransport, Verify theVerify)
This class assumes that the logging object has already been started.
Do NOT use the default constructor! Call this constructor.
theSim
- the Sim to be executed.logTarget
- target for logging.myTransport
- transport mechanism to use. This is for future use; you
can pass null to it.myVerify
- verification mechanism.Method Detail |
public void prepare() throws java.lang.Exception
public void execute() throws VMException
This method will throw a VMException(VMException.DONE) if there are no more instructions that can be executed. (The ip is past the end of the exec Vector).
We shall assume that a VMContext will handle threading issues.
VMContext
,
VMException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |