Jeremy Siek 4 rokov pred
rodič
commit
0f35f084d2
1 zmenil súbory, kde vykonal 15 pridanie a 13 odobranie
  1. 15 13
      book.tex

+ 15 - 13
book.tex

@@ -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 \IF{\Exp}{\Exp}{\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 \\
   R_3 &::=& \PROGRAM{\key{'()}}{\Exp}
 \end{array}
@@ -6014,7 +6014,8 @@ Figure~\ref{fig:expose-alloc-output} shows the output of the
   (let ([vecinit7976
          (let ([vecinit7972 42])
            (let ([collectret7974
-                  (if (< (+ (global-value free_ptr) 16) (global-value fromspace_end))
+                  (if (< (+ (global-value free_ptr) 16) 
+                         (global-value fromspace_end))
                       (void)
                       (collect 16)
                       )])
@@ -6026,7 +6027,8 @@ Figure~\ref{fig:expose-alloc-output} shows the output of the
            )
          ])
     (let ([collectret7978
-           (if (< (+ (global-value free_ptr) 16) (global-value fromspace_end))
+           (if (< (+ (global-value free_ptr) 16)
+                  (global-value fromspace_end))
                (void)
                (collect 16)
                )])
@@ -6096,8 +6098,8 @@ C_2 & ::= & \gray{ (\itm{label}\key{:}~ \Tail)\ldots }
    &\mid& \gray{ \NEG{\Atm} \mid \ADD{\Atm}{\Atm} }\\
    &\mid& \gray{ \UNIOP{\key{not}}{\Atm} \mid \BINOP{\itm{cmp}}{\Atm}{\Atm}  } \\
    &\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})\\
 \Stmt &::=& \gray{ \ASSIGN{\VAR{\Var}}{\Exp} } 
        \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$|);
 |$\Longrightarrow$|
 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}$|);
 |$\Longrightarrow$|
@@ -6859,8 +6861,8 @@ inside each other.
      &\mid& \gray{ \BINOP{\itm{cmp}}{\Exp}{\Exp}
       \mid \IF{\Exp}{\Exp}{\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 \APPLY{\Exp}{\Exp\ldots}\\
  \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 \IF{\Exp}{\Exp}{\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 \APPLY{\Exp}{\Exp\ldots} }\\
      &\mid& \FUNREF{\Var}\\
@@ -8034,8 +8036,8 @@ syntax for function application.
      &\mid& \gray{ \BINOP{\itm{cmp}}{\Exp}{\Exp}
       \mid \IF{\Exp}{\Exp}{\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 \APPLY{\Exp}{\Exp\ldots} }\\
      &\mid& \LAMBDA{[\Var\code{:}\Type]\ldots}{\Type}{\Exp}\\