mirror of
https://github.com/achlipala/frap.git
synced 2024-11-28 07:16:20 +00:00
Merge pull request #11 from ZiyaoWei/patch-1
Fix compiler for stack machine
This commit is contained in:
commit
a2c453c075
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