Skip to content

AOT: lower array_shift via HashTable::shiftFirst LLVM (#24025) - #24048

Closed
PurHur wants to merge 2 commits into
masterfrom
agent/issue-24025-hashtable-shiftfirst
Closed

PurHur wants to merge 2 commits into
masterfrom
agent/issue-24025-hashtable-shiftfirst

Conversation

@PurHur

@PurHur PurHur commented Jul 28, 2026

Copy link
Copy Markdown
Owner

Summary

Test plan

  • php bin/compile.php -o /tmp/e30 test/differential/cases/e30_array_lit_dim_assign_shift.php → COMPILE:0 (was undefined method)
  • Semantic AOT without json_encode: $a[0]=99; array_shift($a) → shift returns 99, remaining 2,3 (matches Zend)
  • php vendor/bin/phpunit --filter 'NestedVmHashTableMethodLlvmTest|ArrayShiftRuntimeShrinkTest' → OK (5 tests)
  • php script/bootstrap-inventory.php --check → OK 6599/6599
  • php script/check-selfhost-spine-coverage-sync.php → OK

Not covered / known master noise: json_encode(1) AOT segfaults on master; e30 still crashes at run for that reason (compile gap closed). Dim-assign expression result $x = ($a[0]=99) also empty under AOT on master (pre-existing).

Closes #24025

Made with Cursor

PurHur and others added 2 commits July 28, 2026 00:32
Register NestedJIT HashTableShiftFirst and call it from ArrayShiftRuntime
so e30_array_lit_dim_assign_shift compiles again (third #23974-style gap).

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur

PurHur commented Jul 28, 2026

Copy link
Copy Markdown
Owner Author

Closing as duplicate of #24046 (df93fc82a), which already landed NestedJIT HashTable::shiftFirst via HashTableShiftLlvm and closed #24025.

This branch was the same lane continuing WIP; lost the merge race. Verified independently before push: e30 compiles; shift semantics match Zend without json_encode (master still segfaults on json_encode(1) AOT).

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.

REGRESSION: e30_array_lit_dim_assign_shift no longer compiles — HashTable::shiftFirst() unresolved

1 participant