Skip to content

php-in-php: VmFs readlink/symlink/touch — drop host @readlink/@symlink/@touch delegation (#7971 phase 3) #8430

Description

@PurHur

Category

php-in-php | runtime-shrink | bootstrap

Problem

VmFs::readlink(), VmFs::symlink(), and VmFs::touch() still call host Zend builtins (@readlink, @symlink, @touch) on the VM path. JIT/AOT already use libc via JitReadlink / JitSymlink / __compiler_touch (StringFsDirJit). Self-host must not depend on Zend for these syscalls (#7971 phase 3, pairs #6982/#742/#3227).

php-src reference

Repro

grep -n '@readlink\|@symlink\|@touch' ext/standard/VmFs.php

Scope

Path Work
ext/standard/VmFsPathNative.php add readlink(2)/symlinkat(2) FFI
ext/standard/VmFsTouchNative.php (new) utime/stat/open touch parity with StringFsDirJit::emitTouch
ext/standard/VmFs.php route VM through native helpers
Tests extend VmFsRuntimeShrinkTest

Done when

  • No @readlink/@symlink/@touch in VmFs.php
  • --filter VmFsRuntimeShrink green + readlink/touch compliance PHPT
  • PR notes 0 C runtime lines added

Related

#7971 #6982 #742 #3227 #1492

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:vmVirtual machineenhancementNew 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