summaryrefslogtreecommitdiff
path: root/chapter01/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'chapter01/README.md')
-rw-r--r--chapter01/README.md35
1 files changed, 20 insertions, 15 deletions
diff --git a/chapter01/README.md b/chapter01/README.md
index e5b79493..69a09328 100644
--- a/chapter01/README.md
+++ b/chapter01/README.md
@@ -71,34 +71,39 @@ at very little cost (nearly always small constant time) because all dependencies
### Unique Node ID
-Each node is assigned a unique dense integer Node ID when created. This ID is useful for debugging and e.g. as
-an index into a bit vector, which in turn is used to efficiently visit a (possibly cyclic) graph.
-The ID is also used to efficiently compute equality of nodes; a subject that we discuss in Chapter 8 Global Value Numbering.
+Each node is assigned a unique dense integer Node ID when created. This ID is
+useful for debugging, efficiently computing equality and e.g. as an index into
+a bit vector, which in turn is used to efficiently visit a (possibly cyclic)
+graph. We discuss Node equality in Chapter 8 Global Value Numbering.
### Start Node
-The Start node represents the start of the function. For now, we do not have any values in the Start node, this is because our function does not
-yet accept parameters. When we add parameters, the value of the Start node will be a tuple, and will require Projection nodes to extract the values.
+The Start node represents the start of the function. For now, we do not have any inputs to Start because our function does not
+yet accept parameters. When we add parameters the value of Start will be a tuple, and will require Projections to extract the values.
We discuss this in detail in Chapter 9: Functions and Calls.
### Constant Node
-The Constant node represents a constant value. At present, the only constants that we allow are integer literals; therefore the Constant node contains
-an integer value. As we add other types of constants, we will need to refactor how we represent Constant nodes.
+A Constant node represents a constant value. At present, the only constants
+that we allow are integer literals; therefore Constants contain an integer
+value. As we add other types of constants, we refactor how we represent
+Constants.
-The Constant node has no inputs. However, we set the Start node as an input to the Constant node to enable forward graph walk. This edge carries no semantic meaning,
-it is present _solely_ to allow visitation.
+Constants have no semantic inputs. However, we set Start as an input to
+Constants to enable a forward graph walk. This edge carries no semantic
+meaning, and it is present _solely_ to allow visitation.
-The Constant node's output is the value stored in it.
+The Constant's value is the value stored in it.
### Return Node
-The Return node has two inputs. The first input is a control node. The second input is the data node that supplies the return value.
+The Return node has two inputs. The first input is a control node and the
+second is the data node that supplies the return value.
-In this presentation, the Return node functions as the Stop node, since we are compiling a single unnamed function.
-A separate Stop node is not necessary. Compiling multiple functions is covered in Chapter 9: Functions and Calls.
+In this presentation, Return functions as a Stop node, since we are compiling a single unnamed function.
+A separate Stop is not necessary. Compiling multiple functions is covered in Chapter 9: Functions and Calls.
-The output of the Return node is the value it obtained from the data node.
+The Return's output is the value from the data node.
### Representation
@@ -111,4 +116,4 @@ return 1;
![Sea of Nodes Visual](./docs/02-graph.svg)
* Control nodes appear as square boxes
-* Control edges are in bold red \ No newline at end of file
+* Control edges are in bold red