![]() |
Dataflow Software Stack
032db78
Master Thesis of Mathijs Saey at the VUB
|
Inherits object.
Public Member Functions | |
| def | __init__ |
| Store the tokens that have not received a destination. More... | |
| def | send |
| Send a token to it's destination. More... | |
| def | store |
| Store a token. More... | |
| def | sendStored |
| Send all the stored tokens that were waiting for a switch to be set. More... | |
| def | set |
| Set the destination of tokens for a given (switch instruction, context) pair. More... | |
| def | switch |
| Send a token to the destination of a SwitchInstruction. More... | |
Public Attributes | |
| tokenizer | |
| storage | |
| destinations | |
Token Switcher.
The token switcher is responsible for storing and sending tokens for a switch instruction.
| def core.tokenizer.Switcher.__init__ | ( | self, | |
| tokenizer | |||
| ) |
Store the tokens that have not received a destination.
Store the known destination of certain switch instructions.
| def core.tokenizer.Switcher.send | ( | self, | |
| key, | |||
| token | |||
| ) |
Send a token to it's destination.
Assumes the destination is present in the destination map.
| key | The key of the switch. |
| token | The token to send. |
| def core.tokenizer.Switcher.store | ( | self, | |
| key, | |||
| token | |||
| ) |
Store a token.
| key | The key of the switch. |
| token | The token to store. |
| def core.tokenizer.Switcher.sendStored | ( | self, | |
| key, | |||
| dst | |||
| ) |
Send all the stored tokens that were waiting for a switch to be set.
| key | The key of the switch that was set. And the context for which this was set. |
| dst | The destination for the tokens. |
| def core.tokenizer.Switcher.set | ( | self, | |
| inst, | |||
| cont, | |||
| dst | |||
| ) |
Set the destination of tokens for a given (switch instruction, context) pair.
This will also release all the tokens that are stored for this context.
| inst | The instruction that sent the switch. |
| cont | The context that received the setSwitch |
| dst | The destination of the tokens of the switch. |
| def core.tokenizer.Switcher.switch | ( | self, | |
| token, | |||
| inst | |||
| ) |
Send a token to the destination of a SwitchInstruction.
Store the token if the destination is currently unknown. Only the instruction address of the token tag is modified.
| token | The token to switch |
| inst | The instruction that sent the token. |
| core.tokenizer.Switcher.tokenizer |
| core.tokenizer.Switcher.storage |
| core.tokenizer.Switcher.destinations |
1.8.8