mORMot2 DailyDaily read of upstream commits

SSSE3 numeric parsing lands across Delphi and FPC, with boundary fixes

The main change is a shared x86-64 assembly path for GetExtended and GetNumericVariantFromJson on SSSE3-capable Delphi and FPC targets, backed by scalar fallbacks and a larger regression matrix. Follow-ups repair MIN_INT64-with-fraction parsing and FP80 consistency. macOS version reporting also gains Golden Gate support, but its first kernel mapping is corrected later in the same edition, so production users should land on build 2.4.16897 rather than an intermediate build.

TL;DR

  • Land on build 2.4.16897; the numeric assembly series receives MIN_INT64 and FP80 fixes before the final head.
  • GetExtended and GetNumericVariantFromJson now use SSSE3 assembly on supported Delphi Win64 and FPC Win64/Linux x86-64 targets.
  • Build 2.4.16888 fixes parsing of -9223372036854775808.0 in both Pascal and x86-64 assembly paths.
  • The dedicated FP80 path preserves 64-bit mantissa precision and build 2.4.16891 makes out-of-range signed results consistent.
  • MacKernel and Golden Gate metadata are public additions; builds 2.4.16892–2.4.16895 use an incorrect Darwin mapping fixed in 16896.
  • GetInteger and GetCardinal now consume two digits per loop without changing their public signatures.

Upgrade advice

Use build 2.4.16897 as one unit. Do not stop on 2.4.16866–2.4.16890: the merged numeric assembly and Pascal/FP80 paths receive boundary and consistency corrections through 16891. macOS deployments should also skip 2.4.16892–2.4.16895 because the first MacKernel adjustment maps newer Darwin releases incorrectly until 16896. Re-run JSON numeric-type, Currency, Int64-minimum, long-mantissa, signed overflow and FP80 tests on each Delphi/FPC backend you ship.

Build2.4.16865 → 2.4.16897
Commits24
Lines+6602 -2528
Read5 min

21 of 21 entries · 24 commits upstream

Stories
# Entry Category Units
1 High FP80 parsing gets a dedicated precision path Under TSYNEXTENDED80, GetExtended scales with the full 64-bit mantissa instead of binary64-specific trimming, while GetNumericVariantFromJson uses FP80-aware exact-division and range rules before returning a Double variant. Fixes mormot.core.text+1 a91f18f1+67-25

core: proper FP80 version of GetExtended() and GetNumericVariantFromJson()

Impact

FPC and other TSynExtended=FP80 targets avoid binary64 assumptions that can change low bits on long mantissas; binary64 targets retain their existing specialized path.

Arnaud Bouchez · 07:52 UTC · view the commit on GitHub →

2 High Portable numeric parsing rejects empty values and preserves boundary decimals GetExtended rejects a sign or spaces without digits and trims harmless trailing decimal zeros before Clinger conversion; GetNumericVariantFromJson corrects zero, MIN_INT64, Currency-minimum and fractional-boundary handling. Fixes mormot.core.text+1 b9ba681e+59-9

core: fix empty numbers, padded decimals and negative fraction boundaries

Impact

Delphi and FPC portable paths no longer accept empty numeric text or lose exactness on padded decimals, and JSON numeric variants retain the intended type and value at signed boundaries.

Mike · 23:39 UTC · view the commit on GitHub →

3 High MIN_INT64 with a fractional suffix parses correctly Both Pascal and x86-64 GetNumericVariantFromJson stop accumulating fractional digits once the MIN_INT64 sentinel is set, and the regression suite adds -9223372036854775808.0. Fixes mormot.core.base.asmx64+1 dfe52ae7+14-10

core: fixed GetNumericVariantFromJson('-9223372036854775808.0') parsing

Impact

JSON containing the signed 64-bit minimum followed by .0 no longer corrupts the mantissa path or returns the wrong Double value on Delphi or FPC.

Arnaud Bouchez · 13:26 UTC · view the commit on GitHub →

4 High MacKernel now skips Darwin 26 in the correct direction MacKernel changes the adjustment from incrementing values above 25 to decrementing values above 26, and tests assert the resulting MACOS_NUM and MACOS_NAME values through future fallbacks. Fixes mormot.core.os 944abc0c+13-10

core: fixed MacKernel() logic

Impact

macOS 26, 27 and 28 reporting no longer indexes the marketing-version arrays incorrectly. This affects OSVersionName, OSVersionShort and monitoring output on macOS.

Public API

  • MacKernelbehaviour-changed — Darwin releases above 26 now map by decrementing one skipped kernel slot.

Arnaud Bouchez · 18:17 UTC · view the commit on GitHub →

5 Medium FP80 range errors preserve the parsed sign When the dedicated FP80 GetExtended path rejects an exponent magnitude at or above 5120, it now applies fNeg to the partial result before returning the error. Fixes mormot.core.text 92faab04+5-3

core: ensure GetExtended() FP80 is consistent

Impact

FP80 and binary64 paths now agree on the sign of the partial value returned with an out-of-range error; this mainly affects diagnostic or permissive callers that inspect the value despite err=1.

Arnaud Bouchez · 14:43 UTC · view the commit on GitHub →

6 Medium macOS Golden Gate reporting is added behind MacKernel MACOS_NUM and MACOS_NAME extend through Golden Gate and a new public MacKernel function centralizes mapping from Darwin utsrelease[2] to those arrays for OSVersionName and OSVersionShort. New features mormot.core.os+1 3e5e799c+33-21

core: properly detect MacOS Golden Gate

Impact

macOS services and monitoring can report Golden Gate by marketing name, but this first mapping is wrong for newer Darwin values and must be paired with build 16896.

Public API

  • MacKerneladded — Public helper mapping TOperatingSystemVersion.utsrelease[2] to a MACOS_NAME index.
  • MACOS_NUMbehaviour-changed — Upper bound extends to 27 and adds macOS 28 after Golden Gate.
  • MACOS_NAMEbehaviour-changed — Upper bound extends to 27 with Golden Gate and a later Next fallback.

Arnaud Bouchez · 18:00 UTC · view the commit on GitHub →

7 Medium X64CpuFeatures exposes SSSE3 availability The public TX64CpuFeatures set gains cpuSSSE3 before cpuAVX, and initialization includes it when both cfSSE3 and cfSSSE3 are present. New features mormot.core.base 73b03207+6-3

core: new cpuSSSE3 flag in X64CpuFeatures

Impact

Code can dispatch specifically on SSSE3, but adding the first enum member shifts the ordinal and bit positions of cpuAVX, cpuAVX2 and cpuHaswell in raw persisted masks.

Worth a look

Search for persisted Ord(TX64CpuFeature) values or serialized TX64CpuFeatures bitmasks before upgrading.

Public API

  • TX64CpuFeature.cpuSSSE3added — Added as the first TX64CpuFeatures bit before cpuAVX.

Arnaud Bouchez · 09:42 UTC · view the commit on GitHub →

8 Medium Long and uncommon numeric inputs stay inside assembly The x86-64 implementation adds scalar assembly continuation for long mantissas, exponents and CPUs without SSSE3, and shares one explicitly aligned NumericSimdData table between both parsers. Performance mormot.core.text+1 af7922d5+831-280

core: keep numeric parsing in ASM and share aligned SSSE3 data

Impact

More x86-64 inputs avoid a Pascal transition while retaining JSON cursor, error, Currency and rounding semantics. NumericSimdData becomes a published test hook under ASMX64.

Worth a look

Use the final build because later commits refactor and fix this new assembly path.

Public API

  • NumericSimdDataadded — Published only under ASMX64 as the aligned storage entry point used by parser tests.

Mike · 02:54 UTC · view the commit on GitHub →

9 Medium Delphi Win64 gets an SSSE3 fast path for common numbers GetExtended and GetNumericVariantFromJson gain Delphi Win64 assembly that reduces up to 15 digits with SSSE3, checks 4 KiB page boundaries and falls back to Pascal for long or uncommon grammar. Performance mormot.core.text+1 56417260+617-0

core: accelerate Delphi Win64 number parsing with SSSE3

Impact

Supported Delphi Win64 CPUs can parse common integers, fractions and short exponents with fewer scalar operations while preserving the public signatures and Pascal fallback.

Worth a look

Benchmark and regression-test the final build on the oldest SSSE3-capable Win64 CPU you support.

Mike · 23:40 UTC · view the commit on GitHub →

10 Medium Pascal floating-point scaling removes redundant work GetExtended simplifies exponent validation, power-of-ten indexing and Clinger-path tests, and replaces repeated FP80 scaling loops with two compact power tables. Performance mormot.core.text af318893+74-57

core: optimized GetExtended() pascal code

Impact

Portable Delphi/FPC parsing performs fewer branches and index operations; public signatures and accepted syntax are unchanged.

Arnaud Bouchez · 09:39 UTC · view the commit on GitHub →

11 Medium One- and two-digit integers bypass general SIMD reduction The shared x86-64 assembly reuses precomputed xmm0 digits for one- and two-digit GetExtended and GetNumericVariantFromJson integer results, with dedicated signed and varInteger stores. Performance mormot.core.base.asmx64 102fa3d9+43-11

core: optimized #582 asm for 1 and 2 digits

Impact

Very short numeric tokens take fewer shuffle and multiply instructions on the x86-64 assembly path; tests confirm exact varInteger values and end pointers.

Arnaud · 23:23 UTC · PR #582 · view the commit on GitHub →

12 Medium GetInteger and GetCardinal consume digit pairs The portable GetInteger and GetCardinal loops now parse two digits per iteration when available, falling back to one final digit without changing sign or termination rules. Performance mormot.core.base d1bf6356+35-15

core: rewritten GetInteger/GetCardinal

Impact

Delphi and FPC JSON and text helpers that call these routines do fewer loop iterations; signatures and documented results are unchanged.

Arnaud Bouchez · 14:41 UTC · view the commit on GitHub →

13 Medium FPC Win64 and Linux join the SSSE3 parser path The x86-64 parser adapts its argument handling and alignment syntax for FPC and the System V ABI, and adds safe assembly handling for signed NaN/Inf plus incomplete prefixes. Compiler & platform mormot.core.text+1 9d219b99+100-26

core: support SSSE3 number parsing on FPC Win64 and Linux

Impact

FPC x86-64 builds on Windows and Linux can use the same SSSE3 acceleration without changing callers; non-SSSE3 and unusual inputs still use equivalent fallback behavior.

Worth a look

Run the numeric conversion suite on both FPC Win64 and Linux x86-64 before deployment.

Mike · 00:53 UTC · view the commit on GitHub →

14 Low BSD builds avoid TThreadID zero-conversion warnings TMultiLightLock.Init, Done and UnLock cast zero explicitly to TThreadID when clearing ThreadID. Compiler & platform mormot.core.os 9bffea66+5-5

core: fixed compilation warning on BSD

Impact

BSD/FPC compilation is quieter; generated locking behavior and public APIs are unchanged.

Arnaud Bouchez · 18:01 UTC · view the commit on GitHub →

15 Low Both x86-64 numeric parsers move to one shared include The assembly bodies and constants leave mormot.core.text and mormot.core.variants for mormot.core.base.asmx64.inc, while the Pascal implementations remain in their original units. Under the hood mormot.core.base+3 e86c5f33+1217-1203

core: moved #582 x86_64 asm to mormot.core.base.asmx64.inc

Impact

No caller change; the consolidation removes duplicated integration code and centralizes later fixes for Delphi and FPC x86-64.

Arnaud Bouchez · 12:55 UTC · PR #582 · view the commit on GitHub →

16 Low GetExtended assembly is reorganized for FPC integration The x86-64 GetExtended assembly is mechanically reorganized around shared labels, constants and compiler directives without an intended functional change. Under the hood mormot.core.text b082ba10+380-381

core: refactored #582 x64 asm

Impact

No application API or behavior change is claimed; the move prepares one implementation for Delphi and FPC.

Arnaud Bouchez · 09:43 UTC · PR #582 · view the commit on GitHub →

17 Low JSON numeric assembly is reorganized for FPC GetNumericVariantFromJson assembly is rearranged for cleaner compiler integration, with no intended change to cursor, VType, value or error behavior. Under the hood mormot.core.text+1 2201a7b9+348-364

core: refactored GetNumericVariantFromJson() x64 asm

Impact

Application code sees no public API change; this is internal layout work before the implementation is moved to a shared include.

Arnaud Bouchez · 11:36 UTC · view the commit on GitHub →

18 Low Digit-pair loops are simplified without semantic changes GetInteger and GetCardinal replace nested else blocks with continue and a shared final single-digit path. Under the hood mormot.core.base 8924ade8+10-14

core: minor GetInteger/GetCardinal refactoring

Impact

No functional, API or backend behavior change; this only shortens the rewritten loops.

Arnaud Bouchez · 18:01 UTC · view the commit on GitHub →

19 Low Numeric regressions now distinguish FP80 from binary64 TTestCoreBase.NumericalConversions is reorganized and expanded with backend-specific exact-bit checks for TSynExtended, JSON variants, Currency and long decimal inputs. Tests 4fb42e12+110-66

tests: enhanced TTestCoreBase.NumericalConversions

Impact

No application API change; backend-specific precision differences are now tested explicitly instead of sharing binary64 expectations.

Arnaud Bouchez · 13:27 UTC · view the commit on GitHub →

20 Low Numeric conversion tests add rounding and signed-boundary cases TTestCoreBase.NumericalConversions adds exact-bit checks for decimal rounding, negative values and boundary inputs after the parser merge. Tests 81fff99f+17-5

tests: some tests

Impact

No application code or public API changes; the expanded suite makes parser regressions visible across compiler backends.

Arnaud Bouchez · 06:28 UTC · view the commit on GitHub →

21 Low macOS kernel-to-name boundaries gain direct tests TTestCoreBase tests MacKernel around lower bounds, Darwin 24–25, the skipped 26 slot and future values. Tests 870336b8+16-2

test: cover OSX kernel number to Apple Corp marketing "logic"

Impact

No application code change; the tests expose that the initial offset logic maps newer Darwin releases incorrectly.

Arnaud Bouchez · 18:03 UTC · view the commit on GitHub →

Upstream activity commits per day · last 60 days
Commits977
Active days44/60
Busiest2026-09-30
Peak60
2026-08-15: 0 commits2026-08-16: 0 commits2026-08-17: 0 commits2026-08-18: 0 commits2026-08-19: 0 commits2026-08-20: 0 commits2026-08-21: 0 commits2026-08-22: 0 commits2026-08-23: 0 commits2026-08-24: 0 commits2026-08-25: 0 commits2026-08-26: 0 commits2026-08-27: 26 commits2026-08-28: 11 commits2026-08-29: 10 commits2026-08-30: 1 commit2026-08-31: 23 commits2026-09-01: 0 commits2026-09-02: 20 commits2026-09-03: 29 commits2026-09-04: 35 commits2026-09-05: 13 commits2026-09-06: 0 commits2026-09-07: 0 commits2026-09-08: 23 commits2026-09-09: 10 commits2026-09-10: 17 commits2026-09-11: 23 commits2026-09-12: 14 commits2026-09-13: 9 commits2026-09-14: 7 commits2026-09-15: 4 commits2026-09-16: 24 commits2026-09-17: 26 commits2026-09-18: 21 commits2026-09-19: 59 commits2026-09-20: 13 commits2026-09-21: 5 commits2026-09-22: 34 commits2026-09-23: 17 commits2026-09-24: 57 commits2026-09-25: 22 commits2026-09-26: 26 commits2026-09-27: 0 commits2026-09-28: 2 commits2026-09-29: 19 commits2026-09-30: 60 commits2026-10-01: 26 commits2026-10-02: 30 commits2026-10-03: 32 commits2026-10-04: 15 commits2026-10-05: 1 commit2026-10-06: 26 commits2026-10-07: 37 commits2026-10-08: 27 commits2026-10-09: 35 commits2026-10-10: 33 commits2026-10-11: 9 commits2026-10-12: 11 commits2026-10-13: 35 commits
2026-08-152026-10-13