summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2023-02-25 13:37:15 -0500
committerDavid Thompson <dthompson2@worcester.edu>2023-06-08 08:14:41 -0400
commitb0d2f2fa6323c5f7e88bb27df2b2735b917ea3c2 (patch)
treef351845d9054116d1b65bd5a269b506921194e0a
parent4461d61bb13fbc9ac2ea3a5ecc09c90434653ec3 (diff)
Add high level explanation of compiler passes.
-rw-r--r--chickadee/graphics/seagull.scm9
1 files changed, 9 insertions, 0 deletions
diff --git a/chickadee/graphics/seagull.scm b/chickadee/graphics/seagull.scm
index 8a61367..4f88973 100644
--- a/chickadee/graphics/seagull.scm
+++ b/chickadee/graphics/seagull.scm
@@ -87,6 +87,15 @@
;; by Abdulaziz Ghuloum that showed me that even a mere mortal could
;; write a useful compiler. Thanks to Christine Lemmer Webber for
;; pointing me to that paper.
+;;
+;; The first pass of the compiler, the expander, converts Seagull code
+;; into an intermediate form that uses fewer syntactic forms and
+;; renames all variables to be program-unique. A simplifier pass then
+;; propagates constants and evaluates expressions that can be computed
+;; at compile-time such as (+ 1 2). Each expression is then
+;; associated with a type via a type inference pass. The fully typed
+;; program can then be emitted directly to GLSL code. There are other
+;; passes, but these are the most important.
;;;