Skip to content

Stdlib: native number_format() for VM and LLVM JIT#227

Merged
PurHur merged 2 commits into
masterfrom
feat/stdlib-number-format-jit-array-values
May 18, 2026
Merged

Stdlib: native number_format() for VM and LLVM JIT#227
PurHur merged 2 commits into
masterfrom
feat/stdlib-number-format-jit-array-values

Conversation

@PurHur
Copy link
Copy Markdown
Owner

@PurHur PurHur commented May 18, 2026

Summary

  • Implement number_format() from the ground up in VmNumberFormat (VM) and JitNumberFormat (LLVM via snprintf + thousands grouping), replacing the previous VM wrapper around PHP's number_format().
  • Add JIT compliance spec (number_format_jit.phpt) and AOT fixture; update capability matrix.
  • Fix in_array() JIT loop to advance the index on non-match and add proper merge-block terminators for array builtin LLVM helpers (reduces JIT test failures vs master).

Test plan

  • ./script/docker-ci.sh --exclude-group llvm (231 tests pass)
  • Manual JIT: number_format(1234.5, 2)1,234.50
  • JIT suite: 67 failures vs 72 on master (same environment, LLVM 9 in Docker)

Made with Cursor

PurHur and others added 2 commits May 18, 2026 18:36
Implement VmNumberFormat and JitNumberFormat without calling PHP's
number_format(), register fabs for LLVM, add compliance/AOT specs, and fix
in_array JIT loop indexing plus merge-block terminators in array helpers.

Co-authored-by: Cursor <cursoragent@cursor.com>
Keep native VM formatting via VmNumberFormat while using master's
__compiler_number_format JIT/AOT runtime and in_array loop fixes.

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur PurHur merged commit 1d8d001 into master May 18, 2026
@PurHur PurHur deleted the feat/stdlib-number-format-jit-array-values branch May 18, 2026 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant