|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorc.runtime.Token
public class Token
Representation of an active thread of execution. Tokens move over the node graph as they are executed. They contain an environment, and may belong to a group. They also preserve the call chain and contain a value to be passed to the next token.
Field Summary | |
---|---|
protected OrcEngine |
engine
|
protected Env<Future> |
env
|
protected GroupCell |
group
|
protected Node |
node
|
protected Region |
region
|
Constructor Summary | |
---|---|
Token(Node node,
Env<Future> env,
Execution exec)
|
|
Token(Node node,
Env<Future> env,
Token caller,
GroupCell group,
Region region,
Value result,
OrcEngine engine)
|
Method Summary | |
---|---|
void |
activate()
|
void |
activate(Value v)
|
Value |
arg(Arg a)
|
Token |
bind(Future f)
Push a new future onto the environment stack |
Callable |
call(Arg a)
|
Token |
callcopy(Node node,
Env<Future> env,
Token returnToken)
Create a copy of this token with the same dynamic characteristics, but executing at a new point in the graph with a different environment. |
int |
compareTo(Token t)
|
Token |
copy()
Create a copy of the token |
void |
debug(java.lang.String s)
|
void |
die()
|
void |
error(TokenException problem)
|
void |
finalize()
|
Token |
getCaller()
|
OrcEngine |
getEngine()
|
Env<Future> |
getEnvironment()
|
GroupCell |
getGroup()
|
Node |
getNode()
|
Region |
getRegion()
|
Value |
getResult()
|
Future |
lookup(Arg a)
Lookup a variable in the environment |
Token |
move(Node node)
Move to a node node |
void |
process()
If a token is alive, calls the node to perform the next action. |
void |
resume()
|
void |
resume(Value v)
|
Token |
setEnv(Env<Future> e)
|
Token |
setGroup(GroupCell group)
|
Token |
setRegion(Region region)
|
Token |
setResult(Value result)
|
Token |
unwind(int width)
Pop values off of the environment stack. |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Node node
protected Env<Future> env
protected GroupCell group
protected Region region
protected OrcEngine engine
Constructor Detail |
---|
public Token(Node node, Env<Future> env, Token caller, GroupCell group, Region region, Value result, OrcEngine engine)
public Token(Node node, Env<Future> env, Execution exec)
Method Detail |
---|
public void die()
public void finalize()
finalize
in class java.lang.Object
public void process()
public Node getNode()
public GroupCell getGroup()
public Env<Future> getEnvironment()
public Value getResult()
public Token getCaller()
public OrcEngine getEngine()
public Region getRegion()
public Token setResult(Value result)
public Token setGroup(GroupCell group)
public Token setRegion(Region region)
public Token setEnv(Env<Future> e)
public Token move(Node node)
node
- the node to move to
public Token callcopy(Node node, Env<Future> env, Token returnToken)
public Token copy()
public Token bind(Future f)
f
- future to push
public Token unwind(int width)
public Future lookup(Arg a)
var
- variable name
public Callable call(Arg a) throws UncallableValueException
UncallableValueException
public Value arg(Arg a)
public int compareTo(Token t)
compareTo
in interface java.lang.Comparable<Token>
public void debug(java.lang.String s)
public void activate()
public void activate(Value v)
public void resume(Value v)
public void resume()
public void error(TokenException problem)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |