Skip to content

Commit 29fd170

Browse files
committed
Update v3/docs/opt-trace-format.md
1 parent b046cd5 commit 29fd170

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

‎v3/docs/opt-trace-format.md‎

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,9 @@ render `x` and then `y`, and at the next execution point, it might render `y` an
219219
causing the visualization to "jitter" unnecessarily. And I've found that it looks aesthetically pleasing
220220
when variables are sorted in their order of appearance as you step forwards through execution.
221221

222+
Still with me? Ok, let's get to the final execution point, which corresponds to the frontend displaying
223+
"Program terminated" ([click here](http://pythontutor.com/visualize.html#code=x+%3D+5%0Ay+%3D+10%0Az+%3D+x+%2B+y&mode=display&cumulative=false&py=2&curInstr=3)
224+
to jump directly there).
222225

223226
```javascript
224227
{
@@ -239,4 +242,14 @@ when variables are sorted in their order of appearance as you step forwards thro
239242
"line": 3,
240243
"event": "return"
241244
}
242-
```
245+
```
246+
247+
This time, the event is a `return`, which signifies "returning" from the top-level module code (meaning the program
248+
has terminated). Note that now there is another new variable `z`, which is bound to `15` since `z = x + y` just executed.
249+
Note that, again, `ordered_globals` shows all three variables in their order of appearance.
250+
251+
Ok, that's it for the basic tour!
252+
253+
## Heap Objects
254+
255+
## Function Stack Frames

0 commit comments

Comments
 (0)