Skip to content

JIT: string-key nested array dim lowering for __hashtable__* (#1072)#1089

Merged
PurHur merged 1 commit into
masterfrom
fix/1072-nested-array-dim
May 23, 2026
Merged

JIT: string-key nested array dim lowering for __hashtable__* (#1072)#1089
PurHur merged 1 commit into
masterfrom
fix/1072-nested-array-dim

Conversation

@PurHur
Copy link
Copy Markdown
Owner

@PurHur PurHur commented May 23, 2026

Summary

  • Add TYPE_HASHTABLE handling in HashTableHelper::setAtStringKey() so nested array literals like ['outer' => ['inner' => 42]] store child hashtables via __hashtable__setStringKeyHashtable.
  • Fixes bootstrap-aot fixture nested_array_dim.php compile failure and enables chained $a['outer']['inner'] reads in AOT.

Test plan

  • php bin/compile.php -o build/bootstrap-aot/nested_array_dim test/bootstrap-aot/nested_array_dim.php
  • Run binary; output matches Zend PHP (42)
  • CI bootstrap-aot-link gate

Closes #1072

Made with Cursor

…1072)

Array literals like ['outer' => ['inner' => 42]] store nested hashtables
via setAtStringKey; wire TYPE_HASHTABLE to __hashtable__setStringKeyHashtable
so chained $a['outer']['inner'] compiles and runs in bootstrap AOT.

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur PurHur force-pushed the fix/1072-nested-array-dim branch from 6bc224a to 779313e Compare May 23, 2026 16:28
@PurHur PurHur merged commit 4d713a4 into master May 23, 2026
@PurHur PurHur deleted the fix/1072-nested-array-dim branch May 23, 2026 16:28
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.

JIT: String-key hashtable array dim (nested_array_dim)

1 participant