equal
deleted
inserted
replaced
591 \frametitle{Compiling Ifs} |
591 \frametitle{Compiling Ifs} |
592 |
592 |
593 For example |
593 For example |
594 |
594 |
595 \begin{lstlisting}[mathescape,numbers=none,language=While] |
595 \begin{lstlisting}[mathescape,numbers=none,language=While] |
596 if 1 = 1 then x := 2 else y := 3 |
596 if 1 == 1 then x := 2 else y := 3 |
597 \end{lstlisting} |
597 \end{lstlisting} |
598 |
598 |
599 |
599 |
600 \begin{center} |
600 \begin{center} |
601 \begin{lstlisting}[mathescape,language=JVMIS,numbers=none] |
601 \begin{lstlisting}[mathescape,language=JVMIS,numbers=none] |
625 |
625 |
626 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
626 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
627 \begin{frame}[t] |
627 \begin{frame}[t] |
628 \frametitle{Compiling BExps} |
628 \frametitle{Compiling BExps} |
629 |
629 |
630 {\Large\bl{$a_1 = a_2$}} |
630 {\Large\bl{$a_1 == a_2$}} |
631 |
631 |
632 \begin{center} |
632 \begin{center} |
633 \bl{\begin{tabular}{lcl} |
633 \bl{\begin{tabular}{lcl} |
634 $\text{compile}(a_1 = a_2, E, lab)$ & $\dn$\\ |
634 $\text{compile}(a_1 == a_2, E, lab)$ & $\dn$\\ |
635 \multicolumn{3}{l}{$\quad\text{compile}(a_1, E) \;@\;\text{compile}(a_2, E)\;@\; \text{if\_icmpne}\;lab$} |
635 \multicolumn{3}{l}{$\quad\text{compile}(a_1, E) \;@\;\text{compile}(a_2, E)\;@\; \text{if\_icmpne}\;lab$} |
636 \end{tabular}} |
636 \end{tabular}} |
637 \end{center} |
637 \end{center} |
638 |
638 |
639 \end{frame} |
639 \end{frame} |