-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #40 from mjp41/0-pippi-langstrump
Mermaid: Add taint function and more colors to diagrams
- Loading branch information
Showing
6 changed files
with
305 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
# Built-in Functions | ||
|
||
## Debugging | ||
|
||
#### `breakpoint()` | ||
|
||
Causes the interpreter to enter *interactive mode*. | ||
|
||
#### `unreachable()` | ||
|
||
Aborts the interpreter process. It's intended to indicate that an execution branch is not reachable. | ||
|
||
## Constructors | ||
|
||
#### `region()` | ||
|
||
Creates a new region object. | ||
|
||
#### `cown(take region)` | ||
|
||
Creates a new `cown` object. | ||
|
||
The region must have a local reference count of one. The `take` keyword is used to replace the local value with `None`. | ||
|
||
### `create(proto)` | ||
|
||
Creates a new object from the given prototype. | ||
|
||
## Memory Management | ||
|
||
#### `freeze(obj)` | ||
|
||
Performs a deep freeze of the object and all referenced objects. | ||
|
||
This will move the objects out of their current region into the immutable region. Cowns will stop the freeze propagation, as they can be safely shared across threads and behaviors. | ||
|
||
## Mermaid | ||
|
||
#### `mermaid_hide(obj, ..)` | ||
|
||
Hides the given arguments from the mermaid graph. | ||
|
||
#### `mermaid_show(obj, ..)` | ||
|
||
Shows the given arguments in the mermaid diagram. | ||
|
||
#### `mermaid_show_all()` | ||
|
||
Makes all nodes visible in the mermaid diagram. | ||
|
||
#### `mermaid_show_tainted(obj, ...)` | ||
|
||
Draws a mermaid diagram with the given objects marked as tainted. This will show which objects are reachable at this point. | ||
|
||
#### `mermaid_taint(obj, ...)` | ||
|
||
Marks the given objects as tainted, this will highlight, which nodes are reachable from the given objects. | ||
|
||
The tainted status will remain until `mermaid_untaint` is called. | ||
|
||
`mermaid_show_tainted()` can be used to only taint the current snapshot. | ||
|
||
#### `mermaid_untaint(obj, ...)` | ||
|
||
Marks the given objects as untainted, thereby removing the highlights from the mermaid diagram. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.