mirror of
https://github.com/achlipala/frap.git
synced 2024-11-10 00:07:51 +00:00
Fix compiler for stack machine
I think there's a typo for stack machine compiler - PushVar should push x not n.
This commit is contained in:
parent
971075850b
commit
0aac2cbdda
1 changed files with 1 additions and 1 deletions
|
@ -595,7 +595,7 @@ Here is the compiler that concerns us now, where we write $\concat{s_1}{s_2}$ fo
|
|||
\encoding
|
||||
\begin{eqnarray*}
|
||||
\compile{n} &=& \mathsf{PushConst}(n) \\
|
||||
\compile{x} &=& \mathsf{PushVar}(n) \\
|
||||
\compile{x} &=& \mathsf{PushVar}(x) \\
|
||||
\compile{e_1 + e_2} &=& \concat{\compile{e_1}}{\concat{\compile{e_2}}{\mathsf{Add}}} \\
|
||||
\compile{e_1 \times e_2} &=& \concat{\compile{e_1}}{\concat{\compile{e_2}}{\mathsf{Multiply}}}
|
||||
\end{eqnarray*}
|
||||
|
|
Loading…
Reference in a new issue