| | @@ -13,7 +13,7 @@ |
| 13 | 13 | This report defines the language. It is short on purpose. Whatever it |
| 14 | 14 | doesn't allow, raz doesn't have. |
| 15 | 15 | |
| 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 |
| 17 | 17 | version's changes are told. 2026-10.11 and 2026-10.12 are a thaw the owner chose, |
| 18 | 18 | for a language anyone can build again. They break programs written |
| 19 | 19 | for 2026-10.10 and before: for 2026-10.9, say, the report of compiler |
| | @@ -77,6 +77,11 @@ |
| 77 | 77 | program that gives an atomic a pointer, writes through a string or a |
| 78 | 78 | constant, or does what `SYSTEM` holds without importing it; raz 0.23 |
| 79 | 79 | 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. |
| 80 | 85 | |
| 81 | 86 | The language is frozen, softly, from this version on: it changes only |
| 82 | 87 | to mend a defect, and its library grows only by what breaks no program |
| | @@ -1786,8 +1791,15 @@ |
| 1786 | 1791 | |
| 1787 | 1792 | A label, `name:`, names the place of the instruction after it, within |
| 1788 | 1793 | 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. |
| 1791 | 1803 | |
| 1792 | 1804 | It is called like any procedure, with the System V convention: integer |
| 1793 | 1805 | and pointer arguments, and the addresses of `var` and `const` ones, |
| | @@ -1938,6 +1950,17 @@ |
| 1938 | 1950 | how many it reports and which warnings it gives are its own (appendix |
| 1939 | 1951 | A). |
| 1940 | 1952 | |
| 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 | + |
| 1941 | 1964 | ## 11. Versions |
| 1942 | 1965 | |
| 1943 | 1966 | A version of this report is named by the month it was made in and a |
| | @@ -1992,6 +2015,8 @@ |
| 1992 | 2015 | a stack overflow may be caught by the machine or by checks in the |
| 1993 | 2016 | compiled code; either way the program stops with its message |
| 1994 | 2017 | (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. |
| 1995 | 2020 | - **Messages and warnings.** The text of the compiler's messages, how |
| 1996 | 2021 | many errors it reports before it stops, and which warnings it gives, |
| 1997 | 2022 | `-Werror` included (section 10). That a program that is an error in |