Prechádzať zdrojové kódy

python: cosmetics - minor grammar etc

Peter Thiemann 3 rokov pred
rodič
commit
adc719aecc
1 zmenil súbory, kde vykonal 6 pridanie a 5 odobranie
  1. 6 5
      book.tex

+ 6 - 5
book.tex

@@ -16795,7 +16795,7 @@ involves manipulating tagged values, the representation must be
 efficient. Recall that all of our values are 64 bits.  We shall steal
 efficient. Recall that all of our values are 64 bits.  We shall steal
 the 3 right-most bits to encode the tag.  We use $001$ to identify
 the 3 right-most bits to encode the tag.  We use $001$ to identify
 integers, $100$ for Booleans, $010$ for vectors, $011$ for procedures,
 integers, $100$ for Booleans, $010$ for vectors, $011$ for procedures,
-and $101$ for the void value. We define the following auxiliary
+and $101$ for the void value\python{, \key{None}}. We define the following auxiliary
 function for mapping types to tag codes.
 function for mapping types to tag codes.
 {\if\edition\racketEd
 {\if\edition\racketEd
 \begin{align*}
 \begin{align*}
@@ -16815,8 +16815,8 @@ function for mapping types to tag codes.
 \itm{tagof}(\key{type(None)}) &= 101
 \itm{tagof}(\key{type(None)}) &= 101
 \end{align*}
 \end{align*}
 \fi}
 \fi}
-This stealing of 3 bits comes at some price: our integers are reduced
-to ranging from $-2^{60}$ to $2^{60}$. The stealing does not adversely
+This stealing of 3 bits comes at some price: integers are now restricted
+to the range from $-2^{60}$ to $2^{60}$. The stealing does not adversely
 affect vectors and procedures because those values are addresses, and
 affect vectors and procedures because those values are addresses, and
 our addresses are 8-byte aligned so the rightmost 3 bits are unused,
 our addresses are 8-byte aligned so the rightmost 3 bits are unused,
 they are always $000$. Thus, we do not lose information by overwriting
 they are always $000$. Thus, we do not lose information by overwriting
@@ -16931,7 +16931,8 @@ Note that in both \code{Inject} and \code{Project}, the type $T$ is
 restricted to a flat type $\FType$, which simplifies the
 restricted to a flat type $\FType$, which simplifies the
 implementation and corresponds with the needs for compiling \LangDyn{}.
 implementation and corresponds with the needs for compiling \LangDyn{}.
 
 
-The \racket{\code{any-vector}}\python{\code{any\_tuple}} operators
+The \racket{\code{any-vector}} operators
+\python{\code{any\_tuple\_load} and \code{any\_len}}
 adapt the tuple operations so that they can be applied to a value of
 adapt the tuple operations so that they can be applied to a value of
 type \racket{\code{Any}}\python{\code{AnyType}}.  They also generalize the
 type \racket{\code{Any}}\python{\code{AnyType}}.  They also generalize the
 tuple operations in that the index is not restricted to be a literal
 tuple operations in that the index is not restricted to be a literal
@@ -18098,7 +18099,7 @@ not a tuple. We enable this differentiation by choosing not to use the
 tag $000$ in the $\itm{tagof}$ function. Instead, that bit pattern is
 tag $000$ in the $\itm{tagof}$ function. Instead, that bit pattern is
 reserved for identifying plain old pointers to tuples. That way, if
 reserved for identifying plain old pointers to tuples. That way, if
 one of the first three bits is set, then we have a tagged value and
 one of the first three bits is set, then we have a tagged value and
-inspecting the tag can differentiation between tuples ($010$) and the
+inspecting the tag can differentiate between tuples ($010$) and the
 other kinds of values.
 other kinds of values.
 
 
 %% \begin{exercise}\normalfont
 %% \begin{exercise}\normalfont