From 8748708d6c1f8436b77c327beec49990582656cf Mon Sep 17 00:00:00 2001 From: tamnd Date: Sun, 6 Sep 2026 07:33:45 +0700 Subject: [PATCH] B05 pointed at the wrong milestone Its closing section and its grader both said M3 was GIMPLE. M3 is the front end: the driver, the preprocessor, the C parser, GENERIC, types, the language hooks and gimplification. GIMPLE proper is M4. Gimplification is the one that makes the mistake easy to make, because it is the end of M3 and it is where a function stops being a tree, which is the sentence the old text used. --- lessons/b05-the-plugin/b05.ipynb | 8 +++++--- lessons/b05-the-plugin/build.py | 8 +++++--- lessons/b05-the-plugin/grade.py | 2 +- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/lessons/b05-the-plugin/b05.ipynb b/lessons/b05-the-plugin/b05.ipynb index d033112..7d1997c 100644 --- a/lessons/b05-the-plugin/b05.ipynb +++ b/lessons/b05-the-plugin/b05.ipynb @@ -961,9 +961,11 @@ "suite, and load code of your own into it. Everything from here on is about what the compiler\n", "does rather than how to get at it.\n", "\n", - "M3 is GIMPLE properly: the twenty odd statement codes, what a `GIMPLE_ASSIGN` really holds,\n", - "how the CFG is built and maintained, and the point in the pipeline where a function stops\n", - "being a tree and starts being a program." + "M3 is the front end, and it starts before the parser. What the thing you type `gcc` at\n", + "actually is and what it runs, the preprocessor, the C parser, GENERIC and the tree\n", + "representation everything else is built on, types, the language hooks a front end has to\n", + "fill in, and gimplification, which is where a function stops being a tree and starts being\n", + "a program." ] } ], diff --git a/lessons/b05-the-plugin/build.py b/lessons/b05-the-plugin/build.py index 0d83074..f0aced7 100644 --- a/lessons/b05-the-plugin/build.py +++ b/lessons/b05-the-plugin/build.py @@ -729,9 +729,11 @@ suite, and load code of your own into it. Everything from here on is about what the compiler does rather than how to get at it. -M3 is GIMPLE properly: the twenty odd statement codes, what a `GIMPLE_ASSIGN` really holds, -how the CFG is built and maintained, and the point in the pipeline where a function stops -being a tree and starts being a program. +M3 is the front end, and it starts before the parser. What the thing you type `gcc` at +actually is and what it runs, the preprocessor, the C parser, GENERIC and the tree +representation everything else is built on, types, the language hooks a front end has to +fill in, and gimplification, which is where a function stops being a tree and starts being +a program. """) raise SystemExit(lesson.save()) diff --git a/lessons/b05-the-plugin/grade.py b/lessons/b05-the-plugin/grade.py index 77c384d..458cd5a 100644 --- a/lessons/b05-the-plugin/grade.py +++ b/lessons/b05-the-plugin/grade.py @@ -341,7 +341,7 @@ def main(argv: list[str] | None = None) -> int: print("You can write a plugin, say why one was refused, put a pass of your own in the") print("pipeline at a place you chose, switch one of GCC's off, and explain why none of") print("it will survive the next release without being rebuilt.") - print("That is M2. M3 next: GIMPLE, properly.") + print("That is M2. M3 next: the front end, starting before the parser.") return 0 print("\nEverything except the reasoning questions is in the notebook. To reread:") print(" from gxray import plug, source")