--- a/slides09.tex Wed Nov 28 00:06:03 2012 +0000
+++ b/slides09.tex Wed Nov 28 07:00:35 2012 +0000
@@ -579,10 +579,10 @@
\hspace{5mm}if\_icmpeq\;$L_1$\\
$L_2$:
\end{tabular}}
-\end{center}\pause
+\end{center}
\begin{textblock}{3.5}(11,12)
-labels must be unique
+\only<3>{labels must be unique}
\end{textblock}
\end{frame}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -720,20 +720,66 @@
\end{frame}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\mode<presentation>{
+\begin{frame}[c]
+
+\begin{center}
+\small\bl{\begin{tabular}{l}
+.class public XXX.XXX\\
+.super java/lang/Object\\
+\\
+.method public <init>()V\\
+\;\; aload\_0\\
+\;\; invokenonvirtual java/lang/Object/<init>()V\\
+ \;\; return\\
+.end method\\
+\\
+.method public static main([Ljava/lang/String;)V\\
+\;\; .limit locals 200\\
+\;\; .limit stack 200\\
+\\
+ \textcolor{black}{(here comes the compiled code)}\\
+\\
+\;\; return\\
+.end method\\
+\end{tabular}}
+\end{center}
+
+\end{frame}}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\mode<presentation>{
\begin{frame}[c]
\frametitle{\begin{tabular}{c}Next Compiler Phases\end{tabular}}
\begin{itemize}
-\item assembly $\Rightarrow$ native code
-\item labels $\Rightarrow$ absolute or relative addresses
-
+\item assembly $\Rightarrow$ byte code (class file)
+\item labels $\Rightarrow$ absolute or relative jumps\bigskip\bigskip
+\item \texttt{javap} is a disassembler for class files
\end{itemize}
\end{frame}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\mode<presentation>{
+\begin{frame}[t]
+\frametitle{\begin{tabular}{c}Compiled Code\end{tabular}}
+
+\begin{center}
+\begin{tikzpicture}
+\begin{axis}[axis x line=bottom, axis y line=left, xlabel=n, ylabel=secs, legend style=small]
+\addplot+[smooth] file {compiled.data};
+\end{axis}
+\end{tikzpicture}
+\end{center}
+
+\end{frame}}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -760,11 +806,13 @@
\begin{center}
\begin{tikzpicture}
-\begin{axis}[ylabel=secs,
- xlabel=n,
enlargelimits=0.05,
ybar interval=0.7, legend style=small]
+\begin{axis}[axis x line=bottom, axis y line=left, ylabel=secs,
+ xlabel=n,
+ enlargelimits=0.05,
+ ybar interval=0.7, legend style=small]
\addplot file {interpreted2.data};
\addplot file {compiled2.data};
-%\legend{interpreted, compiled}
+%\legend{interpreted, compiled}
\end{axis}
\end{tikzpicture}
\end{center}