mORMot2 Daily每日上游提交速读

SSSE3 数值解析登陆 Delphi 与 FPC,并修复边界问题

主要变化是为支持 SSSE3 的 Delphi 与 FPC target 提供共享的 x86-64 assembly 路径,用于 GetExtended 和 GetNumericVariantFromJson,并配有 scalar fallback 与更大的回归矩阵。后续 commit 修复带小数的 MIN_INT64 解析与 FP80 一致性。macOS 版本报告也新增 Golden Gate 支持,但最初的 kernel 映射在本期稍后才修正,因此生产环境应落在 build 2.4.16897,而不是中间 build。

要点

  • 应采用 build 2.4.16897;数值 assembly 系列在最终 head 前获得 MIN_INT64 与 FP80 修复。
  • GetExtended 与 GetNumericVariantFromJson 现在会在支持的 Delphi Win64 和 FPC Win64/Linux x86-64 target 上使用 SSSE3 assembly。
  • Build 2.4.16888 修复 Pascal 与 x86-64 assembly 路径对 -9223372036854775808.0 的解析。
  • 专用 FP80 路径保留 64 位尾数精度,build 2.4.16891 使超范围有符号结果保持一致。
  • MacKernel 与 Golden Gate 元数据是公开新增项;build 2.4.16892–2.4.16895 使用错误的 Darwin 映射,已在 16896 修复。
  • GetInteger 与 GetCardinal 现在每轮处理两位数字,公开 signature 不变。

升级建议

请把 build 2.4.16897 作为一个整体采用。不要停在 2.4.16866–2.4.16890:合并后的数值 assembly 与 Pascal/FP80 路径直到 16891 仍有边界和一致性修复。macOS 部署还应避开 2.4.16892–2.4.16895,因为最初的 MacKernel 调整会错误映射较新的 Darwin release,直到 16896 才修复。请在每个交付的 Delphi/FPC backend 上重新运行 JSON 数值类型、Currency、Int64 最小值、长尾数、有符号溢出与 FP80 测试。

版本号2.4.16865 → 2.4.16897
提交24
行数+6602 -2528
阅读2 分钟

21 条中的 21 条 · 上游 24 次提交

主题
# 条目 类别 单元
1 高 FP80 解析获得专用精度路径 在 TSYNEXTENDED80 下,GetExtended 使用完整 64 位尾数缩放,而不是 binary64 专用裁剪;GetNumericVariantFromJson 在返回 Double variant 前采用 FP80 感知的精确除法与范围规则。 修复 mormot.core.text+1 a91f18f1+67-25

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

影响

FPC 及其他 TSynExtended=FP80 target 避免会改变长尾数低位的 binary64 假设;binary64 target 保留现有专用路径。

Arnaud Bouchez · 07:52 UTC · 在 GitHub 上查看该提交 →

2 高 可移植数值解析拒绝空值并保留边界小数 GetExtended 拒绝只有符号或空格而没有数字的输入,并在 Clinger 转换前去除无害的末尾小数零;GetNumericVariantFromJson 修正零、MIN_INT64、Currency 最小值与小数边界处理。 修复 mormot.core.text+1 b9ba681e+59-9

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

影响

Delphi 与 FPC 可移植路径不再接受空数值文本,也不会在补零小数上失去精度;JSON numeric variant 在有符号边界保留预期类型和值。

Mike · 23:39 UTC · 在 GitHub 上查看该提交 →

3 高 带小数后缀的 MIN_INT64 可正确解析 Pascal 与 x86-64 的 GetNumericVariantFromJson 在设置 MIN_INT64 sentinel 后停止累积小数位,回归套件新增 -9223372036854775808.0。 修复 mormot.core.base.asmx64+1 dfe52ae7+14-10

core: fixed GetNumericVariantFromJson('-9223372036854775808.0') parsing

影响

包含有符号 64 位最小值并带 .0 的 JSON 不再破坏尾数路径,也不会在 Delphi 或 FPC 上返回错误 Double。

Arnaud Bouchez · 13:26 UTC · 在 GitHub 上查看该提交 →

4 高 MacKernel 现在以正确方向跳过 Darwin 26 MacKernel 把“对大于 25 的值递增”改为“对大于 26 的值递减”,测试验证所得 MACOS_NUM 与 MACOS_NAME,直到未来 fallback。 修复 mormot.core.os 944abc0c+13-10

core: fixed MacKernel() logic

影响

macOS 26、27 与 28 的报告不再错误索引市场版本数组。这会影响 macOS 上的 OSVersionName、OSVersionShort 与监控输出。

公开 API

  • MacKernelbehaviour-changed — 高于 26 的 Darwin release 现在通过减去一个被跳过的 kernel slot 映射。

Arnaud Bouchez · 18:17 UTC · 在 GitHub 上查看该提交 →

5 中 FP80 范围错误保留已解析符号 专用 FP80 GetExtended 路径拒绝绝对值大于等于 5120 的指数时,现在会在返回错误前把 fNeg 应用于部分结果。 修复 mormot.core.text 92faab04+5-3

core: ensure GetExtended() FP80 is consistent

影响

FP80 与 binary64 路径现在对超范围错误返回的部分值符号保持一致;主要影响在 err=1 时仍检查数值的诊断或宽松调用方。

Arnaud Bouchez · 14:43 UTC · 在 GitHub 上查看该提交 →

6 中 通过 MacKernel 新增 macOS Golden Gate 报告 MACOS_NUM 与 MACOS_NAME 扩展到 Golden Gate,并新增公开 MacKernel function,集中把 Darwin utsrelease[2] 映射到这些数组,供 OSVersionName 与 OSVersionShort 使用。 新功能 mormot.core.os+1 3e5e799c+33-21

core: properly detect MacOS Golden Gate

影响

macOS 服务与监控可按市场名称报告 Golden Gate,但最初映射对较新的 Darwin 值有误,必须与 build 16896 一起采用。

公开 API

  • MacKerneladded — 把 TOperatingSystemVersion.utsrelease[2] 映射到 MACOS_NAME 索引的公开 helper。
  • MACOS_NUMbehaviour-changed — 上界扩展到 27,并在 Golden Gate 后加入 macOS 28。
  • MACOS_NAMEbehaviour-changed — 上界扩展到 27,加入 Golden Gate 以及后续 Next fallback。

Arnaud Bouchez · 18:00 UTC · 在 GitHub 上查看该提交 →

7 中 X64CpuFeatures 公开 SSSE3 可用性 公开 TX64CpuFeatures set 在 cpuAVX 前新增 cpuSSSE3,初始化会在 cfSSE3 与 cfSSSE3 同时存在时加入该标志。 新功能 mormot.core.base 73b03207+6-3

core: new cpuSSSE3 flag in X64CpuFeatures

影响

代码可专门按 SSSE3 分派,但在首位新增 enum member 会改变原始持久化 mask 中 cpuAVX、cpuAVX2 与 cpuHaswell 的 ordinal 和 bit position。

值得一看

升级前请搜索持久化的 Ord(TX64CpuFeature) 值或序列化的 TX64CpuFeatures bitmask。

公开 API

  • TX64CpuFeature.cpuSSSE3added — 作为 TX64CpuFeatures 的首个 bit 加在 cpuAVX 之前。

Arnaud Bouchez · 09:42 UTC · 在 GitHub 上查看该提交 →

8 中 长数值与少见输入继续留在 assembly 内 x86-64 实现为长尾数、指数与无 SSSE3 CPU 新增 scalar assembly 延续路径,并让两个 parser 共享一个显式对齐的 NumericSimdData 表。 性能 mormot.core.text+1 af7922d5+831-280

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

影响

更多 x86-64 输入无需切换到 Pascal,同时保留 JSON cursor、错误、Currency 与舍入语义。NumericSimdData 在 ASMX64 下成为公开测试 hook。

值得一看

请使用最终 build,因为后续 commit 会重构并修复这条新 assembly 路径。

公开 API

  • NumericSimdDataadded — 仅在 ASMX64 下公开,作为 parser 测试使用的对齐存储入口。

Mike · 02:54 UTC · 在 GitHub 上查看该提交 →

9 中 Delphi Win64 获得常见数值的 SSSE3 快速路径 GetExtended 与 GetNumericVariantFromJson 新增 Delphi Win64 assembly,用 SSSE3 归约最多 15 位数字,检查 4 KiB page 边界,并对长输入或少见语法回退到 Pascal。 性能 mormot.core.text+1 56417260+617-0

core: accelerate Delphi Win64 number parsing with SSSE3

影响

支持的 Delphi Win64 CPU 能以更少 scalar 操作解析常见整数、小数与短指数,同时保留公开 signature 和 Pascal fallback。

值得一看

请在所支持的最旧 SSSE3 Win64 CPU 上 benchmark 并回归测试最终 build。

Mike · 23:40 UTC · 在 GitHub 上查看该提交 →

10 中 Pascal 浮点缩放移除冗余工作 GetExtended 简化指数验证、十次幂索引与 Clinger 路径判断,并用两个紧凑幂表替代重复 FP80 缩放循环。 性能 mormot.core.text af318893+74-57

core: optimized GetExtended() pascal code

影响

Delphi/FPC 可移植解析减少分支与索引操作;公开 signature 和接受语法不变。

Arnaud Bouchez · 09:39 UTC · 在 GitHub 上查看该提交 →

11 中 一位与两位整数绕过通用 SIMD 归约 共享 x86-64 assembly 为 GetExtended 与 GetNumericVariantFromJson 的一位和两位整数结果复用 xmm0 中已计算的数字,并使用专用有符号与 varInteger 存储。 性能 mormot.core.base.asmx64 102fa3d9+43-11

core: optimized #582 asm for 1 and 2 digits

影响

很短的数值 token 在 x86-64 assembly 路径上使用更少 shuffle 与乘法指令;测试确认精确 varInteger 值与结束 pointer。

Arnaud · 23:23 UTC · PR #582 · 在 GitHub 上查看该提交 →

12 中 GetInteger 与 GetCardinal 成对处理数字 可移植 GetInteger 与 GetCardinal 循环现在在可用时每轮解析两位数字,最后可回退处理一位,符号与终止规则不变。 性能 mormot.core.base d1bf6356+35-15

core: rewritten GetInteger/GetCardinal

影响

调用这些 routine 的 Delphi/FPC JSON 与文本 helper 减少循环次数;signature 与文档结果不变。

Arnaud Bouchez · 14:41 UTC · 在 GitHub 上查看该提交 →

13 中 FPC Win64 与 Linux 加入 SSSE3 解析路径 x86-64 parser 为 FPC 与 System V ABI 调整参数传递和对齐语法,并新增对有符号 NaN/Inf 与不完整前缀的安全 assembly 处理。 编译器与平台 mormot.core.text+1 9d219b99+100-26

core: support SSSE3 number parsing on FPC Win64 and Linux

影响

Windows 与 Linux 上的 FPC x86-64 build 可在不修改调用方的情况下使用相同 SSSE3 加速;无 SSSE3 或少见输入仍采用等价 fallback。

值得一看

部署前请在 FPC Win64 与 Linux x86-64 上运行数值转换测试套件。

Mike · 00:53 UTC · 在 GitHub 上查看该提交 →

14 低 BSD build 避免零转换为 TThreadID 的警告 TMultiLightLock.Init、Done 与 UnLock 在清除 ThreadID 时显式把零转换为 TThreadID。 编译器与平台 mormot.core.os 9bffea66+5-5

core: fixed compilation warning on BSD

影响

BSD/FPC 编译警告减少;生成的锁行为与公开 API 不变。

Arnaud Bouchez · 18:01 UTC · 在 GitHub 上查看该提交 →

15 低 两个 x86-64 数值 parser 移入同一共享 include assembly 主体与常量从 mormot.core.text 和 mormot.core.variants 移入 mormot.core.base.asmx64.inc,而 Pascal 实现保留在原 unit。 内部重构 mormot.core.base+3 e86c5f33+1217-1203

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

影响

调用方无需修改;整合消除重复集成代码,并集中 Delphi 与 FPC x86-64 的后续修复。

Arnaud Bouchez · 12:55 UTC · PR #582 · 在 GitHub 上查看该提交 →

16 低 GetExtended assembly 为 FPC 集成而重组 x86-64 GetExtended assembly 围绕共享 label、常量和编译器指令进行机械重组,不打算改变功能。 内部重构 mormot.core.text b082ba10+380-381

core: refactored #582 x64 asm

影响

未声明应用 API 或行为变化;此次移动为 Delphi 与 FPC 的共同实现做准备。

Arnaud Bouchez · 09:43 UTC · PR #582 · 在 GitHub 上查看该提交 →

17 低 JSON 数值 assembly 为 FPC 重组 GetNumericVariantFromJson assembly 为更清晰的编译器集成而重排,不打算改变 cursor、VType、数值或错误行为。 内部重构 mormot.core.text+1 2201a7b9+348-364

core: refactored GetNumericVariantFromJson() x64 asm

影响

应用代码看不到公开 API 变化;这是把实现移入共享 include 前的内部布局工作。

Arnaud Bouchez · 11:36 UTC · 在 GitHub 上查看该提交 →

18 低 成对数字循环在不改变语义的情况下简化 GetInteger 与 GetCardinal 用 continue 和共享的最后单数字路径替代嵌套 else block。 内部重构 mormot.core.base 8924ade8+10-14

core: minor GetInteger/GetCardinal refactoring

影响

无功能、API 或 backend 行为变化;仅缩短重写后的循环。

Arnaud Bouchez · 18:01 UTC · 在 GitHub 上查看该提交 →

19 低 数值回归现在区分 FP80 与 binary64 TTestCoreBase.NumericalConversions 被重组并扩展,加入针对 TSynExtended、JSON variant、Currency 与长小数输入的 backend 专用精确位检查。 测试 4fb42e12+110-66

tests: enhanced TTestCoreBase.NumericalConversions

影响

应用 API 无变化;不同 backend 的精度差异现在被显式测试,而不再共用 binary64 预期。

Arnaud Bouchez · 13:27 UTC · 在 GitHub 上查看该提交 →

20 低 数值转换测试新增舍入与有符号边界用例 TTestCoreBase.NumericalConversions 在 parser 合并后新增十进制舍入、负值与边界输入的精确位检查。 测试 81fff99f+17-5

tests: some tests

影响

应用代码与公开 API 无变化;扩展后的套件可暴露不同编译器 backend 的 parser 回归。

Arnaud Bouchez · 06:28 UTC · 在 GitHub 上查看该提交 →

21 低 macOS kernel 到名称的边界新增直接测试 TTestCoreBase 测试 MacKernel 的下界、Darwin 24–25、跳过的 26 slot 与未来值。 测试 870336b8+16-2

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

影响

应用代码无变化;测试暴露最初 offset 逻辑错误映射较新 Darwin release。

Arnaud Bouchez · 18:03 UTC · 在 GitHub 上查看该提交 →

上游活动 每日提交数 · 最近 60 天
提交977
活跃天数44/60
最忙一天2026-09-30
峰值60
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