Repository navigation
v3.8.0
The platforms were measured instead of assumed, and one of them was told
no. --target= admits six machines where it admitted three: a Windows
triple, and both Darwin ones, so a module built on macOS names the machine it
is for rather than relying on clang to override an x86-64 Linux header. A
release now ships a macOS archive beside the two Linux ones. Windows got as
far as a program that runs and was then deferred, on a run rather than a
reading — a trivial program prints its golden under wine and the non-local
goto faults on an alignment this compiler gets wrong for Win64 alone. Minor,
because the command line accepts input it used to refuse and nothing already
accepted changed meaning.
Added
- Three more targets (ADR-0371, ADR-0372).
--target=accepts
x86_64-w64-mingw32,arm64-apple-macosxandx86_64-apple-macosx, with
the spellings people write for each, and the emitted module states that
target's own datalayout and triple — each taken from clang and verified
byte-identical. Win64 is the first LLP64 target here, a pointer of eight
bytes with a four-byte Clong, which cost one line because AP 6.4.2.7's
clongandcsizealready existed for saying "whatever this target's is". - A macOS release archive (ADR-0375). A
v*tag now produces
afterschool-pascal-<tag>-arm64-darwin.tar.gzbeside the two Linux ones.
Apple ships no static libc, so that archive cannot be statically linked and
is not required to be; what is checked instead is a claim that platform can
answer — that the binary depends on nothing outside/usr/liband
/System, whichotool -Lreports and every hosted runner's Homebrew
makes worth asking. - Platform tiers, written down (README). GNU/Linux is the first tier —
the seed is generated for x86-64, every gate has a job that installs its
tools, and i386 is built and run at two optimisation levels. macOS (arm64)
is the second: the whole suite runs there natively on every push and the job
can fail. Everything else is unsupported, and README says what a
contributor starts from. - Four gates.
runtime-nonposixcompiles the runtime for a target that is
not POSIX and holds the result in a catalogue that fails both ways
(ADR-0369);setjmp-aritycompares the_setjmpthis compiler emits
against what each target's C library declares (ADR-0371);
helper-portabilitymakes ADR-0366's rule mechanical (ADR-0367); and
foreign-widthgained a second claim — a C function declared in more than
one module must have one representation (ADR-0376).
Changed
readstrandwritestrare backed by memory, not by aFILE *
(ADR-0370). §6.7.5.5 asks for an auxiliarytextvariable backed by memory
and never for a stream;fmemopenandopen_memstreamare POSIX and were
two of the three names that stoppedruntime/pasrt.ccompiling for a target
that is not POSIX. The formatting is untouched — the same bytes, handed
somewhere else — andruntime/pasrt.c's departure from ISO C went from five
names to three.tmpfile()would have been ISO C and is 88 times slower,
measured.- macOS is a job that can fail (ADR-0368). It was advisory from the first
run of the port; the whole suite runs there natively on every push now, and
a macOS failure stops the build. Nine gates still skip, each naming a tool
the runner has not got, and the job lists them with the reason for each. - Every helper is Python 3, and a gate keeps it that way (ADR-0366,
ADR-0367). The thirty-one shell scripts under test were converted one at a
time, each proved by byte-identical output from both versions on this tree
and by its own historical mutation re-run;tools/pascalccis the one that
remains, by decision.helper-portabilityrefuses a new shell script, the
constructs bash 3.2 lacks in the one that is catalogued, and a Python helper
starting a general-purpose utility to do what the standard library does. - The runtime holds one preprocessor conditional (ADR-0373), where it held
none._longjmpis what pairs with the_setjmpthe emitter writes and
mingw-w64 declares no such name; no portable spelling exists,longjmp
after_setjmpworking on glibc and restoring on Darwin a mask that was
never saved.runtime-isocnow catalogues the set of conditionals in both
directions, so a second one is a decision with a record.
Fixed
- A task may have helper routines. AP 6.7.8.2 admits a variable declared
"in that task-declaration or in a block within it", and a procedure or
function declared inside a task was refused its own parameters and its own
locals — so recursion inside a task, and any helper at all, could not be
written (ADR-0365). - A task declared inside a task no longer lifts the rule from the one that
contains it. Every statement of the outer body after the inner
declaration could name a global. writeln(output, x)is accepted inside a task, aswriteln(x)always
was; both write the same required variable.task A; forward;is refused. AP 6.7.8 admits no directive.- A task-declaration may stand in a module-block, so a library module can
export a routine that spawns its own workers. A module-heading is refused
one, with a diagnostic that says why. - A deferred statement of a block no longer runs before the block's tasks
are joined.defer c := nilbeside aspawnclosed the channel the task
was still sending on, which AP 6.9.3.12.1 forbids. - An integer expression may be sent on a channel of real, and passed to a
real formal of a task. Both were accepted by the front end and then
refused by the assembler, 6.4.6 c)'s conversion never having been emitted. - A failed write to a text file is reported.
pas_write_paddedcalled
fwriteand ignored the result where the primitive beside it checked;
both go through one emitter now (ADR-0370). - Two goldens pinned a platform rather than a program.
lib_net_wait's
fixed which of a buffered line and a socket's reply a round saw first, and
lib_net's fixed how many writes a closed connection takes to be refused —
two on Linux, more than a hundred on macOS, where they fit in a send buffer.
Both were found by macOS after passing on Linux for their whole lives. - Four gates were asking about something other than what they said.
runtime-isoc's fifth strict compile spelledclangliterally where the
other four honouredAPASCAL_CLANG;irtestread neithername.optnor
AFTERSCHOOL_PASCAL_OPT, so the fixed-point harness compiled at a level no
case had asked for;runtime-coverage's two totals were written and never
compared, and had drifted; andtlsreported its findings to nowhere.