raz / commit bbb1bf35

commit
bbb1bf35d2d4a5d95410680f7c49760f4c0fd034
author
Luis <42945842+ldiaz94@users.noreply.github.com>
date
parent
28e62ecd
release
v0.6.0
Step 10: v0.6.0

The compiler follows report 2026-10.12; the report drops its note that
it lags. doc/compiler.md's table and prose for the eleven units, the
listing and the trap report; README's -S, trap report, profiler and
versions; CLAUDE.md and PLAN.md say v0.6.0 is done, steps 5 to 10
awaiting review together. 7,632 lines of code; bench 931k lines/s.

patch · log

6 files changed, +34 -30

CLAUDE.md modified +5 -4

@@ -85,9 +85,10 @@
8585 **The freeze.** Since v0.5.0 the language changes only to mend a
8686 defect, and the library grows only by what breaks no program written
8787 for it. A wish for more, the owner's or yours, goes on the list in
88-`PLAN.md`, for a later thaw; it isn't built. v0.6.0 is such a thaw,
89-by the owner's word: report 2026-10.11, approved, which the compiler
90-is being brought to follow (`PLAN.md`). Keep
88+`PLAN.md`, for a later thaw; it isn't built. v0.6.0 was such a thaw,
89+by the owner's word: report 2026-10.12, which the compiler follows,
90+its parser reaching the machine only through `gen.pas` (`PLAN.md`;
91+its steps 5 to 10 await the owner's review). Keep
9192 `doc/compiler.md`'s table of lines and its routine names true when the
9293 compiler changes.
9394
@@ -98,7 +99,7 @@
9899 `.github/workflows/ci.yml`, which checks it and makes the GitHub
99100 release with a tarball of `raz` and `lib/`; it also checks every push
100101 to `main`. `README.md`'s "Versions" gives the commands. v0.3.0 is
101-the first; v0.5.0, report 2026-10.9, the latest.
102+the first; v0.6.0, report 2026-10.12, the latest.
102103
103104 `test/libc` runs its programs over `lib/Sys.raz`, the C one, through
104105 a link in its `mods`. A test or example without `.expect` is only

PLAN.md (history) modified +6 -5

@@ -64,11 +64,12 @@
6464 `doc/compiler.md`'s table, the report's version and the
6565 compiler's; tag `v0.5.0`.
6666
67-## Proposed, v0.6.0: raz to be rebuilt by anyone
67+## v0.6.0: raz to be rebuilt by anyone
6868
69-Under way: steps 1 to 4 are done, step 3 set aside since. The owner
70-has agreed the rest, to step 10, to be done without stopping. The freeze
71-doesn't hold for this work, by the owner's word.
69+Done, and tagged `v0.6.0`: report 2026-10.12, step 3 set aside. The
70+owner agreed steps 5 to 10 to be done without stopping, so they wait
71+for review together. The freeze didn't hold for this work, by the
72+owner's word.
7273
7374 **For:** a language a person alone can implement again, from the
7475 report, on any machine, in weeks; programs that run on small machines
@@ -159,7 +160,7 @@
159160 - [x] 9e. A profiler in `Rt`: a program run with `RAZ_PROFILE` set
160161 samples where it is, and at its end says which procedures and
161162 lines took the time.
162-- [ ] 10. `doc/compiler.md`, README, the report's version and the
163+- [x] 10. `doc/compiler.md`, README, the report's version and the
163164 compiler's; tag `v0.6.0`.
164165
165166 The budget, by the owner's word: a soft limit of 8,000 lines of code,

README.md (history) modified +6 -5

@@ -175,16 +175,16 @@
175175 The compiler says its own version and that of the report it follows:
176176
177177 $ ./raz --version
178- raz 0.5.0, report 2026-10.9
178+ raz 0.6.0, report 2026-10.12
179179
180180 The compiler's version is git's name for the commit it was built from:
181-`0.5.0` at the tag `v0.5.0`, `0.5.0-5-g38d29a8` five commits past it.
181+`0.6.0` at the tag `v0.6.0`, `0.6.0-5-g38d29a8` five commits past it.
182182 To release, check `main` and tag it; the tag's message is what
183183 `raz --version` will print:
184184
185185 $ make check
186- $ git tag -a v0.5.1 -m 'raz 0.5.1, report 2026-10.9'
187- $ git push origin v0.5.1
186+ $ git tag -a v0.6.1 -m 'raz 0.6.1, report 2026-10.12'
187+ $ git push origin v0.6.1
188188
189189 GitHub then builds and checks the tag, and makes a release of it with
190190 a tarball of `raz` and its `lib/`. A tag pushed before the workflow
@@ -195,7 +195,8 @@
195195
196196 Since v0.5.0 the language is frozen, softly: it changes only to mend a
197197 defect, and the library grows only by what breaks no program. Wishes
198-wait on a list in `PLAN.md`, for a later thaw.
198+wait on a list in `PLAN.md`, for a later thaw; v0.6.0 was one, for a
199+language anyone can build again from its report.
199200
200201 ## Not here
201202

doc/compiler.md (history) modified +16 -13

@@ -1,6 +1,6 @@
11 # Reading the raz compiler
22
3-The compiler is eleven files of Free Pascal, some 7,000 lines of code.
3+The compiler is eleven files of Free Pascal, under 7,700 lines of code.
44 This guide walks through them in the order they are best read: from the
55 characters of a source file to the bytes of an executable. It assumes
66 you know the language from `doc/raz.md`, and enough x86-64 to read a
@@ -92,7 +92,8 @@
9292 end;
9393 ```
9494
95-comes out as this (from `objdump -d -M intel`):
95+comes out as this (from `objdump -d -M intel`; `raz -S` shows the same
96+under each line of source, named by the compiler as it made them):
9697
9798 ```
9899 push rbp ; EnterBody: the frame
@@ -499,21 +500,23 @@
499500 line, column and file; and for the trap report, each live procedure's
500501 address range and name, and its variables, which `Body` (`parse.pas`)
501502 notes with `NoteVar`: each one's name, its place in the frame and how
502-`Rt` shows it (`VarKind`). `Rt` reads them, through `Rt.places`, which the
503-entry point sets, to say where a failed check or a signal was: the
504-place with the highest address up to the one it has. Then it follows
505-the chain of frames, each `rbp` pointing at its caller's, and says
506-each call under way and its variables (`calls`); `Rt.trace` does the
507-same on demand. A thread's first frame has `rbp` zero, which ends it.
508-With `RAZ_PROFILE` set, `Rt`'s body has the kernel send SIGPROF every
509-millisecond of the program's time (`setitimer`); `onProf` notes the
510-address it interrupted, and `exit` has `profile` say which procedures
511-and places those fell in, by the same tables. Its signal
503+`Rt` shows it (`VarKind`). `Rt` reads them, through `Rt.places`, which
504+the entry point sets, to say where a failed check or a signal was: the
505+place with the highest address up to the one it has. Its signal
512506 handlers, set in its body, run on a stack of their own, so that they
513507 can tell a stack overflow, and leave by returning to the faulting
514508 instruction with the handler reset, so that the signal ends the
515509 program.
516510
511+Then `Rt` follows the chain of frames, each `rbp` pointing at its
512+caller's, and says each call under way and its variables (`calls`);
513+`Rt.trace` does the same on demand. A thread's first frame has `rbp`
514+zero, which ends the chain. With `RAZ_PROFILE` set, `Rt`'s body has the
515+kernel send SIGPROF every millisecond of the program's time
516+(`setitimer`); `onProf` notes the address it interrupted, and `exit`
517+has `profile` say which procedures and places those fell in, by the
518+same tables.
519+
517520 The layout is chosen so the file can be mapped as it lies: text just
518521 after the headers, rodata on the next page, then a writable page that
519522 begins with the dynamic loader's table (in a program that uses C) and
@@ -571,7 +574,7 @@
571574 - **An instruction:** a routine in `x64.pas` built on `OpM` or `OpR`,
572575 and a line in `test/enctest.pas` to check its encoding.
573576 - **A machine:** a new `gen.pas`, answering the same calls, and an
574- encoder for it in place of `x64.pas`.
577+ encoder and assembler for it in place of `x64.pas`.
575578 - **A statement:** a reserved word in `scan.pas` (in `TSym` and `Words`,
576579 in the same order), a case in `Statement`, and a routine beside the
577580 others.

doc/raz.md (history) modified +0 -2

@@ -12,8 +12,6 @@
1212 This is version 2026-10.12 of the report; section 12 says what each
1313 version changed. It is a thaw the owner chose, for a language anyone
1414 can build again, and it breaks programs written for 2026-10.10.
15-The compiler follows version 2026-10.10 until it is brought to this
16-one.
1715
1816 The language is frozen, softly, from this version on: it changes only
1917 to mend a defect, and its library grows only by what breaks no program

src/raz.pas modified +1 -1

@@ -32,7 +32,7 @@
3232 { what git describe says, made by make: 0.3.0 at the tag v0.3.0,
3333 0.3.0-5-g38d29a8 five commits past it }
3434 Version = {$I version.inc};
35- Report = '2026-10.10'; { the version of doc/raz.md it follows }
35+ Report = '2026-10.12'; { the version of doc/raz.md it follows }
3636 MemfdCreate = 319; { the system call; FPC 3.2.2 has no name for it }
3737 MfdCloexec = 1; { an ELF still executes: the kernel opens it first }
3838