Skip to content

Stdlib: array_product() VM/JIT/AOT native LLVM#386

Merged
PurHur merged 1 commit into
masterfrom
agent/stdlib-array_product
May 20, 2026
Merged

Stdlib: array_product() VM/JIT/AOT native LLVM#386
PurHur merged 1 commit into
masterfrom
agent/stdlib-array_product

Conversation

@PurHur
Copy link
Copy Markdown
Owner

@PurHur PurHur commented May 20, 2026

Summary

  • Adds array_product() for packed arrays of integers and floats (subset of PHP).
  • VM handler in ext/standard/array_product.php; JIT lowering in ArrayBuiltinHelper::arrayProduct* (multiply, identity 1 for empty arrays, float promotion like array_sum).
  • Compliance PHPT (VM + JIT) and AOT fixture; capability matrix updated.

Test plan

  • docker VM smoke: array_product(array(1,2,3))6
  • AOT compile/run fixture array_product.phpt
  • ./script/docker-ci-local.sh — VM/compliance green; AOT array_product passes (3 unrelated getenv AOT failures remain on harness)

Closes #385

Made with Cursor

Implement array_product() for packed int/float arrays (VM, JIT, AOT),
mirroring array_sum with multiply semantics and empty-array identity 1.

Closes #385

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur PurHur force-pushed the agent/stdlib-array_product branch from 052de21 to 043444b Compare May 20, 2026 17:02
@PurHur PurHur merged commit ad49307 into master May 20, 2026
1 check passed
@PurHur PurHur deleted the agent/stdlib-array_product branch May 20, 2026 17:02
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.

Stdlib: array_product() VM/JIT/AOT (native LLVM)

1 participant