diff options
Diffstat (limited to 'Master/texmf-dist/doc')
-rw-r--r-- | Master/texmf-dist/doc/latex/drawstack/Makefile | 9 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/drawstack/README | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/drawstack/stack-example.pdf | bin | 55599 -> 110321 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/drawstack/stack-example.tex | 83 |
4 files changed, 93 insertions, 1 deletions
diff --git a/Master/texmf-dist/doc/latex/drawstack/Makefile b/Master/texmf-dist/doc/latex/drawstack/Makefile new file mode 100644 index 00000000000..8df48452151 --- /dev/null +++ b/Master/texmf-dist/doc/latex/drawstack/Makefile @@ -0,0 +1,9 @@ +all: stack-example.pdf drawstack.zip + +stack-example.pdf: stack-example.tex drawstack.sty + pdflatex stack-example.tex + +FILES=stack-example.pdf stack-example.tex drawstack.sty README Makefile + +drawstack.zip: $(FILES) + cd .. && zip -r $@ $(FILES:%=drawstack/%) && mv drawstack.zip drawstack/ diff --git a/Master/texmf-dist/doc/latex/drawstack/README b/Master/texmf-dist/doc/latex/drawstack/README index 388191c406c..64173b882c5 100644 --- a/Master/texmf-dist/doc/latex/drawstack/README +++ b/Master/texmf-dist/doc/latex/drawstack/README @@ -3,4 +3,4 @@ This is a simple LaTeX package to easily draw execution stack on top of TikZ. Author's name: Matthieu Moy -License type: lppl
\ No newline at end of file +License type: lppl diff --git a/Master/texmf-dist/doc/latex/drawstack/stack-example.pdf b/Master/texmf-dist/doc/latex/drawstack/stack-example.pdf Binary files differindex b74d38cba73..4cf88fea574 100644 --- a/Master/texmf-dist/doc/latex/drawstack/stack-example.pdf +++ b/Master/texmf-dist/doc/latex/drawstack/stack-example.pdf diff --git a/Master/texmf-dist/doc/latex/drawstack/stack-example.tex b/Master/texmf-dist/doc/latex/drawstack/stack-example.tex index 863b0981bed..3f87460897a 100644 --- a/Master/texmf-dist/doc/latex/drawstack/stack-example.tex +++ b/Master/texmf-dist/doc/latex/drawstack/stack-example.tex @@ -102,6 +102,89 @@ comments to see how to use it. \cell{Interesting cell} \cellround{Yes, this one!} \end{drawstack} +\section{Structures without a stack structure} + +\begin{tikzpicture} + \draw (3, -1) node (Otm) { + \begin{tabular}{c} + Object\\vtable + \end{tabular} + }; + + \drawstruct{(0,0)} + \structcell[freecell]{~} \coordinate (Atm) at (currentcell.east); + \structcell[freecell]{\texttt{@Object.equals()}} + \structcell[freecell]{\texttt{@code A.m()}} + \structcell[freecell]{\texttt{@code A.p()}} \coordinate (A) at (currentcell.west); + \structname{ + \begin{tabular}{c} + A's vtable + \end{tabular} + } + + \drawstruct{(-4,-3)} + \structcell[freecell]{} \coordinate (Btm) at (currentcell.east); + \structcell[freecell]{\texttt{@Object.equals()}} + \structcell[freecell]{\texttt{@code A.m()}} + \structcell[freecell]{\texttt{@code B.p()}} + \structcell[freecell]{\texttt{@code B.q()}} + \structname{B's vtable} + + \draw[->] (Btm) -- (A); + \draw[->] (Atm) -- (Otm); +\end{tikzpicture} + +\section{Structures and stack together} + +\begin{tikzpicture}[scale=.8] + + \stacktop{} + \separator + \cell{\texttt{p3}} \cellcomL{11(GB)} \coordinate (p3) at (currentcell.east); + \separator + \cell{\texttt{p2}} \cellcomL{10(GB)} \coordinate (p2) at (currentcell.east); + \separator + \cell{\texttt{p1}} \cellcomL{ 9(GB)} \coordinate (p1) at (currentcell.east); + \separator + \cell{\texttt{@P3D.diag}} \cellcomL{ 8(GB)} + \cell{\texttt{\footnotesize @Object.equals}} \cellcomL{ 7(GB)} + \cell{\texttt{3(GB)}} \cellcomL{ 6(GB)} \coordinate (T1) at (currentcell.east); + \separator + \cell{\texttt{@P2D.diag}} \cellcomL{ 5(GB)} + \cell{\texttt{\footnotesize @Object.equals}} \cellcomL{ 4(GB)} + \cell{\texttt{1(GB)}} \cellcomL{ 3(GB)} \coordinate (T2) at (currentcell.east); + \separator + \cell{\texttt{\footnotesize @Object.equals}} \cellcomL{ 2(GB)} + \cell{\texttt{null}} \cellcomL{ 1(GB)} + \cell[draw=none]{Stack} + + + \drawstruct{(5,1)}) + \structcell{z=2,5} + \structcell{y=2,5} + \structcell{x=2,5} + \structcell{.} \coordinate (O1) at (currentcell.west); + \coordinate (O1l) at (currentcell.south); + + \drawstruct{(9,-3)} + \structcell{y=1} + \structcell{x=1} + \structcell{.} \coordinate (O2) at (currentcell.west); + \coordinate (O2l) at (currentcell.south); + + \draw[->] (p3) -- (O1); + \draw[->] (p2) -- (O1); + \draw[->] (p1) -- (O2); + + \draw[->] (O1l) .. controls (O1 |- T1) .. (T1); + \draw[->] (O2l) .. controls (O2 |- T2) .. (T2); + + \draw (10,-10) node{Heap}; + +\end{tikzpicture} + + + \section{Using tikzpicture instead of drawstack} % The environment drawstack is basically a syntactic sugar for |