|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorc.runtime.Token
public final 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 | |
---|---|
Node |
node
|
Method Summary | |
---|---|
void |
activate()
|
Token |
bind(java.lang.Object f)
Push a new future onto the environment stack |
int |
compareTo(Token t)
|
void |
debug(java.lang.String s)
|
void |
die()
|
Token |
enterClosure(Closure closure,
Node next)
Enter a closure by moving to a new node and environment, and setting the continuation for leaveClosure() . |
void |
error(TokenException problem)
|
Token |
fork()
Fork a token. |
Token |
fork(GroupCell group,
Region region)
Fork a token with a specified group and region. |
OrcEngine |
getEngine()
|
Env<java.lang.Object> |
getEnvironment()
|
GroupCell |
getGroup()
|
Node |
getNode()
|
Region |
getRegion()
|
java.lang.Object |
getResult()
|
SourceLocation |
getSourceLocation()
|
TokenTracer |
getTracer()
|
Token |
leaveClosure()
Leave a closure by returning to the continuation set by #enterClosure(Node, Env, Node) . |
java.lang.Object |
lookup(Arg var)
Lookup a variable in the environment |
Token |
move(Node node)
Move to a node node |
void |
print(java.lang.String string,
boolean newline)
Print something (for use by the print and println sites). |
void |
process()
If a token is alive, calls the node to perform the next action. |
void |
publish()
Publish a value to the top level. |
void |
requireCapability(java.lang.String name,
boolean ifNull)
|
void |
resume()
|
void |
resume(java.lang.Object object)
|
Token |
setGroup(GroupCell group)
|
void |
setPending()
|
Token |
setRegion(Region region)
Migrate the token from one region to another. |
Token |
setResult(java.lang.Object result)
|
void |
setSourceLocation(SourceLocation location)
|
void |
unsetPending()
|
Token |
unwind(int width)
Pop values off of the environment stack. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public Node node
Method Detail |
---|
public void die()
public void process()
public Node getNode()
public GroupCell getGroup()
public Env<java.lang.Object> getEnvironment()
public java.lang.Object getResult()
public OrcEngine getEngine()
public Region getRegion()
public Token setResult(java.lang.Object result)
public Token setGroup(GroupCell group)
public Token setRegion(Region region)
public TokenTracer getTracer()
public Token move(Node node)
node
- the node to move to
public Token enterClosure(Closure closure, Node next) throws StackLimitReachedError
leaveClosure()
.
StackLimitReachedError
public Token leaveClosure()
#enterClosure(Node, Env, Node)
.
public Token bind(java.lang.Object f)
f
- future to push
public Token unwind(int width)
width
- number of bindings to leave
public java.lang.Object lookup(Arg var) throws SiteResolutionException
var
- variable name
SiteResolutionException
public int compareTo(Token t)
compareTo
in interface java.lang.Comparable<Token>
public void debug(java.lang.String s)
public void activate()
public void resume(java.lang.Object object)
public void resume()
public void error(TokenException problem)
public void print(java.lang.String string, boolean newline)
public void publish()
public Token fork() throws TokenLimitReachedError
TokenLimitReachedError
fork(GroupCell, Region)
public Token fork(GroupCell group, Region region) throws TokenLimitReachedError
TokenLimitReachedError
public void setSourceLocation(SourceLocation location)
setSourceLocation
in interface Locatable
public SourceLocation getSourceLocation()
getSourceLocation
in interface Located
public void setPending()
public void unsetPending()
public void requireCapability(java.lang.String name, boolean ifNull) throws CapabilityException
CapabilityException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |