Skip to content

php-in-php: delete JitVarExportKernel — always JitVmHelperLink + VarExportJitHelper PHP (#1492) #20589

Description

@PurHur

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

  • JitVarExportKernel.php deleted
  • isThinStandaloneAotMain / kernel entry gone from StringVarExport
  • AOT var_export smoke green
  • Shrink + spine sync green
  • make bootstrap-selfhost-vm-driver-execute-probe green
  • PR body cites lines removed

Refs #1492, #20077, #19430, #20487, #10533

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:compilerCompiler / CFG / JITenhancementNew feature or requestimplementation-readySpec complete: repro, php-src ref, done-when — safe for workers to claimphase-0:FoundationPhase 0 – foundation & DevEx

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions