Skip to content

fix: expose sizeof as count alias - #969

Merged
nahime0 merged 4 commits into
mainfrom
cursor/fix-sizeof-alias-751-3c28
Sep 14, 2026
Merged

nahime0 merged 4 commits into
mainfrom
cursor/fix-sizeof-alias-751-3c28

Conversation

@nahime0

@nahime0 nahime0 commented Sep 11, 2026

Copy link
Copy Markdown
Member

Summary

  • register sizeof() with the same signature and semantics as count()
  • route AOT and Magician/eval calls through the existing count implementation
  • add focused native, eval, arity-diagnostic, and registry-parity coverage
  • regenerate and audit the contract-derived builtin reference

Plan

  1. Add the shared PHP builtin contract and backend bindings.
  2. Reuse the existing typed count lowering and eval adapters.
  3. Validate native, eval, registry parity, and generated builtin documentation.

Testing

  • cargo build
  • cargo test --test codegen_tests test_sizeof_alias_of_count
  • cargo test --test codegen_tests test_eval_sizeof_alias_of_count
  • cargo test --test error_tests test_error_sizeof_wrong_args
  • cargo test -p elephc-magician execute_program_dispatches_sizeof_alias_of_count
  • cargo test -p elephc-builtin-contract --features curl
  • generated builtin docs and EIR-boundary audits
  • git diff --check origin/main...HEAD

Fixes #751

Open in Web Open in Cursor 

@github-actions github-actions Bot added area:builtins Touches PHP builtin declarations or emitters. area:magician Touches eval, include execution, or elephc-magician. area:runtime Touches runtime helpers, GC, ownership, or bridge runtimes. size:m Medium-sized pull request. type:fix Corrects broken or incompatible behavior. labels Sep 11, 2026
@cursor
cursor Bot force-pushed the cursor/fix-sizeof-alias-751-3c28 branch from a2253ca to edb6d9d Compare September 11, 2026 16:59
@github-actions github-actions Bot added scope:multi-area Touches more compiler areas than the automatic area-label cap. size:xl Very large pull request that needs deliberate review planning. and removed size:m Medium-sized pull request. labels Sep 11, 2026
@nahime0
nahime0 marked this pull request as ready for review September 11, 2026 17:04
@greptile-apps

greptile-apps Bot commented Sep 11, 2026

Copy link
Copy Markdown

Too many files changed for review (1937 files, 100 file limit).

@nahime0
nahime0 merged commit 7323a3b into main Sep 14, 2026
147 of 149 checks passed
@nahime0
nahime0 deleted the cursor/fix-sizeof-alias-751-3c28 branch September 14, 2026 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:builtins Touches PHP builtin declarations or emitters. area:magician Touches eval, include execution, or elephc-magician. area:runtime Touches runtime helpers, GC, ownership, or bridge runtimes. scope:multi-area Touches more compiler areas than the automatic area-label cap. size:xl Very large pull request that needs deliberate review planning. type:fix Corrects broken or incompatible behavior.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

sizeof() is undefined (PHP's count() alias)

2 participants