Category
php-in-php · runtime-shrink (#1492, peer Htmlspecialchars #20487 / HashEquals #20469 / Bin2hex #20452)
Problem
lib/JIT/Builtin/StringVarExport.php still forks thin standalone AOT (isThinStandaloneAotMain) through ext/standard/JitVarExportKernel.php (~91 LOC). Both thin and embed paths already NestedJIT VarExportJitHelper — the kernel is only a duplicate coerce bridge + VmActiveContext init. Peer string transforms (StringHtmlspecialchars, StringBin2hex, StringHashEquals) always route through JitVmHelperLink::ensureBridge.
| Path |
Today |
Target |
| Embed / non-thin |
VarExportJitHelper via bridge |
unchanged (unified ensureBridge) |
| Thin standalone AOT |
JitVarExportKernel (same helper) |
VarExportJitHelper via ensureBridge |
php-src reference
PHP implementation target
Repro
./script/docker-exec.sh -- bash -lc 'source script/php-env.sh
vendor/bin/phpunit test/unit/VarExportRuntimeShrinkTest.php
printf "%s\n" "<?php echo var_export([1,\"a\"], true);" > /tmp/ve.php
PHP_COMPILER_HELPER_RUNTIME_O=0 php bin/compile.php -o /tmp/ve /tmp/ve.php && /tmp/ve
make bootstrap-selfhost-vm-driver-execute-probe
'
Done when
Refs #1492, #20077, #19430, #20487, #10533
Category
php-in-php· runtime-shrink (#1492, peer Htmlspecialchars #20487 / HashEquals #20469 / Bin2hex #20452)Problem
lib/JIT/Builtin/StringVarExport.phpstill forks thin standalone AOT (isThinStandaloneAotMain) throughext/standard/JitVarExportKernel.php(~91 LOC). Both thin and embed paths already NestedJITVarExportJitHelper— the kernel is only a duplicate coerce bridge + VmActiveContext init. Peer string transforms (StringHtmlspecialchars,StringBin2hex,StringHashEquals) always route throughJitVmHelperLink::ensureBridge.VarExportJitHelpervia bridgeensureBridge)JitVarExportKernel(same helper)VarExportJitHelperviaensureBridgephp-src reference
php_var_export_exPHP implementation target
lib/JIT/Builtin/StringVarExport.php— alwaysJitVmHelperLink::ensureBridgeafter VmActiveContext init (dropisThinStandaloneAotMainfork)ext/standard/JitVarExportKernel.phpVarExportRuntimeShrinkTest+ spine require listruntime_unsafeinemit-helper-runtime-object.phpuntil prelinked unit is green underHELPER_RUNTIME_O(peer php-in-php: delete JitHtmlspecialcharsKernel — always JitVmHelperLink + HtmlspecialcharsJitHelper PHP (#1492) #20487)Repro
Done when
JitVarExportKernel.phpdeletedisThinStandaloneAotMain/ kernel entry gone fromStringVarExportvar_exportsmoke greenmake bootstrap-selfhost-vm-driver-execute-probegreenRefs #1492, #20077, #19430, #20487, #10533