summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThalia Archibald <thalia@archibald.dev>2024-10-23 17:51:09 -0700
committerCliff Click <cliffc@acm.org>2024-10-23 23:21:07 -0700
commitb54fc4291294e5504b785325e2f148da7fc82b6c (patch)
tree4db65eb6726d92ad8c8d1b8ea9ae5dd260d0ff07
parentf38d1d3c3c4c62dac6c64b44bc86f561602620b2 (diff)
downloadSimple-b54fc4291294e5504b785325e2f148da7fc82b6c.tar.gz
Simple-b54fc4291294e5504b785325e2f148da7fc82b6c.zip
Link to linear history and tag chapters
-rwxr-xr-x.github/workflows/linearize.sh4
-rw-r--r--.github/workflows/linearize.yml2
-rw-r--r--chapter01/README.md4
-rw-r--r--chapter02/README.md2
-rw-r--r--chapter03/README.md2
-rw-r--r--chapter04/README.md2
-rw-r--r--chapter05/README.md2
-rw-r--r--chapter06/README.md2
-rw-r--r--chapter07/README.md2
-rw-r--r--chapter08/README.md2
-rw-r--r--chapter09/README.md2
-rw-r--r--chapter10/README.md2
-rw-r--r--chapter11/README.md2
-rw-r--r--chapter12/README.md4
-rw-r--r--chapter13/README.md4
-rw-r--r--chapter14/README.md4
-rw-r--r--chapter15/README.md1
-rw-r--r--chapter16/README.md3
18 files changed, 44 insertions, 2 deletions
diff --git a/.github/workflows/linearize.sh b/.github/workflows/linearize.sh
index 07f22b08..36dfa50d 100755
--- a/.github/workflows/linearize.sh
+++ b/.github/workflows/linearize.sh
@@ -90,6 +90,7 @@ while read -r chapter; do
sed -Ei 's,\bdocs/,,' "docs/$chapter/README.md"
git add README.md "docs/$chapter/README.md" pom.xml
+ # Create a commit for the chapter, using the metadata.
if [[ ! "$first_author" =~ ^(.*)\ \<(.*)\>$ ]]; then
echo "First author does not match pattern" >&2
exit 1
@@ -99,4 +100,7 @@ while read -r chapter; do
GIT_AUTHOR_NAME="$name" GIT_AUTHOR_EMAIL="$email" GIT_AUTHOR_DATE="$author_date" \
GIT_COMMITTER_NAME="$name" GIT_COMMITTER_EMAIL="$email" GIT_COMMITTER_DATE="$committer_date" \
git commit -q -m "$message"
+
+ # Tag the chapter, so it can be stably linked.
+ git tag "linear-$chapter"
done
diff --git a/.github/workflows/linearize.yml b/.github/workflows/linearize.yml
index 76345f4c..a5bbe400 100644
--- a/.github/workflows/linearize.yml
+++ b/.github/workflows/linearize.yml
@@ -23,6 +23,6 @@ jobs:
git fetch linear
git checkout -b linear linear/main
git remote remove linear
- git push -f origin linear
+ git push -f origin refs/heads/linear 'refs/tags/linear-chapter*'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/chapter01/README.md b/chapter01/README.md
index 48e06bdf..98fd7555 100644
--- a/chapter01/README.md
+++ b/chapter01/README.md
@@ -10,9 +10,11 @@ We implement the `return` statement.
The `return` statement accepts an `expression` as an argument.
The only `expression` type is an integer literal, as shown in the example above.
+To implement this simple language, we introduce a few key components and data structures.
+
Here is the [complete language grammar](docs/01-grammar.md) for this chapter.
-To implement this simple language, we introduce a few key components and data structures.
+You can also read [this chapter](https://github.com/SeaOfNodes/Simple/tree/linear-chapter01) in a linear Git revision history on the [linear](https://github.com/SeaOfNodes/Simple/tree/linear) branch.
## Implementation Language
diff --git a/chapter02/README.md b/chapter02/README.md
index 14eef8b2..db23796d 100644
--- a/chapter02/README.md
+++ b/chapter02/README.md
@@ -9,6 +9,8 @@ return 1 + 2 * 3 + -5;
Here is the [complete language grammar](docs/02-grammar.md) for this chapter.
+You can also read [this chapter](https://github.com/SeaOfNodes/Simple/tree/linear-chapter02) in a linear Git revision history on the [linear](https://github.com/SeaOfNodes/Simple/tree/linear) branch and [compare](https://github.com/SeaOfNodes/Simple/compare/linear-chapter01...linear-chapter02) it to the previous chapter.
+
## Extensions to Intermediate Representation
In [Chapter 1](../chapter01/README.md) we introduced following nodes.
diff --git a/chapter03/README.md b/chapter03/README.md
index ec3d99e8..3c5d7c3e 100644
--- a/chapter03/README.md
+++ b/chapter03/README.md
@@ -15,6 +15,8 @@ return c;
Here is the [complete language grammar](docs/03-grammar.md) for this chapter.
+You can also read [this chapter](https://github.com/SeaOfNodes/Simple/tree/linear-chapter03) in a linear Git revision history on the [linear](https://github.com/SeaOfNodes/Simple/tree/linear) branch and [compare](https://github.com/SeaOfNodes/Simple/compare/linear-chapter02...linear-chapter03) it to the previous chapter.
+
## Extensions to Intermediate Representation
To recap, our list of Nodes are:
diff --git a/chapter04/README.md b/chapter04/README.md
index e71ff8a7..299d5da9 100644
--- a/chapter04/README.md
+++ b/chapter04/README.md
@@ -10,6 +10,8 @@ In this chapter we extend the language grammar with following features:
Here is the [complete language grammar](docs/04-grammar.md) for this chapter.
+You can also read [this chapter](https://github.com/SeaOfNodes/Simple/tree/linear-chapter04) in a linear Git revision history on the [linear](https://github.com/SeaOfNodes/Simple/tree/linear) branch and [compare](https://github.com/SeaOfNodes/Simple/compare/linear-chapter03...linear-chapter04) it to the previous chapter.
+
## Extensions to Intermediate Representation
In this chapter we add some new nodes and revise some existing nodes.
diff --git a/chapter05/README.md b/chapter05/README.md
index 7b5f645d..d79026d5 100644
--- a/chapter05/README.md
+++ b/chapter05/README.md
@@ -8,6 +8,8 @@ In this chapter we extend the language grammar with the following features:
Here is the [complete language grammar](docs/05-grammar.md) for this chapter.
+You can also read [this chapter](https://github.com/SeaOfNodes/Simple/tree/linear-chapter05) in a linear Git revision history on the [linear](https://github.com/SeaOfNodes/Simple/tree/linear) branch and [compare](https://github.com/SeaOfNodes/Simple/compare/linear-chapter04...linear-chapter05) it to the previous chapter.
+
## Recap
Here is a recap of the nodes introduced in previous chapters:
diff --git a/chapter06/README.md b/chapter06/README.md
index 613d5c81..a0edcf72 100644
--- a/chapter06/README.md
+++ b/chapter06/README.md
@@ -2,6 +2,8 @@
In this chapter we do not add new language features. Our goal is to add peephole optimization to `if` statements.
+You can also read [this chapter](https://github.com/SeaOfNodes/Simple/tree/linear-chapter06) in a linear Git revision history on the [linear](https://github.com/SeaOfNodes/Simple/tree/linear) branch and [compare](https://github.com/SeaOfNodes/Simple/compare/linear-chapter05...linear-chapter06) it to the previous chapter.
+
## Type System Revision
We now need to extend the type system to introduce another lattice structure, in addition to the Integer sub-lattice.
diff --git a/chapter07/README.md b/chapter07/README.md
index fe4c0625..020b9b77 100644
--- a/chapter07/README.md
+++ b/chapter07/README.md
@@ -4,6 +4,8 @@ In this chapter we introduce the `while` statement.
Here is the [complete language grammar](docs/07-grammar.md) for this chapter.
+You can also read [this chapter](https://github.com/SeaOfNodes/Simple/tree/linear-chapter07) in a linear Git revision history on the [linear](https://github.com/SeaOfNodes/Simple/tree/linear) branch and [compare](https://github.com/SeaOfNodes/Simple/compare/linear-chapter06...linear-chapter07) it to the previous chapter.
+
## Dealing With Back Edges
The complication introduced by looping constructs is that variables flow back into the body of the loop on iteration.
diff --git a/chapter08/README.md b/chapter08/README.md
index 41d6c11c..5c359b1b 100644
--- a/chapter08/README.md
+++ b/chapter08/README.md
@@ -8,6 +8,8 @@ In this chapter:
Here is the [complete language grammar](docs/08-grammar.md) for this chapter.
+You can also read [this chapter](https://github.com/SeaOfNodes/Simple/tree/linear-chapter08) in a linear Git revision history on the [linear](https://github.com/SeaOfNodes/Simple/tree/linear) branch and [compare](https://github.com/SeaOfNodes/Simple/compare/linear-chapter07...linear-chapter08) it to the previous chapter.
+
## Lazy Phi Creation
In [chapter 7](../chapter07/README.md), we created `PhiNode`s for all variables
diff --git a/chapter09/README.md b/chapter09/README.md
index b8ff8af1..2090931f 100644
--- a/chapter09/README.md
+++ b/chapter09/README.md
@@ -7,6 +7,8 @@ In this chapter:
No language changes in this chapter, just adding optimizations.
+You can also read [this chapter](https://github.com/SeaOfNodes/Simple/tree/linear-chapter09) in a linear Git revision history on the [linear](https://github.com/SeaOfNodes/Simple/tree/linear) branch and [compare](https://github.com/SeaOfNodes/Simple/compare/linear-chapter08...linear-chapter09) it to the previous chapter.
+
## Engineering Peepholes
The goal for Ch 9 is to "finish out" the Peepholes. Not that no more peeps will
diff --git a/chapter10/README.md b/chapter10/README.md
index 62c4844b..c27c4b74 100644
--- a/chapter10/README.md
+++ b/chapter10/README.md
@@ -8,6 +8,8 @@ In this chapter:
Here is the [complete language grammar](docs/10-grammar.md) for this chapter.
+You can also read [this chapter](https://github.com/SeaOfNodes/Simple/tree/linear-chapter10) in a linear Git revision history on the [linear](https://github.com/SeaOfNodes/Simple/tree/linear) branch and [compare](https://github.com/SeaOfNodes/Simple/compare/linear-chapter09...linear-chapter10) it to the previous chapter.
+
## Memory
In previous chapters, we dealt with scalar values that fit into a single
diff --git a/chapter11/README.md b/chapter11/README.md
index b724fdb5..7c84e083 100644
--- a/chapter11/README.md
+++ b/chapter11/README.md
@@ -16,6 +16,8 @@ differences compared to the version described in the paper.
Since this is a complex topic, we will present a high level summary first and then delve into the details.
+You can also read [this chapter](https://github.com/SeaOfNodes/Simple/tree/linear-chapter11) in a linear Git revision history on the [linear](https://github.com/SeaOfNodes/Simple/tree/linear) branch and [compare](https://github.com/SeaOfNodes/Simple/compare/linear-chapter10...linear-chapter11) it to the previous chapter.
+
## High Level Overview
The Sea of Nodes graph has two virtual graphs within it.
diff --git a/chapter12/README.md b/chapter12/README.md
index 9d5967b9..0a32298a 100644
--- a/chapter12/README.md
+++ b/chapter12/README.md
@@ -1,5 +1,9 @@
# Chapter 12: Floats
+In this chapter, we add a floating point type and values.
+
+You can also read [this chapter](https://github.com/SeaOfNodes/Simple/tree/linear-chapter12) in a linear Git revision history on the [linear](https://github.com/SeaOfNodes/Simple/tree/linear) branch and [compare](https://github.com/SeaOfNodes/Simple/compare/linear-chapter11...linear-chapter12) it to the previous chapter.
+
## Floats
Floating point values start with the `flt` type and compute IEEE754 64-bit arithmetic.
diff --git a/chapter13/README.md b/chapter13/README.md
index 1fe2097a..5d3979ad 100644
--- a/chapter13/README.md
+++ b/chapter13/README.md
@@ -1,5 +1,9 @@
# Chapter 13: References
+In this chapter, we add references and structs.
+
+You can also read [this chapter](https://github.com/SeaOfNodes/Simple/tree/linear-chapter13) in a linear Git revision history on the [linear](https://github.com/SeaOfNodes/Simple/tree/linear) branch and [compare](https://github.com/SeaOfNodes/Simple/compare/linear-chapter12...linear-chapter13) it to the previous chapter.
+
## References
Structs can reference other structs; references can be mutually recursive.
diff --git a/chapter14/README.md b/chapter14/README.md
index 7ac1e5e3..8451c4f5 100644
--- a/chapter14/README.md
+++ b/chapter14/README.md
@@ -1,5 +1,9 @@
# Chapter 14: Narrow types
+In this chapter, we add sub-word integer types.
+
+You can also read [this chapter](https://github.com/SeaOfNodes/Simple/tree/linear-chapter14) in a linear Git revision history on the [linear](https://github.com/SeaOfNodes/Simple/tree/linear) branch and [compare](https://github.com/SeaOfNodes/Simple/compare/linear-chapter13...linear-chapter14) it to the previous chapter.
+
## Narrow or sub-word types
As a prelude to arrays, especially arrays of bytes common in all networking
diff --git a/chapter15/README.md b/chapter15/README.md
index 354b6c66..d0f2ce60 100644
--- a/chapter15/README.md
+++ b/chapter15/README.md
@@ -21,6 +21,7 @@ will panic the Evaluator.
- `new int[1<<63]; // Too large`
- `new int[3.14]; // Not an integer`
+You can also read [this chapter](https://github.com/SeaOfNodes/Simple/tree/linear-chapter15) in a linear Git revision history on the [linear](https://github.com/SeaOfNodes/Simple/tree/linear) branch and [compare](https://github.com/SeaOfNodes/Simple/compare/linear-chapter14...linear-chapter15) it to the previous chapter.
## Parser
diff --git a/chapter16/README.md b/chapter16/README.md
index f78c8abc..3e29bbae 100644
--- a/chapter16/README.md
+++ b/chapter16/README.md
@@ -1,5 +1,8 @@
# Chapter 16: Constructors and Final fields
+In this chapter, we add constructors and final fields.
+
+You can also read [this chapter](https://github.com/SeaOfNodes/Simple/tree/linear-chapter16) in a linear Git revision history on the [linear](https://github.com/SeaOfNodes/Simple/tree/linear) branch and [compare](https://github.com/SeaOfNodes/Simple/compare/linear-chapter15...linear-chapter16) it to the previous chapter.
## Constructors