Skip to content

php-in-php: JIT BoundMethodCallableHelper — route [obj,method] FCC LLVM through VmCallable PHP not ~381-line helper (#1492) #10185

Description

@PurHur

Category

php-in-php · language

Problem

lib/JIT/BoundMethodCallableHelper.php (~381 lines) resolves [object, 'method'] first-class callables and bound-method invokes entirely in LLVM. VM lowering for the same patterns lives in lib/VM/Callable.php / FromCallableHelper.php.

Language parity issues on FCC (#10168 instance method FCC, #3566 bound arrays) require duplicate fixes in JIT monolith + VM.

php-src reference

Repro (compile-time divergence)

<?php
class C { public function m(): int { return 1; } }
$f = [new C, 'm'];
echo $f(), "\n";
Engine [new C,'m']()
Zend 1
VM verify current behavior
JIT separate LLVM path in BoundMethodCallableHelper

Scope

Layer Path
VM lib/VM/Callable.php, ext/standard/call_user_func.php
JIT bridge lib/JIT/FromCallableHelper.php → compiled PHP callable resolver
Shrink lib/JIT/BoundMethodCallableHelper.php
Tests test/compliance/cases/language/bound_method_callable.phpt

Done when

Related

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 & DevExphase-2:languagePhase 2 – language features

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions