Skip to content

Free Pascal 3.2.2 builds the library again

Choose a tag to compare

@pisarev pisarev released this 07 Aug 02:53
· 12 commits to main since this release

Free Pascal 3.2.2 builds the library again.

Function references - reference to function - arrived in 3.3.1, and everything
that used them turned out to sit in a single file: seven declarations in
MemoryUtils, none of which any other unit touches. On 3.2.2 those callbacks are
method pointers instead: you pass a method where you would otherwise pass an
anonymous function, and nothing else changes.

Nine functions that 3.2.2 lacks in its Math unit - ArcCot, ArcCotH,
ArcCsc, ArcCscH, ArcSec, ArcSecH, CotH, CscH, SecH - now travel
with the library, taken verbatim from the 3.3.1 runtime, sign handling and all,
so the values agree to the last bit.

The compatibility table in the README is a matrix that runs before a release
rather than a guess. This one was not: the Linux matrix had never been run
against 3.2.2, and against 3.2.2 not one unit compiled.

Added

  • tests/MathFamilyTest.dpr guards that whole family by contract rather than by
    a table of numbers: a reciprocal multiplied by its base is one, an inverse
    returns the argument of the direct function. It also pins the branch
    ArcCotan answers in - ArcTan(1/x), within (-pi/2, pi/2), not (0, pi) -
    which is exactly where a hand-written formula quietly picks the other
    convention.

Fixed

  • Two accelerator tests and the thread-safety sample died on Linux before
    reaching their first line. On Unix the thread driver has to be the FIRST unit,
    not merely present: units are initialised in the order they are listed, and
    Classes standing ahead of it was enough to break that. The sample had no
    driver at all, so the program that backs the thread-safety section of the
    README had never run on Linux.
  • A check compared a bound against Double(High(NativeInt)), which reinterprets
    the bits rather than converting the value: 0x7FFFFFFFFFFFFFFF read as a
    number is NaN. The comparison was against garbage wherever the compiler took
    the cast literally, and stayed green where it did not.
  • The accelerator now says why it declined machine code even when the
    interpreter picked the work up, so the contract about a wide Extended can be
    checked at all.
  • The Linux test script looks for the widgetset folder instead of naming one, so
    a Lazarus built with gtk2 no longer reports a missing Interfaces unit.
  • The README says which two units ask for the LCL - Thread for
    Application.HandleException, BlobManager for TGraphic - and that
    NOFORMS and NOGRAPHICS switch both off. That is what the console matrices
    and the WebAssembly build do.