Эх сурвалжийг харах

removed vectorof from R_3

Jeremy Siek 9 жил өмнө
parent
commit
e683517d1e
1 өөрчлөгдсөн 5 нэмэгдсэн , 1 устгасан
  1. 5 1
      book.tex

+ 5 - 1
book.tex

@@ -3764,7 +3764,7 @@ short-circuiting behavior in the order of evaluation of its arguments.
 \[
 \[
 \begin{array}{lcl}
 \begin{array}{lcl}
   \Type &::=& \gray{\key{Integer} \mid \key{Boolean}} 
   \Type &::=& \gray{\key{Integer} \mid \key{Boolean}} 
-         \mid (\key{Vector}\;\Type^{+}) \mid (\key{Vectorof} \;\Type) \mid \key{Void}\\
+         \mid (\key{Vector}\;\Type^{+}) \mid \key{Void}\\
   \Exp &::=& \gray{\Int \mid (\key{read}) \mid (\key{-}\;\Exp) \mid (\key{+} \; \Exp\;\Exp)}  \\
   \Exp &::=& \gray{\Int \mid (\key{read}) \mid (\key{-}\;\Exp) \mid (\key{+} \; \Exp\;\Exp)}  \\
      &\mid&  \gray{\Var \mid \LET{\Var}{\Exp}{\Exp} 
      &\mid&  \gray{\Var \mid \LET{\Var}{\Exp}{\Exp} 
        \mid \key{\#t} \mid \key{\#f} \mid 
        \mid \key{\#t} \mid \key{\#f} \mid 
@@ -5641,6 +5641,10 @@ $\Rightarrow$
 
 
 \paragraph{Project}
 \paragraph{Project}
 
 
+
+\marginpar{\scriptsize To do: the inner 'if' is unnecessary because
+ we know T at compile time. Also, we need to check function arity. \\ --Jeremy}
+
 The instruction selection for \key{project} is a bit more involved. We
 The instruction selection for \key{project} is a bit more involved. We
 first check to see if the tag on the tagged value matches the tag of
 first check to see if the tag on the tagged value matches the tag of
 the target type $T$. If not, we halt the program by calling the
 the target type $T$. If not, we halt the program by calling the