# HG changeset patch # User Christian Urban # Date 1606348391 0 # Node ID ba25eaf6043ca57502d32e87f7a2080a20f1a1ab # Parent 2b9956d29038cdd6b8aaf10cd27ff774e291481b updated diff -r 2b9956d29038 -r ba25eaf6043c 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 2b9956d29038 -r ba25eaf6043c slides/slides07.pdf Binary file slides/slides07.pdf has changed diff -r 2b9956d29038 -r ba25eaf6043c 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}