Skip to content

JIT: string-key nested array dim lowering + write path (#1072)#1092

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

JIT: string-key nested array dim lowering + write path (#1072)#1092
PurHur merged 1 commit into
masterfrom
fix/1072-nested-array-dim-jit

Conversation

@PurHur
Copy link
Copy Markdown
Owner

@PurHur PurHur commented May 23, 2026

Summary

  • Root cause (init): HashTableHelper::setAtStringKey() lacked a TYPE_HASHTABLE arm, so array literals like ['outer' => ['inner' => 42]] failed JIT with String-key array element type not supported for JIT: __hashtable__* (merged via JIT: string-key nested array dim lowering for __hashtable__* (#1072) #1089).
  • Root cause (write): JIT::assignOperand() routed $arr['key'] = <long|bool> through __value__writeLong/writeBool on a scratch value-box instead of __hashtable__setStringKeyLong/setStringKeyBool, so chained nested writes were no-ops.
  • Coverage: add nested_array_dim_mixed.php (long/string/bool leaves) and nested_array_dim_write.php (chained assignment) to bootstrap AOT link matrix.

Closes #1072

Related: #1056, #1086 (bootstrap AOT link matrix recovery)

Test plan

  • PHP_COMPILER_LLVM_PATH=$PWD/.llvm make bootstrap-aot-linknested_array_dim.php, nested_array_dim_mixed.php, nested_array_dim_write.php OK
  • test/compliance/cases/language/nested_array_dim.phpt
  • ./script/bootstrap-aot-link.sh --verbose spot-check nested fixtures

Made with Cursor

Wire writable string-key assignments through __hashtable__setStringKeyLong/Bool
so chained $a['outer']['inner'] = … persists, and add bootstrap AOT coverage for
mixed scalar leaves and nested writes.

Closes #1072

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur PurHur merged commit a1bafe3 into master May 23, 2026
1 check failed
@PurHur PurHur deleted the fix/1072-nested-array-dim-jit branch May 23, 2026 16:49
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