From b0d2f2fa6323c5f7e88bb27df2b2735b917ea3c2 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Sat, 25 Feb 2023 13:37:15 -0500 Subject: Add high level explanation of compiler passes. --- chickadee/graphics/seagull.scm | 9 +++++++++ 1 file changed, 9 insertions(+) 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. ;;; -- cgit v1.2.3