Skip to content

Language: by-reference parameters (VM, #140) - #1353

Merged
PurHur merged 1 commit into
masterfrom
issue-140-ref-params
May 24, 2026
Merged

Language: by-reference parameters (VM, #140)#1353
PurHur merged 1 commit into
masterfrom
issue-140-ref-params

Conversation

@PurHur

@PurHur PurHur commented May 24, 2026

Copy link
Copy Markdown
Owner

Summary

  • Enable function f(&$x) by recording paramByRef on Block and aliasing caller variables with TYPE_INDIRECT in TYPE_ARG_RECV.
  • Add test/compliance/cases/language/ref_param.phpt (inc(&$n) and scale(&$n, $factor)).
  • Document capability row with JIT/AOT deferred until LLVM passes pointer args at call sites.

Test plan

  • Manual: ref_param snippet via bin/vm.php in php-compiler:22.04-dev (prints 2 / 12)
  • ./script/docker-ci-local.sh fast — capability-syntax check and inventory gates green
  • ./script/docker-ci-local.sh --filter ref_param when VMTest data-provider duplicate-key harness issue is resolved

Closes #140

Made with Cursor

Record paramByRef on Block, alias callee slots via TYPE_INDIRECT at TYPE_ARG_RECV, and add ref_param compliance PHPT. JIT/AOT remain deferred until pointer args are wired in Native::call.

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur
PurHur merged commit 4039ccd into master May 24, 2026
@PurHur
PurHur deleted the issue-140-ref-params branch May 24, 2026 08:43
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.

Language: Reference assignment and by-ref parameters

1 participant