[pypy-svn] rev 1546 - pypy/trunk/doc

arigo at codespeak.net arigo at codespeak.net
Fri Oct 3 17:41:29 CEST 2003


Author: arigo
Date: Fri Oct  3 17:41:28 2003
New Revision: 1546

Added:
   pypy/trunk/doc/nested_whiles.pdf
Log:
Demo control flow graph


Added: pypy/trunk/doc/nested_whiles.pdf
==============================================================================
--- (empty file)
+++ pypy/trunk/doc/nested_whiles.pdf	Fri Oct  3 17:41:28 2003
@@ -0,0 +1,81 @@
+digraph test {
+	node [label="\N", fontname=Times];
+	edge [fontname=Times];
+	graph [bb="0,0,1369,3108"];
+	NodeBranch25 [label="Branch\nargs=[]", shape=diamond, pos="287,3064", width="1.56", height="1.00"];
+	NodeBasicBlock26 [label="EggBlock\noperations=(add(var(v70), const(1)) -> var(v87), add(var(v69), const('.')) -> var(v88))\nbooloutcome=True\ninput_args=\
+[]\nlocals=[var(v67), var(v68), var(v69), var(v70), var(v71)]", shape=box, pos="287,2706", width="7.97", height="1.17"];
+	NodeBasicBlock21 [label="SpamBlock\noperations=()\ninput_args=[var(v95), var(v96), var(v97), var(v98), var(v99), var(v100)]\nlocals=[var(v95), var(v96), \
+var(v97), var(v98), var(v99), var(v100)]", shape=box, pos="568,1798", width="6.83", height="0.94"];
+	NodeBranch22 [label="Branch\nargs=[var(v95), var(v96), var(v97), var(v98), var(v99)]", shape=diamond, pos="568,1672", width="7.67", height="1.00"];
+	NodeConditionalBranch5 [label="ConditionalBranch\ncondition=var(v64)", shape=diamond, pos="526,1152", width="3.17", height="1.00"];
+	NodeBranch6 [label="Branch\nargs=[]", shape=diamond, pos="516,1024", width="1.56", height="1.00"];
+	NodeBranch13 [label="Branch\nargs=[]", shape=diamond, pos="646,1024", width="1.56", height="1.00"];
+	NodeBranch8 [label="Branch\nargs=[var(v59), var(v60), var(v61), var(v62), var(v63), var(v64)]", shape=diamond, pos="394,756", width="8.92", height="1.00"];
+	NodeBasicBlock9 [label="SpamBlock\noperations=()\ninput_args=[var(v75), var(v76), var(v77), var(v78), var(v79), var(v80)]\nlocals=[var(v75), var(v76), v\
+ar(v77), var(v78), var(v79), var(v80)]", shape=box, pos="394,578", width="6.78", height="0.94"];
+	NodeBasicBlock2 [label="SpamBlock\noperations=()\ninput_args=[var(v17), var(v18)]\ndead=True\nlocals=[var(v17), var(v18)]", shape=box, pos="1088,1538", width="3.08", height="1.17"];
+	NodeBranch3 [label="Branch\nargs=[var(v17), var(v18), const(''), const(None), const(5)]", shape=diamond, pos="1088,1404", width="7.81", height="1.00"];
+	NodeBasicBlock19 [label="EggBlock\noperations=()\nbooloutcome=False\ninput_args=[]\nlocals=[var(v67), var(v68), var(v69), var(v70), var(v71)]", shape=box, pos="489,2058", width="5.31", height="1.17"];
+	NodeBasicBlock16 [label="SpamBlock\noperations=(lt(var(v70), var(v68)) -> var(v73),)\ninput_args=[var(v67), var(v68), var(v69), var(v70), var(v71)]\nloca\
+ls=[var(v67), var(v68), var(v69), var(v70), var(v71)]", shape=box, pos="317,2446", width="5.83", height="0.94"];
+	NodeBranch20 [label="Branch\nargs=[var(v67), var(v68), var(v69), var(v70), var(v71), var(v73)]", shape=diamond, pos="575,1924", width="8.92", height="1.00"];
+	NodeBranch18 [label="Branch\nargs=[]", shape=diamond, pos="492,2192", width="1.56", height="1.00"];
+	NodeEndBranch12 [label="EndBranch\nreturnvalue=var(v83)", shape=circle, pos="394,122", width="3.17", height="3.17"];
+	NodeBasicBlock7 [label="EggBlock\noperations=()\nbooloutcome=False\ninput_args=[]\nlocals=[var(v59), var(v60), var(v61), var(v62), var(v63)]", shape=box, pos="510,890", width="5.31", height="1.17"];
+	NodeBasicBlock4 [label="SpamBlock\noperations=(gt(var(v63), const(0)) -> var(v64),)\ninput_args=[var(v59), var(v60), var(v61), var(v62), var(v63)]\nloca\
+ls=[var(v59), var(v60), var(v61), var(v62), var(v63)]", shape=box, pos="536,1278", width="5.83", height="0.94"];
+	NodeBasicBlock23 [label="SpamBlock\noperations=(add(var(v104), const('!')) -> var(v108),)\ninput_args=[var(v102), var(v103), var(v104), var(v105), var(v1\
+06)]\nlocals=[var(v102), var(v103), var(v104), var(v105), var(v106)]", shape=box, pos="627,1538", width="6.22", height="0.94"];
+	NodeBranch24 [label="Branch\nargs=[var(v102), var(v103), var(v108), var(v105), var(v106)]", shape=diamond, pos="495,1404", width="8.17", height="1.00"];
+	NodeBranch27 [label="Branch\nargs=[var(v67), var(v68), var(v88), var(v87), var(v71)]", shape=diamond, pos="480,2572", width="7.58", height="1.00"];
+	nested_whiles [label="FunctionGraph\n\l    def nested_whiles(i, j):\l        s = ''\l        z = 5\l        while z > 0:\l            z = z - 1\l     \
+       u = i\l            while u < j:\l                u = u + 1\l                s = s + '.'\l            s = s + '!'\l       \
+ return s\l\nfunctionname='nested_whiles'", shape=box, pos="606,2888", width="3.08", height="3.39"];
+	NodeBasicBlock0 [label="SpamBlock\noperations=()\ninput_args=[var(v15), var(v16)]\nlocals=[var(v15), var(v16)]", shape=box, pos="943,1798", width="3.08", height="0.94"];
+	NodeBasicBlock14 [label="EggBlock\noperations=(sub(var(v63), const(1)) -> var(v66),)\nbooloutcome=True\ninput_args=[]\nlocals=[var(v59), var(v60), var(v6\
+1), var(v62), var(v63)]", shape=box, pos="910,890", width="5.31", height="1.17"];
+	NodeBranch10 [label="Branch\nargs=[var(v75), var(v76), var(v77), var(v78), var(v79)]", shape=diamond, pos="394,452", width="7.69", height="1.00"];
+	NodeConditionalBranch17 [label="ConditionalBranch\ncondition=var(v73)", shape=diamond, pos="517,2320", width="3.11", height="1.00"];
+	NodeBasicBlock11 [label="SpamBlock\noperations=()\ninput_args=[var(v81), var(v82), var(v83), var(v84), var(v85)]\nlocals=[var(v81), var(v82), var(v83), v\
+ar(v84), var(v85)]", shape=box, pos="394,326", width="5.81", height="0.94"];
+	NodeBranch1 [label="Branch\nargs=[var(v15), var(v16)]", shape=diamond, pos="997,1672", width="3.75", height="1.00"];
+	NodeBranch15 [label="Branch\nargs=[var(v59), var(v60), var(v61), var(v59), var(v66)]", shape=diamond, pos="741,666", width="7.64", height="1.00"];
+	NodeBranch25 -> NodeBasicBlock26 [style=solid, label=target, pos="e,287,2748 287,3028 287,2964 287,2832 287,2759", lp="314,2888"];
+	NodeBasicBlock21 -> NodeBranch22 [style=solid, label=branch, pos="e,568,1708 568,1764 568,1750 568,1733 568,1718", lp="599,1736"];
+	NodeConditionalBranch5 -> NodeBranch6 [style=dashed, label=elsebranch, pos="e,519,1058 523,1117 522,1102 521,1084 520,1068", lp="563,1088"];
+	NodeConditionalBranch5 -> NodeBranch13 [style=dashed, label=ifbranch, pos="e,636,1054 570,1130 584,1121 599,1110 610,1098 619,1088 626,1074 632,1062", lp="658,1088"];
+	NodeBranch8 -> NodeBasicBlock9 [style=solid, label=target, pos="e,394,612 394,720 394,692 394,652 394,622", lp="421,666"];
+	NodeBasicBlock2 -> NodeBranch3 [style=solid, label=branch, pos="e,1088,1440 1088,1496 1088,1481 1088,1464 1088,1449", lp="1119,1468"];
+	NodeBasicBlock19 -> NodeBasicBlock16 [style=dotted, label=prevblock, weight=0, pos="e,342,2412 458,2100 447,2117 436,2137 427,2156 380,2256 401,2294 353,2394 351,2397 349,2401 347,2404", lp="435,2256"];
+	NodeBasicBlock19 -> NodeBranch20 [style=solid, label=branch, weight=0, pos="e,553,1958 516,2016 526,2000 538,1982 548,1966", lp="570,1988"];
+	NodeBranch18 -> NodeBasicBlock19 [style=solid, label=target, weight=0, pos="e,490,2100 491,2156 491,2142 490,2125 490,2110", lp="517,2128"];
+	NodeBasicBlock7 -> NodeBasicBlock4 [style=dotted, label=prevblock, weight=0, pos="e,426,1244 476,932 435,990 373,1096 403,1188 410,1209 414,1224 421,1237", lp="442,1088"];
+	NodeBasicBlock7 -> NodeBranch8 [style=solid, label=branch, weight=0, pos="e,423,789 474,848 460,831 443,813 429,796", lp="489,820"];
+	NodeBasicBlock23 -> NodeBranch24 [style=solid, label=branch, weight=0, pos="e,527,1436 593,1504 575,1485 552,1462 534,1443", lp="599,1468"];
+	NodeBranch27 -> NodeBasicBlock16 [style=solid, label=target, weight=0, pos="e,361,2480 440,2541 418,2525 392,2504 369,2486", lp="434,2508"];
+	NodeBranch20 -> NodeBasicBlock21 [style=solid, label=target, weight=0, pos="e,570,1832 573,1888 572,1874 571,1857 571,1842", lp="598,1860"];
+	nested_whiles -> NodeBasicBlock0 [style=solid, label=startblock, weight=0, pos="e,946,1832 717,2792 768,2743 823,2678 854,2608 974,2337 957,1968 947,1842", lp="977,2320"];
+	NodeBranch13 -> NodeBasicBlock14 [style=solid, label=target, weight=0, pos="e,719,932 639,992 637,978 639,961 649,950 650,948 676,942 711,934", lp="676,960"];
+	NodeBasicBlock9 -> NodeBranch10 [style=solid, label=branch, weight=0, pos="e,394,488 394,544 394,530 394,513 394,498", lp="425,516"];
+	NodeBranch6 -> NodeBasicBlock7 [style=solid, label=target, weight=0, pos="e,512,932 514,989 514,975 513,958 513,942", lp="539,960"];
+	NodeBasicBlock16 -> NodeConditionalBranch17 [style=solid, label=branch, weight=0, pos="e,479,2344 371,2412 402,2393 442,2367 471,2349", lp="459,2384"];
+	NodeBasicBlock4 -> NodeConditionalBranch5 [style=solid, label=branch, weight=0, pos="e,480,1174 466,1244 461,1239 456,1233 452,1226 442,1208 455,1192 472,1179", lp="483,1216"];
+	NodeBasicBlock11 -> NodeEndBranch12 [style=solid, label=branch, weight=0, pos="e,394,236 394,292 394,279 394,263 394,246", lp="425,264"];
+	NodeConditionalBranch17 -> NodeBranch18 [style=dashed, label=elsebranch, weight=0, pos="e,498,2224 510,2286 507,2270 503,2250 500,2233", lp="549,2256"];
+	NodeConditionalBranch17 -> NodeBranch25 [style=dashed, label=ifbranch, weight=0, pos="e,312,3044 525,2354 529,2371 534,2392 536,2412 539,2442 547,2452 536,2480 531,2490 522,2487 518,2498 514,2506 511,2511 518,2518 \
+555,2557 724,2496 762,2536 783,2559 783,2584 762,2608 733,2638 603,2595 575,2626 563,2638 579,2647 583,2664 590,2700 606,2719 58\
+3,2748 554,2781 521,2740 486,2766 383,2838 421,2911 344,3010 337,3019 327,3029 319,3037", lp="813,2572"];
+	NodeBasicBlock0 -> NodeBranch1 [style=solid, label=branch, weight=0, pos="e,983,1705 958,1764 965,1749 973,1730 980,1714", lp="1003,1736"];
+	NodeBranch3 -> NodeBasicBlock4 [style=solid, label=target, weight=0, pos="e,684,1312 987,1381 905,1363 788,1336 693,1314", lp="880,1340"];
+	NodeBasicBlock26 -> NodeBasicBlock16 [style=dotted, label=prevblock, weight=0, pos="e,183,2480 175,2664 152,2650 130,2631 116,2608 100,2580 99,2562 116,2536 130,2514 152,2497 174,2485", lp="160,2572"];
+	NodeBasicBlock26 -> NodeBranch27 [style=solid, label=branch, weight=0, pos="e,437,2602 348,2664 374,2646 404,2625 430,2607", lp="431,2636"];
+	NodeBranch15 -> NodeBasicBlock16 [style=solid, label=target, weight=0, pos="e,307,2412 747,701 750,730 748,769 724,792 700,813 468,804 437,810 379,820 350,804 310,848 149,1021 219,1132 192,1368 148,1771 2\
+66,2257 305,2403", lp="212,1608"];
+	NodeBranch24 -> NodeBasicBlock4 [style=solid, label=target, weight=0, pos="e,462,1312 458,1372 447,1359 440,1344 448,1330 450,1326 453,1322 456,1319", lp="475,1340"];
+	NodeBasicBlock14 -> NodeBasicBlock4 [style=dotted, label=prevblock, weight=0, pos="e,582,1244 877,932 830,992 738,1103 649,1188 630,1206 609,1223 589,1238", lp="792,1088"];
+	NodeBasicBlock14 -> NodeBranch15 [style=solid, label=branch, weight=0, pos="e,766,699 878,848 847,808 802,748 773,708", lp="894,820"];
+	NodeBranch1 -> NodeBasicBlock2 [style=solid, label=target, weight=0, pos="e,1060,1580 1018,1641 1028,1625 1042,1606 1054,1588", lp="1071,1608"];
+	NodeBranch22 -> NodeBasicBlock23 [style=solid, label=target, weight=0, pos="e,612,1572 583,1638 591,1621 600,1599 608,1581", lp="625,1608"];
+	NodeBranch10 -> NodeBasicBlock11 [style=solid, label=target, weight=0, pos="e,394,360 394,416 394,402 394,385 394,370", lp="421,388"];
+}


More information about the Pypy-commit mailing list