slides/slides08.tex
changeset 600 d488a3e7b0ec
parent 598 e3ad67cd5123
child 601 208b0f67a3d0
equal deleted inserted replaced
599:33c4b580092b 600:d488a3e7b0ec
     1 \documentclass[dvipsnames,14pt,t]{beamer}
     1 \documentclass[dvipsnames,14pt,t]{beamer}
     2 \usepackage{../slides}
     2 \usepackage{../slides}
     3 \usepackage{../langs}
     3 \usepackage{../langs}
     4 \usepackage{../data}
     4 \usepackage{../data}
     5 \usepackage{../graphics}
     5 \usepackage{../graphics}
       
     6 \usepackage{../grammar}
     6 
     7 
     7 % beamer stuff 
     8 % beamer stuff 
     8 \renewcommand{\slidecaption}{CFL 07, King's College London}
     9 \renewcommand{\slidecaption}{CFL 07, King's College London}
     9 \newcommand{\bl}[1]{\textcolor{blue}{#1}}       
    10 \newcommand{\bl}[1]{\textcolor{blue}{#1}}       
    10 
    11 
    21 
    22 
    22   \normalsize
    23   \normalsize
    23   \begin{center}
    24   \begin{center}
    24   \begin{tabular}{ll}
    25   \begin{tabular}{ll}
    25   Email:  & christian.urban at kcl.ac.uk\\
    26   Email:  & christian.urban at kcl.ac.uk\\
    26   Office: & N7.07 (North Wing, Bush House)\\
    27   Office: & N\liningnums{7.07} (North Wing, Bush House)\\
    27   Slides: & KEATS (also home work is there)\\
    28   Slides: & KEATS (also home work is there)\\
    28   \end{tabular}
    29   \end{tabular}
    29   \end{center}
    30   \end{center}
    30 
    31 
    31 \end{frame}
    32 \end{frame}
    54 \begin{frame}[c]
    55 \begin{frame}[c]
    55 \begin{textblock}{10}(0.5,0.5)
    56 \begin{textblock}{10}(0.5,0.5)
    56   \LARGE
    57   \LARGE
    57   \fontspec{Hoefler Text Black}
    58   \fontspec{Hoefler Text Black}
    58   \textcolor{ProcessBlue}{JVM\\ Code}
    59   \textcolor{ProcessBlue}{JVM\\ Code}
       
    60   \\[12mm]
       
    61 
       
    62   \normalsize
       
    63   Jasmin\\
       
    64   Krakatau\\
       
    65   ASM lib
    59 \end{textblock}
    66 \end{textblock}
       
    67 
       
    68 
    60 \fontsize{8}{10}\selectfont
    69 \fontsize{8}{10}\selectfont
    61 %\footnotesize
    70 %\footnotesize
    62 \mbox{}\\[-8mm]\mbox{}
    71 \mbox{}\\[-8mm]\mbox{}
    63 
    72 
    64 \begin{columns}
    73 \begin{columns}
    74 
    83 
    75 \end{frame}
    84 \end{frame}
    76 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
    85 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
    77  
    86  
    78  
    87  
    79  
    88  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    80 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    89 \begin{frame}[t]
    81 \mode<presentation>{
       
    82 \begin{frame}[c]
       
    83 
    90 
    84 \begin{center}
    91 \begin{center}
    85 \bl{\begin{tabular}{@{}lcl@{}}
    92 \bl{\begin{tabular}{@{}lcl@{}}
    86 \textit{Stmt} & $\rightarrow$ &  $\texttt{skip}$\\
    93 \\[-12mm]        
    87               & $|$ & \textit{Id}\;\texttt{:=}\;\textit{AExp}\\
    94 \meta{Stmt} & $::=$ &  $\texttt{skip}$\\
    88               & $|$ & \texttt{if}\; \textit{BExp} \;\texttt{then}\; \textit{Block} \;\texttt{else}\; \textit{Block}\\
    95               & $|$ & \textit{Id}\;\texttt{:=}\;\meta{AExp}\\
    89               & $|$ & \texttt{while}\; \textit{BExp} \;\texttt{do}\; \textit{Block}\\
    96               & $|$ & \texttt{if}\; \meta{BExp} \;\texttt{then}\; \meta{Block} \;\texttt{else}\; \meta{Block}\\
       
    97               & $|$ & \texttt{while}\; \meta{BExp} \;\texttt{do}\; \meta{Block}\\
    90               & $|$ & \texttt{read}\;\textit{Id}\\
    98               & $|$ & \texttt{read}\;\textit{Id}\\
    91               & $|$ & \texttt{write}\;\textit{Id}\\
    99               & $|$ & \texttt{write}\;\textit{Id}\\
    92               & $|$ & \texttt{write}\;\textit{String}\medskip\\
   100               & $|$ & \texttt{write}\;\textit{String}\medskip\\
    93 \textit{Stmts} & $\rightarrow$ &  \textit{Stmt} \;\texttt{;}\; \textit{Stmts}\\
   101 \meta{Stmts} & $::=$ &  \meta{Stmt} \;\texttt{;}\; \meta{Stmts}\\
    94               & $|$ & \textit{Stmt}\medskip\\
   102               & $|$ & \meta{Stmt}\medskip\\
    95 \textit{Block} & $\rightarrow$ &  \texttt{\{}\,\textit{Stmts}\,\texttt{\}}\\
   103 \meta{Block} & $::=$ &  \texttt{\{}\,\meta{Stmts}\,\texttt{\}}\\
    96                 & $|$ & \textit{Stmt}\medskip\\
   104                 & $|$ & \meta{Stmt}\medskip\\
    97 \textit{AExp} & $\rightarrow$ & \ldots\\
   105 \meta{AExp} & $::=$ & \ldots\\
    98 \textit{BExp} & $\rightarrow$ & \ldots\\
   106 \meta{BExp} & $::=$ & \ldots\\
    99 \end{tabular}}
   107 \end{tabular}}
   100 \end{center}
   108 \end{center}
   101 
   109 \end{frame}
   102 
   110 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
   103 \end{frame}}
   111 
   104 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
       
   105 
   112 
   106 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   113 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   107 \begin{frame}[c]
   114 \begin{frame}[c]
   108 \frametitle{\begin{tabular}{c}Fibonacci Numbers\end{tabular}}
   115 \frametitle{\begin{tabular}{c}Fibonacci Numbers\end{tabular}}
   109 
   116 
   216 \item is garbage collected $\Rightarrow$ no buffer overflows
   223 \item is garbage collected $\Rightarrow$ no buffer overflows
   217 \item some languages compiled to the JVM: Scala, Clojure\ldots
   224 \item some languages compiled to the JVM: Scala, Clojure\ldots
   218 \end{itemize}
   225 \end{itemize}
   219 
   226 
   220 \end{frame}
   227 \end{frame}
   221 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
   228 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
       
   229 
   222 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   230 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   223 \begin{frame}[t,fragile]
   231 \begin{frame}[t,fragile]
   224 \frametitle{Compiling AExps}
   232 \frametitle{Compiling AExps}
   225 
   233 
   226 For example \bl{$1 + ((2 * 3) + (4 - 3))$}:\medskip
   234 For example \liningnums{\bl{$1 + ((2 * 3) + (4 - 3))$}}:\medskip
   227 
   235   
   228 \begin{columns}[T]
   236 \begin{columns}[T]
   229 \begin{column}{.3\textwidth}
   237 \begin{column}{.3\textwidth}
   230 \begin{center}
   238 \begin{center}
   231 \bl{\begin{tikzpicture}
   239 \bl{\begin{tikzpicture}
   232 \tikzset{level distance=12mm,sibling distance=4mm}
   240 \tikzset{level distance=12mm,sibling distance=4mm}
   233 \tikzset{edge from parent/.style={draw,very thick}}
   241 \tikzset{edge from parent/.style={draw,very thick}}
   234 \Tree [.$+$ [.$1$ ] [.$+$ [.$*$ $2$ $3$ ] [.$-$ $4$ $3$ ]]]
   242 \Tree [.$+$ [.$1$ ] [.$+$ [.$*$ $2$ $3$ ] [.$-$ $4$ $3$ ]]]
   235 \end{tikzpicture}}
   243 \end{tikzpicture}}
   236 \end{center}
   244 \end{center}
   237 \end{column}
   245 \end{column}
   238 \begin{column}{.3\textwidth}
   246 \begin{column}{.3\textwidth}  
   239 \begin{lstlisting}[language=JVMIS,numbers=none]
   247 \begin{lstlisting}[language=JVMIS,numbers=none]
   240 ldc 1 
   248 ldc 1 
   241 ldc 2 
   249 ldc 2 
   242 ldc 3 
   250 ldc 3 
   243 imul 
   251 imul 
   256 
   264 
   257 \end{frame}
   265 \end{frame}
   258 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   266 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   259 
   267 
   260 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   268 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   261 \begin{frame}[t]
   269 \begin{frame}[t,fragile]
   262 \frametitle{\begin{tabular}{c}Compiling AExps\end{tabular}}
   270 \frametitle{Compiling AExps}
   263 
   271 
   264 {\Large\bl{1 + 2 + 3}}
   272 \liningnums{\textbf{\Large\bl{1 + 2 + 3}}}
   265 
   273 
   266 \begin{center}
   274 \begin{lstlisting}[language=JVMIS,numbers=none,xleftmargin=6cm]  
   267 \bl{\begin{tabular}{l}
   275 ldc 1
   268 ldc 1\\
   276 ldc 2
   269 ldc 2\\
   277 iadd
   270 iadd\\
   278 ldc 3
   271 ldc 3\\
   279 iadd
   272 iadd\\
   280 \end{lstlisting}
   273 \end{tabular}}
   281 
   274 \end{center}
   282 
   275 
   283 \end{frame}
   276 \end{frame}
   284 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
   277 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
   285 
   278 
   286 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   279 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   287 \begin{frame}[t,fragile]
   280 \mode<presentation>{
   288 \frametitle{Compiling AExps}
   281 \begin{frame}[t]
   289 
   282 \frametitle{\begin{tabular}{c}Compiling AExps\end{tabular}}
   290 \liningnums{\textbf{\Large\bl{1 + (2 + 3)}}}
   283 
   291 
   284 {\Large\bl{1 + (2 + 3)}}
   292 \begin{lstlisting}[language=JVMIS,numbers=none,xleftmargin=6cm]  
   285 
   293 ldc 1
   286 \begin{center}
   294 ldc 2
   287 \bl{\begin{tabular}{l}
   295 ldc 3
   288 ldc 1\\
   296 iadd
   289 ldc 2\\
   297 iadd
   290 ldc 3\\
   298 \end{lstlisting}
   291 iadd\\
   299 \bigskip\pause
   292 iadd\\
       
   293 \end{tabular}}
       
   294 \end{center}\bigskip\pause
       
   295 \vfill
   300 \vfill
   296 
   301 
   297 \bl{dadd, fadd, ladd, \ldots}
   302 \textcolor{codepurple}{\textbf{\texttt{dadd}}},
   298 
   303 \textcolor{codepurple}{\textbf{\texttt{fadd}}},
   299 \end{frame}}
   304 \textcolor{codepurple}{\textbf{\texttt{ladd}}}, \ldots
       
   305 
       
   306 \end{frame}
   300 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
   307 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
   301 
   308 
   302 
   309 
   303 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   310 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   304 \begin{frame}[t]
   311 \begin{frame}[t]
   318 
   325 
   319 \end{frame}
   326 \end{frame}
   320 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
   327 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
   321 
   328 
   322 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   329 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   323 \mode<presentation>{
   330 \begin{frame}[t,fragile]
   324 \begin{frame}[t]
       
   325 \frametitle{\begin{tabular}{c}Compiling AExps\end{tabular}}
   331 \frametitle{\begin{tabular}{c}Compiling AExps\end{tabular}}
   326 
   332 
   327 {\Large\bl{1 + 2 * 3 + (4 - 3)}}
   333 \liningnums{\textbf{\Large\bl{1 $+$ 2 $*$ 3 $+$ (4 $-$ 3)}}}
   328 
   334 
   329 \begin{center}
   335 \begin{lstlisting}[language=JVMIS,numbers=none,xleftmargin=6cm]         
   330 \bl{\begin{tabular}{l}
   336 ldc 1
   331 ldc 1\\
   337 ldc 2
   332 ldc 2\\
   338 ldc 3
   333 ldc 3\\
   339 imul
   334 imul\\
   340 ldc 4
   335 ldc 4\\
   341 ldc 3
   336 ldc 3\\
   342 isub
   337 isub\\
   343 iadd
   338 iadd\\
   344 iadd
   339 iadd\\
   345 \end{lstlisting}
   340 \end{tabular}}
   346 
   341 \end{center}
   347 \end{frame}
   342 
   348 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
   343 \end{frame}}
   349 
   344 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
   350 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   345 
   351 \begin{frame}[c]
   346 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
       
   347 \begin{frame}[t]
       
   348 \frametitle{Variables}
   352 \frametitle{Variables}
   349 
   353 \liningnums{\textbf{\Large\bl{x $:=$ 5 $+$ y $*$ 2}}}\bigskip\pause   
   350 {\Large\bl{$x := 5 + y * 2$}}\bigskip\pause   
       
   351 
   354 
   352 \begin{itemize}
   355 \begin{itemize}
   353 \item lookup: \bl{$\text{iload}\; index$}
   356 \item lookup: \bl{$\textcolor{codepurple}{\textbf{\texttt{iload}}}\; index$}
   354 \item store: \bl{$\text{istore}\; index$}
   357 \item store: \bl{$\textcolor{codepurple}{\textbf{\texttt{istore}}}\; index$}
   355 \end{itemize}\bigskip\pause
   358 \end{itemize}\bigskip\pause
   356 
   359 
   357 while compilating we have to maintain a map between our identifiers and the
   360 while compilating we have to maintain a map between our identifiers and the
   358 Java bytecode indices
   361 Java bytecode indices
   359 
   362 
   402 
   405 
   403 \end{frame}
   406 \end{frame}
   404 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
   407 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
   405 
   408 
   406 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   409 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   407 \begin{frame}[t]
   410 \begin{frame}[c]
   408 \frametitle{Compiling Statements}
   411 \frametitle{Compiling Statements}
   409 
   412 
   410 We return a list of instructions and an environment for the
   413 We return a list of instructions and an environment for the
   411 variables
   414 variables
   412 
   415 
   423 
   426 
   424 \end{frame}
   427 \end{frame}
   425 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
   428 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
   426 
   429 
   427 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   430 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   428 \begin{frame}[c]
   431 \begin{frame}[c,fragile]
   429 \frametitle{Compiling Assignments}
   432 \frametitle{Compiling Assignments}
   430 
   433 
   431 {\Large\bl{$x := x + 1$}}
   434 \liningnums{\textbf{\Large\bl{x $:=$ x $+$ 1}}}
   432 
   435 
   433 \begin{center}
   436 \begin{lstlisting}[language=JVMIS,numbers=none,xleftmargin=6cm]        
   434 \bl{\begin{tabular}{l}
   437 iload /*@\bl{$n_x$}@*/
   435 iload $n_x$\\
   438 ldc 1
   436 ldc 1\\
   439 iadd
   437 iadd\\
   440 istore /*@\bl{$n_x$}@*/
   438 istore $n_x$\\
   441 \end{lstlisting}\medskip
   439 \end{tabular}}
       
   440 \end{center}
       
   441 
   442 
   442 where \bl{$n_x$} is the index corresponding to the variable~\bl{$x$}
   443 where \bl{$n_x$} is the index corresponding to the variable~\bl{$x$}
   443 
   444 
   444 \end{frame}
   445 \end{frame}
   445 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
   446 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
   484 
   485 
   485 \end{frame}
   486 \end{frame}
   486 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
   487 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
   487 
   488 
   488 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   489 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   489 \begin{frame}[t]
   490 \begin{frame}[t,fragile]
   490 \frametitle{Conditional Jumps}
   491 \frametitle{Conditional Jumps}
   491 
   492 
   492 \begin{minipage}{1.1\textwidth}
   493 \begin{minipage}{1.1\textwidth}
   493 \begin{itemize}
   494 \begin{itemize}
   494 \item \bl{if\_icmpeq $label$} if two ints are equal, then jump\medskip
   495 \item \textcolor{codepurple}{\textbf{\texttt{if\_icmpeq}}} \bl{$label$}
   495 \item \bl{if\_icmpne $label$} if two ints aren't equal, then jump\medskip
   496   if two ints are equal, then jump\medskip
   496 \item \bl{if\_icmpge $label$} if one int is greater or equal then another, then jump
   497 \item \textcolor{codepurple}{\textbf{\texttt{if\_icmpne}}} \bl{$label$}
       
   498   if two ints aren't equal, then jump\medskip
       
   499 \item \textcolor{codepurple}{\textbf{\texttt{if\_icmpge}}} \bl{$label$}
       
   500   if one int is greater or equal then another, then jump
   497 \item[]\ldots
   501 \item[]\ldots
   498 \end{itemize}
   502 \end{itemize}
   499 \end{minipage}\pause
   503 \end{minipage}\pause
   500 
   504 
   501 
   505 \begin{lstlisting}[language=JVMIS,numbers=none,xleftmargin=2cm]
   502 \begin{center}
   506 /*@\bl{$L_1$:}@*/
   503 \bl{\begin{tabular}{l}
   507   if_icmpeq /*@\bl{$L_2$}@*/
   504 $L_1$:\\
   508   iload 1
   505 \hspace{5mm}if\_icmpeq\;$L_2$\\
   509   ldc 1
   506 \hspace{5mm}iload 1\\
   510   iadd
   507 \hspace{5mm}ldc 1\\
   511   if_icmpeq /*@\bl{$L_1$}@*/
   508 \hspace{5mm}iadd\\
   512 /*@\bl{$L_2$:}@*/
   509 \hspace{5mm}if\_icmpeq\;$L_1$\\
   513 \end{lstlisting}
   510 $L_2$:
   514 
   511 \end{tabular}}
       
   512 \end{center}
       
   513 
   515 
   514 \begin{textblock}{3.5}(11,12)
   516 \begin{textblock}{3.5}(11,12)
   515 \only<3>{labels must be unique}
   517 \only<3>{labels must be unique}
   516 \end{textblock}
   518 \end{textblock}
   517 \end{frame}
   519 \end{frame}