Skip to content

php-in-php: delete GzStreamIoJit — route gzopen/gzread JIT through GzStreamJitHelper PHP (#1492) #13420

Description

@PurHur

Category

php-in-php · php-src-strict

Problem

lib/JIT/Builtin/GzStreamIoJit.php (~882 LOC) lowers __compiler_gzopen / __compiler_gzwrite / __compiler_gzread / … with inline libz LLVM on the shared stream handle table. VM paths already use ext/standard/VmGzStream.php (pure PHP via VmGzStreamPure + VmZlib, #8936).

php-src reference

Repro

wc -l lib/JIT/Builtin/GzStreamIoJit.php
./script/docker-exec.sh -- bash -lc 'source script/php-env.sh
php bin/vm.php -r "\$p=sys_get_temp_dir().\"/gz_\".getmypid().\".gz\"; \$h=gzopen(\$p,\"w9\"); gzwrite(\$h,\"hi\"); gzclose(\$h); var_export(gzfile(\$p)); @unlink(\$p);"
'

Done when

  • JIT embed + standalone AOT route through GzStreamJitHelper PHP; GzStreamIoJit.php deleted
  • Shrink test + gz* compliance green
  • Spine includes helper + runtime bridge

Refs #6168, #8936, #1492

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