raz / commit 993cd630

commit
993cd6303b4e98a38d362ff3733fc67eea414283
author
Luis <42945842+ldiaz94@users.noreply.github.com>
date
parent
77a03984
Report 2026-10.38: a code procedure names a procedure or a global; the least an implementation accepts

patch · log

3 files changed, +40 -4

doc/raz.md (history) modified +28 -3

@@ -13,7 +13,7 @@
1313 This report defines the language. It is short on purpose. Whatever it
1414 doesn't allow, raz doesn't have.
1515
16-This is version 2026-10.37 of the report; section 11 says where each
16+This is version 2026-10.38 of the report; section 11 says where each
1717 version's changes are told. 2026-10.11 and 2026-10.12 are a thaw the owner chose,
1818 for a language anyone can build again. They break programs written
1919 for 2026-10.10 and before: for 2026-10.9, say, the report of compiler
@@ -77,6 +77,11 @@
7777 program that gives an atomic a pointer, writes through a string or a
7878 constant, or does what `SYSTEM` holds without importing it; raz 0.23
7979 still took them, as before; raz 0.24 doesn't.
80+2026-10.38, the last change before the language is frozen for good,
81+is for a program on the bare machine: a code procedure names a
82+procedure or a global variable in three operands (section 8), and
83+section 10 gives the least an implementation accepts, and what it does
84+past its own limits; it breaks no program.
8085
8186 The language is frozen, softly, from this version on: it changes only
8287 to mend a defect, and its library grows only by what breaks no program
@@ -1786,8 +1791,15 @@
17861791
17871792 A label, `name:`, names the place of the instruction after it, within
17881793 the procedure. A constant of the module may stand wherever a number
1789-does. Any bytes may be written with `db`, as in `db 0FH, 31H;`, for an
1790-instruction the assembler doesn't know.
1794+does. A procedure or a global variable of the module, or one an
1795+imported module exports, by its qualified name, stands for its address
1796+in three places only: `call p;` and `jmp p;`, which reach it from where they
1797+are, and `lea r, [v];`, which puts its address in a register.
1798+A label of the procedure is found first. Nothing of its type is
1799+checked, and no other operand takes one. What is named is part of the
1800+program, as a procedure that is called is. Any bytes may be written
1801+with `db`, as in `db 0FH, 31H;`, for an instruction the assembler
1802+doesn't know.
17911803
17921804 It is called like any procedure, with the System V convention: integer
17931805 and pointer arguments, and the addresses of `var` and `const` ones,
@@ -1938,6 +1950,17 @@
19381950 how many it reports and which warnings it gives are its own (appendix
19391951 A).
19401952
1953+**Limits.** An implementation accepts at least: 63 levels of
1954+parentheses and calls nested in one expression; 63 levels of statements
1955+nested in one procedure; a chain of 15 modules, each importing the
1956+next; 31 names declared together (`a, b: INT`) and 15 variables
1957+assigned together (`a, b := f()`); 1023 elements in one array literal;
1958+255 labels in one `match`; 31 deferred statements in force in one
1959+procedure; and 8 type arguments to a generic module. It may accept
1960+more, and its own limits are its own (appendix A); past one, it
1961+rejects the program with an error that names the limit, as for any
1962+other error, and never fails in another way.
1963+
19411964 ## 11. Versions
19421965
19431966 A version of this report is named by the month it was made in and a
@@ -1992,6 +2015,8 @@
19922015 a stack overflow may be caught by the machine or by checks in the
19932016 compiled code; either way the program stops with its message
19942017 (section 10).
2018+- **Limits.** How far past the least of section 10 it goes, and how
2019+ much stack and memory a compile of a given program needs.
19952020 - **Messages and warnings.** The text of the compiler's messages, how
19962021 many errors it reports before it stops, and which warnings it gives,
19972022 `-Werror` included (section 10). That a program that is an error in

doc/report-history.md (history) modified +11 -0

@@ -288,3 +288,14 @@
288288 and 7.6 that a race on a pointer, a slice or a variant is undefined.
289289 It breaks every module that does these without it; raz 0.23 still
290290 took them, and the built-ins unprefixed; 0.24 doesn't.
291+- **2026-10.38.** The last change before the hard freeze, for a program
292+ on the bare machine. In a code procedure a procedure or a global
293+ variable, of the module or exported by an imported one, stands for
294+ its address in `call p;`, `jmp p;` and `lea r, [v];`, and in no other
295+ operand; a label of the procedure is found first (section 8). Section
296+ 10 gives the least every implementation accepts (nesting of
297+ expressions and statements, a chain of imports, names declared and
298+ variables assigned together, an array literal's elements, a `match`'s
299+ labels, deferred statements, type arguments), and says that past its
300+ own limits it rejects the program with an error naming the limit;
301+ appendix A leaves how far past to it. It breaks no program.

src/Raz.raz (history) modified +1 -1

@@ -33,7 +33,7 @@
3333 import SYSTEM;
3434
3535 const
36- Report = "2026-10.37"; (* the version of doc/raz.md it follows *)
36+ Report = "2026-10.38"; (* the version of doc/raz.md it follows *)
3737 MemfdCreate = 319; (* the system call *)
3838 MfdCloexec = 1; (* an ELF still executes: the kernel opens it first *)
3939 Execve = 59;