Language: null coalescing operator (??) — closes #99 - #334
Merged
Conversation
Closes #99 by lowering Coalesce CFG nodes through TYPE_COALESCE branch blocks with isset semantics, adding php-types reconstruction support, and compliance coverage; JIT merge lowering is started but still needs phi fixes. Co-authored-by: Cursor <cursoragent@cursor.com>
Resolve VM.php conflict (keep TYPE_COALESCE + TYPE_EXIT) and regenerate bootstrap-inventory.md after master landed die()/exit() support. Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
??(null coalescing) in the CFG → VM pipeline viaTYPE_COALESCEbranch lowering with PHPisset()semantics for variables and array offsets.php-typesreconstruction forExpr_BinaryOp_Coalesceand removes the construct fromUnsupportedRegistry/docs/unsupported-syntax.md.test/compliance/cases/language/coalesce.phptand updates lint unit tests.Test plan
docker run … php bin/vm.php -r '$b=null; echo $b ?? "Guest";'→Guestvendor/bin/phpunit test/compliance/ --filter coalescevendor/bin/phpunit test/unit/LintTest.php??merge lowering (TYPE_COALESCE inlib/JIT.php) — LLVM phi/terminator fixes still needed; VM path is completeVerified locally with
./script/docker-ci-local.sh(tar fallback) on compliance + lint suites.Closes #99
Made with Cursor