diff --git a/book/a-map-of-the-territory.md b/book/a-map-of-the-territory.md index 038145ad9..3eb72a120 100644 --- a/book/a-map-of-the-territory.md +++ b/book/a-map-of-the-territory.md @@ -373,7 +373,7 @@ collector going in order to reclaim unused bits. If our language supports "instance of" tests so you can see what kind of object you have, then we need some representation to keep track of the type of each object during execution. -All of this stuff is going at runtime, so it's called, appropriately, the +All of this stuff is going on at runtime, so it's called, appropriately, the **runtime**. In a fully compiled language, the code implementing the runtime gets inserted directly into the resulting executable. In, say, [Go][], each compiled application has its own copy of Go's runtime directly embedded in it. diff --git a/book/resolving-and-binding.md b/book/resolving-and-binding.md index a663c38aa..71f6983a3 100644 --- a/book/resolving-and-binding.md +++ b/book/resolving-and-binding.md @@ -621,7 +621,7 @@ analysis, we immediately traverse into the body right then and there. ### Resolving the other syntax tree nodes -That covers the interesting corners of the grammars. We handle every place where +That covers the interesting corners of the grammar. We handle every place where a variable is declared, read, or written, and every place where a scope is created or destroyed. Even though they aren't affected by variable resolution, we also need visit methods for all of the other syntax tree nodes in order to diff --git a/book/strings.md b/book/strings.md index 086bf2c7d..997cdfce6 100644 --- a/book/strings.md +++ b/book/strings.md @@ -209,7 +209,7 @@ That's bad if the expression has side effects. If we put the body of `isObjType()` into the macro definition and then you did, say, ```c -IS_STRING(POP()) +IS_STRING(pop()) ``` then it would pop two values off the stack! Using a function fixes that. diff --git a/book/superclasses.md b/book/superclasses.md index 1eb17955b..dcadc0991 100644 --- a/book/superclasses.md +++ b/book/superclasses.md @@ -504,7 +504,7 @@ the given class's method table and creates an ObjBoundMethod to bundle the resulting closure to the current instance. The key difference is *which* class we pass to -`bindMethod()`. With a normal property access, we use the ObjInstances's own +`bindMethod()`. With a normal property access, we use the ObjInstance's own class, which gives us the dynamic dispatch we want. For a super call, we don't use the instance's class. Instead, we use the statically resolved superclass of the containing class, which the compiler has conveniently ensured is sitting on diff --git a/book/types-of-values.md b/book/types-of-values.md index 53a01b9bb..60cb7e293 100644 --- a/book/types-of-values.md +++ b/book/types-of-values.md @@ -595,7 +595,7 @@ each token type. We add cases for the six new operators. ^code comparison-operators (1 before, 1 after) The `==`, `<`, and `>` operators output a single instruction. The others output -a pair of instructions, one to evalute the inverse operation, and then an +a pair of instructions, one to evaluate the inverse operation, and then an `OP_NOT` to flip the result. Six operators for the price of three instructions! That means over in the VM, our job is simpler. Equality is the most general diff --git a/site/a-map-of-the-territory.html b/site/a-map-of-the-territory.html index 4ad575fb9..1a74c2c77 100644 --- a/site/a-map-of-the-territory.html +++ b/site/a-map-of-the-territory.html @@ -370,7 +370,7 @@
All of this stuff is going at runtime, so it’s called, appropriately, the +
All of this stuff is going on at runtime, so it’s called, appropriately, the runtime. In a fully compiled language, the code implementing the runtime gets inserted directly into the resulting executable. In, say, Go, each compiled application has its own copy of Go’s runtime directly embedded in it. diff --git a/site/resolving-and-binding.html b/site/resolving-and-binding.html index 5aea30cf1..36d0ae699 100644 --- a/site/resolving-and-binding.html +++ b/site/resolving-and-binding.html @@ -731,7 +731,7 @@
That covers the interesting corners of the grammars. We handle every place where +
That covers the interesting corners of the grammar. We handle every place where a variable is declared, read, or written, and every place where a scope is created or destroyed. Even though they aren’t affected by variable resolution, we also need visit methods for all of the other syntax tree nodes in order to diff --git a/site/superclasses.html b/site/superclasses.html index 02a631ce7..41ec3f7bb 100644 --- a/site/superclasses.html +++ b/site/superclasses.html @@ -656,7 +656,7 @@
The key difference is which class we pass to
-bindMethod()
. With a normal property access, we use the ObjInstances’s own
+bindMethod()
. With a normal property access, we use the ObjInstance’s own
class, which gives us the dynamic dispatch we want. For a super call, we don’t
use the instance’s class. Instead, we use the statically resolved superclass of
the containing class, which the compiler has conveniently ensured is sitting on
diff --git a/site/types-of-values.html b/site/types-of-values.html
index ccd9a27b7..e793675b2 100644
--- a/site/types-of-values.html
+++ b/site/types-of-values.html
@@ -824,7 +824,7 @@
The ==
, <
, and >
operators output a single instruction. The others output
-a pair of instructions, one to evalute the inverse operation, and then an
+a pair of instructions, one to evaluate the inverse operation, and then an
OP_NOT
to flip the result. Six operators for the price of three instructions!
That means over in the VM, our job is simpler. Equality is the most general operation.