Skip to content

SPL: AOT SplFileObject getCsvControl/setCsvControl (#33369) - #33375

Closed
PurHur wants to merge 1 commit into
masterfrom
agent/issue-33369-splfileobject-csvcontrol
Closed

SPL: AOT SplFileObject getCsvControl/setCsvControl (#33369)#33375
PurHur wants to merge 1 commit into
masterfrom
agent/issue-33369-splfileobject-csvcontrol

Conversation

@PurHur

@PurHur PurHur commented Aug 21, 2026

Copy link
Copy Markdown
Owner

Summary

  • AOT SplFileObject::getCsvControl / setCsvControl store the CSV delimiter triple on __spl_csv_{sep,enc,esc} and materialize [sep,enc,esc] via __hashtable__setStringAt + __value__writeHashtable (same thin-AOT pattern as AOT: SplFileObject::fstat() returns empty — Zend size/mode array (ext/spl/spl_directory.c) #33359 fstat — NestedJIT HT returns are unsafe).
  • Defaults match php-src (",", ", \); props registered after SplFileInfo slots so inherited isFile/getSize indices stay stable.
  • No new runtime/*.c. php-src: ext/spl/spl_directory.c zim_SplFileObject_{get,set}CsvControl.

Closes #33369

Test plan

  • ./script/aot-smoke.sh8 passed, 0 failed
  • ./script/docker-exec.sh -- bash -lc '… compile + run test/repro/splfileobject_csvcontrol_aot.php'ctl=["\",","\"","\\"] / ctl2=[";","\"","\\"] (5× AOT earlier; 1× after prop-order fix)
  • ./script/phpunit.sh --filter SplFileObjectCsvControl33369AotTest → OK (2 tests, 14 assertions)
  • No fgetcsv/stat regression: splfileobject_fgetcsv_aot.phprow=["a","b"]; splfileobject_stat_methods_aot.phpfile=1 / size=2

Made with Cursor

Materialize the CSV delimiter triple as object string props and return a
packaged hashtable via __hashtable__setStringAt (thin-AOT NestedJIT HT
unsafe). Defaults match php-src; CSV props sit after SplFileInfo slots.

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur
PurHur force-pushed the agent/issue-33369-splfileobject-csvcontrol branch from ed98068 to 5934c9c Compare August 21, 2026 11:03
@PurHur

PurHur commented Aug 21, 2026

Copy link
Copy Markdown
Owner Author

Superseded by merged #33374 (Closes #33371) — same SplFileObject get/setCsvControl surface landed on master while this PR was rebasing. Closing as duplicate; no further merge needed.

@PurHur PurHur closed this Aug 21, 2026
@PurHur
PurHur deleted the agent/issue-33369-splfileobject-csvcontrol branch August 21, 2026 11:04
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.

AOT: SplFileObject::getCsvControl/setCsvControl return null — Zend CSV delimiter triple (ext/spl/spl_directory.c)

1 participant