|
@@ -5464,8 +5464,8 @@ of the \key{if} is taken. The element at index $0$ of \code{t} is
|
|
&\mid& \gray{ \BINOP{\itm{cmp}}{\Exp}{\Exp}
|
|
&\mid& \gray{ \BINOP{\itm{cmp}}{\Exp}{\Exp}
|
|
\mid \IF{\Exp}{\Exp}{\Exp} } \\
|
|
\mid \IF{\Exp}{\Exp}{\Exp} } \\
|
|
&\mid& \VECTOR{\Exp} \\
|
|
&\mid& \VECTOR{\Exp} \\
|
|
- &\mid& \VECREF{\Exp}{\Int}\\
|
|
|
|
- &\mid& \VECSET{\Exp}{\Int}{\Exp}\\
|
|
|
|
|
|
+ &\mid& \VECREF{\Exp}{\INT{\Int}}\\
|
|
|
|
+ &\mid& \VECSET{\Exp}{\INT{\Int}}{\Exp}\\
|
|
&\mid& \VOID{} \mid \LP\key{HasType}~\Exp~\Type \RP \\
|
|
&\mid& \VOID{} \mid \LP\key{HasType}~\Exp~\Type \RP \\
|
|
R_3 &::=& \PROGRAM{\key{'()}}{\Exp}
|
|
R_3 &::=& \PROGRAM{\key{'()}}{\Exp}
|
|
\end{array}
|
|
\end{array}
|
|
@@ -6014,7 +6014,8 @@ Figure~\ref{fig:expose-alloc-output} shows the output of the
|
|
(let ([vecinit7976
|
|
(let ([vecinit7976
|
|
(let ([vecinit7972 42])
|
|
(let ([vecinit7972 42])
|
|
(let ([collectret7974
|
|
(let ([collectret7974
|
|
- (if (< (+ (global-value free_ptr) 16) (global-value fromspace_end))
|
|
|
|
|
|
+ (if (< (+ (global-value free_ptr) 16)
|
|
|
|
+ (global-value fromspace_end))
|
|
(void)
|
|
(void)
|
|
(collect 16)
|
|
(collect 16)
|
|
)])
|
|
)])
|
|
@@ -6026,7 +6027,8 @@ Figure~\ref{fig:expose-alloc-output} shows the output of the
|
|
)
|
|
)
|
|
])
|
|
])
|
|
(let ([collectret7978
|
|
(let ([collectret7978
|
|
- (if (< (+ (global-value free_ptr) 16) (global-value fromspace_end))
|
|
|
|
|
|
+ (if (< (+ (global-value free_ptr) 16)
|
|
|
|
+ (global-value fromspace_end))
|
|
(void)
|
|
(void)
|
|
(collect 16)
|
|
(collect 16)
|
|
)])
|
|
)])
|
|
@@ -6096,8 +6098,8 @@ C_2 & ::= & \gray{ (\itm{label}\key{:}~ \Tail)\ldots }
|
|
&\mid& \gray{ \NEG{\Atm} \mid \ADD{\Atm}{\Atm} }\\
|
|
&\mid& \gray{ \NEG{\Atm} \mid \ADD{\Atm}{\Atm} }\\
|
|
&\mid& \gray{ \UNIOP{\key{not}}{\Atm} \mid \BINOP{\itm{cmp}}{\Atm}{\Atm} } \\
|
|
&\mid& \gray{ \UNIOP{\key{not}}{\Atm} \mid \BINOP{\itm{cmp}}{\Atm}{\Atm} } \\
|
|
&\mid& (\key{Allocate} \,\itm{int}\,\itm{type}) \\
|
|
&\mid& (\key{Allocate} \,\itm{int}\,\itm{type}) \\
|
|
- &\mid& \BINOP{\key{'vector-ref}}{\Atm}{\Int} \\
|
|
|
|
- &\mid& (\key{Prim}~\key{'vector-set!}\,(\key{list}\,\Atm\,\Int\,\Atm))\\
|
|
|
|
|
|
+ &\mid& \BINOP{\key{'vector-ref}}{\Atm}{\INT{\Int}} \\
|
|
|
|
+ &\mid& (\key{Prim}~\key{'vector-set!}\,(\key{list}\,\Atm\,\INT{\Int}\,\Atm))\\
|
|
&\mid& (\key{GlobalValue} \,\Var) \mid (\key{Void})\\
|
|
&\mid& (\key{GlobalValue} \,\Var) \mid (\key{Void})\\
|
|
\Stmt &::=& \gray{ \ASSIGN{\VAR{\Var}}{\Exp} }
|
|
\Stmt &::=& \gray{ \ASSIGN{\VAR{\Var}}{\Exp} }
|
|
\mid (\key{Collect} \,\itm{int}) \\
|
|
\mid (\key{Collect} \,\itm{int}) \\
|
|
@@ -6221,7 +6223,7 @@ the tag at the beginning of the tuple representation.)
|
|
|$\itm{lhs}$| = (vector-ref |$\itm{vec}$| |$n$|);
|
|
|$\itm{lhs}$| = (vector-ref |$\itm{vec}$| |$n$|);
|
|
|$\Longrightarrow$|
|
|
|$\Longrightarrow$|
|
|
movq |$\itm{vec}'$|, %r11
|
|
movq |$\itm{vec}'$|, %r11
|
|
-movq |$-8(n+1)$|(%r11), |$\itm{lhs'}$|
|
|
|
|
|
|
+movq |$8(n+1)$|(%r11), |$\itm{lhs'}$|
|
|
|
|
|
|
|$\itm{lhs}$| = (vector-set! |$\itm{vec}$| |$n$| |$\itm{arg}$|);
|
|
|$\itm{lhs}$| = (vector-set! |$\itm{vec}$| |$n$| |$\itm{arg}$|);
|
|
|$\Longrightarrow$|
|
|
|$\Longrightarrow$|
|
|
@@ -6859,8 +6861,8 @@ inside each other.
|
|
&\mid& \gray{ \BINOP{\itm{cmp}}{\Exp}{\Exp}
|
|
&\mid& \gray{ \BINOP{\itm{cmp}}{\Exp}{\Exp}
|
|
\mid \IF{\Exp}{\Exp}{\Exp} } \\
|
|
\mid \IF{\Exp}{\Exp}{\Exp} } \\
|
|
&\mid& \gray{ \VECTOR{\Exp} } \\
|
|
&\mid& \gray{ \VECTOR{\Exp} } \\
|
|
- &\mid& \gray{ \VECREF{\Exp}{\Int} }\\
|
|
|
|
- &\mid& \gray{ \VECSET{\Exp}{\Int}{\Exp}} \\
|
|
|
|
|
|
+ &\mid& \gray{ \VECREF{\Exp}{\INT{\Int}} }\\
|
|
|
|
+ &\mid& \gray{ \VECSET{\Exp}{\INT{\Int}}{\Exp}} \\
|
|
&\mid& \gray{ \VOID{} \mid \LP\key{HasType}~\Exp~\Type \RP }
|
|
&\mid& \gray{ \VOID{} \mid \LP\key{HasType}~\Exp~\Type \RP }
|
|
\mid \APPLY{\Exp}{\Exp\ldots}\\
|
|
\mid \APPLY{\Exp}{\Exp\ldots}\\
|
|
\Def &::=& \FUNDEF{\Var}{([\Var \code{:} \Type]\ldots)}{\Type}{\code{'()}}{\Exp}\\
|
|
\Def &::=& \FUNDEF{\Var}{([\Var \code{:} \Type]\ldots)}{\Type}{\code{'()}}{\Exp}\\
|
|
@@ -7305,8 +7307,8 @@ output language, $F_1$, is defined in Figure~\ref{fig:f1-syntax}.
|
|
&\mid& \gray{ \BINOP{\itm{cmp}}{\Exp}{\Exp}
|
|
&\mid& \gray{ \BINOP{\itm{cmp}}{\Exp}{\Exp}
|
|
\mid \IF{\Exp}{\Exp}{\Exp} } \\
|
|
\mid \IF{\Exp}{\Exp}{\Exp} } \\
|
|
&\mid& \gray{ \VECTOR{\Exp} } \\
|
|
&\mid& \gray{ \VECTOR{\Exp} } \\
|
|
- &\mid& \gray{ \VECREF{\Exp}{\Int} }\\
|
|
|
|
- &\mid& \gray{ \VECSET{\Exp}{\Int}{\Exp}} \\
|
|
|
|
|
|
+ &\mid& \gray{ \VECREF{\Exp}{\INT{\Int}} }\\
|
|
|
|
+ &\mid& \gray{ \VECSET{\Exp}{\INT{\Int}}{\Exp}} \\
|
|
&\mid& \gray{ \VOID{} \mid \LP\key{HasType}~\Exp~\Type \RP
|
|
&\mid& \gray{ \VOID{} \mid \LP\key{HasType}~\Exp~\Type \RP
|
|
\mid \APPLY{\Exp}{\Exp\ldots} }\\
|
|
\mid \APPLY{\Exp}{\Exp\ldots} }\\
|
|
&\mid& \FUNREF{\Var}\\
|
|
&\mid& \FUNREF{\Var}\\
|
|
@@ -8034,8 +8036,8 @@ syntax for function application.
|
|
&\mid& \gray{ \BINOP{\itm{cmp}}{\Exp}{\Exp}
|
|
&\mid& \gray{ \BINOP{\itm{cmp}}{\Exp}{\Exp}
|
|
\mid \IF{\Exp}{\Exp}{\Exp} } \\
|
|
\mid \IF{\Exp}{\Exp}{\Exp} } \\
|
|
&\mid& \gray{ \VECTOR{\Exp} } \\
|
|
&\mid& \gray{ \VECTOR{\Exp} } \\
|
|
- &\mid& \gray{ \VECREF{\Exp}{\Int} }\\
|
|
|
|
- &\mid& \gray{ \VECSET{\Exp}{\Int}{\Exp}} \\
|
|
|
|
|
|
+ &\mid& \gray{ \VECREF{\Exp}{\INT{\Int}} }\\
|
|
|
|
+ &\mid& \gray{ \VECSET{\Exp}{\INT{\Int}}{\Exp}} \\
|
|
&\mid& \gray{ \VOID{} \mid \LP\key{HasType}~\Exp~\Type \RP
|
|
&\mid& \gray{ \VOID{} \mid \LP\key{HasType}~\Exp~\Type \RP
|
|
\mid \APPLY{\Exp}{\Exp\ldots} }\\
|
|
\mid \APPLY{\Exp}{\Exp\ldots} }\\
|
|
&\mid& \LAMBDA{[\Var\code{:}\Type]\ldots}{\Type}{\Exp}\\
|
|
&\mid& \LAMBDA{[\Var\code{:}\Type]\ldots}{\Type}{\Exp}\\
|