Category
php-in-php · runtime-shrink (#1492, re-#18643)
Problem
lib/JIT/Builtin/ParseStrUserScriptDelimitedJit.php (~1020 LLVM lines) hand-lowers delimited parse_str for user-script AOT superglobal refresh. #18643/#18645 deleted it; #18841 restored LLVM because refresh called __phpc_parse_str_parse_delimited_pairs on raw C strings.
ParseStrNativeJitHelper::parseDelimitedIntoNative is the PHP SSOT; ParseStrRuntime::ensureUserScriptLinked() already bridges __compiler_parse_str / __compiler_parse_cookie_header to that helper. SuperglobalRefreshUserScriptLlvm should convert libc C strings to __string__* via existing cstrToPhpcString() and call those bridges — not emit/link hand-LLVM subhelpers.
php-src reference
PHP implementation target
lib/JIT/Builtin/SuperglobalRefreshUserScriptLlvm.php — route form/cookie parse through __compiler_parse_str / __compiler_parse_cookie_header
- Delete
lib/JIT/Builtin/ParseStrUserScriptDelimitedJit.php (~1020 LOC LLVM removed)
- Update shrink guards in
ParseStrRuntimeShrinkTest, SuperglobalRefreshRuntimeShrinkTest, SuperglobalsBracketRuntimeStandaloneTest
Repro
wc -l lib/JIT/Builtin/ParseStrUserScriptDelimitedJit.php # ~1020 today
./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && vendor/bin/phpunit test/unit/ParseStrRuntimeShrinkTest.php test/aot/NestedSuperglobalsAotTest.php'
./script/check-aot-build-smoke.sh
Done when
Related
Category
php-in-php· runtime-shrink (#1492, re-#18643)Problem
lib/JIT/Builtin/ParseStrUserScriptDelimitedJit.php(~1020 LLVM lines) hand-lowers delimited parse_str for user-script AOT superglobal refresh. #18643/#18645 deleted it; #18841 restored LLVM because refresh called__phpc_parse_str_parse_delimited_pairson raw C strings.ParseStrNativeJitHelper::parseDelimitedIntoNativeis the PHP SSOT;ParseStrRuntime::ensureUserScriptLinked()already bridges__compiler_parse_str/__compiler_parse_cookie_headerto that helper.SuperglobalRefreshUserScriptLlvmshould convert libc C strings to__string__*via existingcstrToPhpcString()and call those bridges — not emit/link hand-LLVM subhelpers.php-src reference
PHP_FUNCTION(parse_str)PHP implementation target
lib/JIT/Builtin/SuperglobalRefreshUserScriptLlvm.php— route form/cookie parse through__compiler_parse_str/__compiler_parse_cookie_headerlib/JIT/Builtin/ParseStrUserScriptDelimitedJit.php(~1020 LOC LLVM removed)ParseStrRuntimeShrinkTest,SuperglobalRefreshRuntimeShrinkTest,SuperglobalsBracketRuntimeStandaloneTestRepro
Done when
ParseStrUserScriptDelimitedJit.phpdeleted; no__phpc_parse_str_*LLVM symbols linked for refreshNestedSuperglobalsAotTest+ AOT smoke green (QUERY_STRING flat + nested keys)make bootstrap-selfhost-vm-driver-execute-probegreenRelated