summaryrefslogtreecommitdiff
path: root/docs/chapter10/example2c.gv
diff options
context:
space:
mode:
authorCliff Click <cliffc@acm.org>2024-04-23 17:23:16 +0100
committerCliff Click <cliffc@acm.org>2025-01-09 12:19:55 -0800
commitcdfb3419d6a3c3067ce3c4157b605ae4abe32b09 (patch)
tree2cd325b988d92ae47e306f6733ad28c1227a0043 /docs/chapter10/example2c.gv
parent8a543b86312eb5c7c175fe06b861c3462e0d2884 (diff)
downloadSimple-cdfb3419d6a3c3067ce3c4157b605ae4abe32b09.tar.gz
Simple-cdfb3419d6a3c3067ce3c4157b605ae4abe32b09.zip
Chapter 10: Structs and Memory
Co-authored-by: Thalia Archibald <thalia@archibald.dev> Co-authored-by: Dibyendu Majumdar <mobile@majumdar.org.uk> Co-authored-by: XmiliaH <45106915+XmiliaH@users.noreply.github.com> Co-authored-by: XmiliaH <xmilia.hermit@gmail.com> Co-authored-by: Robert Obkircher <robert.obkircher@gmail.com>
Diffstat (limited to 'docs/chapter10/example2c.gv')
-rw-r--r--docs/chapter10/example2c.gv53
1 files changed, 53 insertions, 0 deletions
diff --git a/docs/chapter10/example2c.gv b/docs/chapter10/example2c.gv
new file mode 100644
index 00000000..76db03bb
--- /dev/null
+++ b/docs/chapter10/example2c.gv
@@ -0,0 +1,53 @@
+digraph chapter10 {
+/*
+struct Bar {
+ int a;
+ int b;
+}
+struct Foo {
+ int x;
+}
+Foo? foo = null;
+Bar bar = new Bar;
+bar.a = 1;
+bar.a = 2;
+return bar.a;
+
+*/
+ rankdir=BT;
+ concentrate="true";
+ compound="true";
+ subgraph cluster_Nodes {
+ Con_16 [ label="#2" ];
+ Store17 [ label=".a =" ];
+ Start2 [ shape=plaintext label=<
+ <TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0" CELLPADDING="4">
+ <TR><TD BGCOLOR="yellow">Start</TD></TR>
+ <TR><TD>
+ <TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
+ <TR><TD PORT="p0" BGCOLOR="yellow">$ctrl</TD><TD PORT="p2">$2</TD><TD PORT="p3">$3</TD><TD PORT="p4">$4</TD></TR>
+ </TABLE>
+ </TD></TR>
+ </TABLE>>
+ ];
+ Return19 [ shape=box style=filled fillcolor=yellow label="Return" ];
+ Stop3 [ shape=box style=filled fillcolor=yellow label="Stop" ];
+ new10 [ label="new Bar" ];
+ Con_11 [ label="#0" ];
+ Store13 [ label=".b =" ];
+ }
+ edge [ fontname=Helvetica, fontsize=8 ];
+ Store17 -> Start2:p2[taillabel=1 color=blue];
+ Store17 -> new10[taillabel=2];
+ Store17 -> Con_16[taillabel=3];
+ Return19 -> Start2:p0[taillabel=0 color=red];
+ Return19 -> Con_16[taillabel=1];
+ Return19 -> Store17[taillabel=2 color=blue];
+ Return19 -> Store13[taillabel=3 color=blue];
+ Return19 -> Start2:p4[taillabel=4 color=blue];
+ Stop3 -> Return19[taillabel=0 color=red];
+ new10 -> Start2:p0[taillabel=0 color=green];
+ Store13 -> Start2:p3[taillabel=1 color=blue];
+ Store13 -> new10[taillabel=2];
+ Store13 -> Con_11[taillabel=3];
+}