aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArmin Rigo <arigo@tunes.org>2005-11-10 18:01:06 +0000
committerArmin Rigo <arigo@tunes.org>2005-11-10 18:01:06 +0000
commitab1509259564c7d4e087c1f805bd9c29e8c8a6cf (patch)
treea4a6d073c045b3d551127b27ed2f7aadf9246940 /pypy/doc/image
parenta more "informal" version of the stackless graph (diff)
downloadpypy-ab1509259564c7d4e087c1f805bd9c29e8c8a6cf.tar.gz
pypy-ab1509259564c7d4e087c1f805bd9c29e8c8a6cf.tar.bz2
pypy-ab1509259564c7d4e087c1f805bd9c29e8c8a6cf.zip
Further simplified the content of this informal graph.
Diffstat (limited to 'pypy/doc/image')
-rw-r--r--pypy/doc/image/stackless_informal.dot44
1 files changed, 23 insertions, 21 deletions
diff --git a/pypy/doc/image/stackless_informal.dot b/pypy/doc/image/stackless_informal.dot
index 8684adfb28..392ec6c618 100644
--- a/pypy/doc/image/stackless_informal.dot
+++ b/pypy/doc/image/stackless_informal.dot
@@ -1,26 +1,28 @@
digraph mul_graph {
node [shape="octagon", color="black", fillcolor="white", style="filled"];
subgraph mul {
- mul [shape="box", label="mul\ndef mul(x, y):\l if x == 0:\l return 0\l return mul(x - 1, y) + y\l", fillcolor="green"];
- mul_r [label="Are we resuming?", color="blue"];
- mul_0 [label="inputargs: x_0 y_0\n\nv79 = int_eq(x_0, (0))\l\lexitswitch: v79"];
- mul_1 [shape="ellipse", label="is the stack too big?", color="blue"]
- mul_2 [shape="box", label="mul_2(Block )\ninputargs: v193\n\nreturn v193", fillcolor="green"];
- mul_3 [label="inputargs: x_0 y_0\n\nv81 = int_sub(x_0, (1))\lv82 = direct_call((<* fn mul>), v81, y_0)\l\lis the stack being unwound?"];
- mul_4 [shape="ellipse", label="store x_0 and y_0 on the heap\nunwind the stack", color="blue"];
- mul_5 [shape="box", label="inputargs: v82 y_0\n\nv83 = int_add(v82, y_0)\l"];
- mul_r3 [shape="ellipse", label="load saved variables x_0 and y_0", color="blue"];
- mul_s3 [shape="ellipse", label="save x_0 and y_0 to the heap\lcontinue unwinding", color="blue"];
- mul -> mul_r [label="startblock", style="dashed"];
- mul_r -> mul_0 [label="No: x_0 y_0", style="dashed"];
- mul_r -> mul_r3 [label="Yes" style="dashed"];
- mul_r3 -> mul_3 [label="x_0 y_0", style="dashed"];
- mul_0 -> mul_1 [label="False: x_0 y_0", style="dotted"];
- mul_0 -> mul_2 [label="True: (0)", style="dotted"];
- mul_1 -> mul_3 [label="No: x_0 y_0", style="dotted"];
- mul_1 -> mul_4 [label="Yes", style="dotted"];
- mul_3 -> mul_5 [label="No: v82 x_0", style="solid"];
- mul_3 -> mul_s3 [label="Yes: x_0 y_0"];
- mul_5 -> mul_2 [label="v83"];
+ mul [shape="box", label="def recmul(x, y):\l if x == 0:\l return 0\l else:\l z = x - 1\l return recmul(z, y) + y\l", fillcolor="green"];
+ mul_r [shape="ellipse", label="Are we resuming?", color="blue"];
+ mul_0 [label="x == 0?"];
+ mul_1 [shape="box", label="z = x - 1"];
+ mul_chk [shape="ellipse", label="is the stack too big?", color="blue"]
+ mul_2 [shape="box", label="return", fillcolor="green"];
+ mul_3 [label="p = recmul(z, y)\n\nis the stack being unwound?"];
+ mul_4 [shape="ellipse", label="store y and z on the heap\nstart unwinding the stack", color="blue"];
+ mul_5 [shape="box", label="result = p + y"];
+ mul_r3 [shape="ellipse", label="load saved variables y and z\lfrom the heap", color="blue"];
+ mul_s3 [shape="ellipse", label="save x and y to the heap\lcontinue unwinding", color="blue"];
+ mul -> mul_r [label="startblock"];
+ mul_r -> mul_0 [label="No: x y"];
+ mul_r -> mul_r3 [label="Yes: (ignore input args)"];
+ mul_r3 -> mul_3 [label="y z"];
+ mul_0 -> mul_1 [label="No: x y"];
+ mul_1 -> mul_chk [label="y z"];
+ mul_0 -> mul_2 [label="Yes: (0)"];
+ mul_chk -> mul_3 [label="No: y z"];
+ mul_chk -> mul_4 [label="Yes: y z"];
+ mul_3 -> mul_5 [label="No: y p"];
+ mul_3 -> mul_s3 [label="Yes: y z"];
+ mul_5 -> mul_2 [label="result"];
}
}