# HG changeset patch # User Christian Urban # Date 1606348391 0 # Node ID 350244289479507ec26ae2fa9e37e8a8e6227994 # Parent c909756486eeeac8e426ed39e5d8f4316749bcb4 updated diff -r c909756486ee -r 350244289479 progs/while/compile.sc --- a/progs/while/compile.sc Tue Nov 24 21:22:31 2020 +0000 +++ b/progs/while/compile.sc Wed Nov 25 23:53:11 2020 +0000 @@ -105,7 +105,6 @@ compile_aexp(a1, env) ++ compile_aexp(a2, env) ++ compile_op(op) } - // boolean expression compilation // - the jump-label is for where to jump if the condition is not true def compile_bexp(b: BExp, env : Env, jmp: String) : String = b match { diff -r c909756486ee -r 350244289479 slides/slides07.pdf Binary file slides/slides07.pdf has changed diff -r c909756486ee -r 350244289479 slides/slides07.tex --- a/slides/slides07.tex Tue Nov 24 21:22:31 2020 +0000 +++ b/slides/slides07.tex Wed Nov 25 23:53:11 2020 +0000 @@ -593,7 +593,7 @@ For example \begin{lstlisting}[mathescape,numbers=none,language=While] -if 1 = 1 then x := 2 else y := 3 +if 1 == 1 then x := 2 else y := 3 \end{lstlisting} @@ -627,11 +627,11 @@ \begin{frame}[t] \frametitle{Compiling BExps} -{\Large\bl{$a_1 = a_2$}} +{\Large\bl{$a_1 == a_2$}} \begin{center} \bl{\begin{tabular}{lcl} -$\text{compile}(a_1 = a_2, E, lab)$ & $\dn$\\ +$\text{compile}(a_1 == a_2, E, lab)$ & $\dn$\\ \multicolumn{3}{l}{$\quad\text{compile}(a_1, E) \;@\;\text{compile}(a_2, E)\;@\; \text{if\_icmpne}\;lab$} \end{tabular}} \end{center}