Category
php-in-PHP · runtime-shrink
Problem
InArrayRuntime and ArrayIsListRuntime still emit hand-written packed-table LLVM in InArrayNativeLlvm.php (~89 LOC) and ArrayIsListNativeLlvm.php (~112 LOC) for __in_array__contains / __array_is_list__check. Phase 3 (#18153) deleted the ArrayBuiltinHelper monolith; ArraySearchRuntime already routes through JitVmHelperLink::ensureBridge + ArraySearchJitHelper PHP. The native LLVM scan duplicates InArrayJitHelper::contains / ArrayIsListJitHelper::isList.
php-src reference
PHP implementation target
lib/JIT/Builtin/InArrayRuntime.php — JitVmHelperLink::ensureBridge to InArrayJitHelper::contains (pattern: ArraySearchRuntime)
lib/JIT/Builtin/ArrayIsListRuntime.php — same for ArrayIsListJitHelper::isList
- Delete
lib/JIT/Builtin/InArrayNativeLlvm.php, lib/JIT/Builtin/ArrayIsListNativeLlvm.php
Repro
./script/docker-exec.sh -- bash -lc 'source script/php-env.sh
vendor/bin/phpunit --filter InArrayRuntimeShrinkTest
vendor/bin/phpunit --filter ArrayIsListRuntimeShrinkTest
'
Done when
Refs #12503, #13645, #18153, #1492
Category
php-in-PHP· runtime-shrinkProblem
InArrayRuntimeandArrayIsListRuntimestill emit hand-written packed-table LLVM inInArrayNativeLlvm.php(~89 LOC) andArrayIsListNativeLlvm.php(~112 LOC) for__in_array__contains/__array_is_list__check. Phase 3 (#18153) deleted theArrayBuiltinHelpermonolith;ArraySearchRuntimealready routes throughJitVmHelperLink::ensureBridge+ArraySearchJitHelperPHP. The native LLVM scan duplicatesInArrayJitHelper::contains/ArrayIsListJitHelper::isList.php-src reference
PHP_FUNCTION(in_array),php_array_is_list()PHP implementation target
lib/JIT/Builtin/InArrayRuntime.php—JitVmHelperLink::ensureBridgetoInArrayJitHelper::contains(pattern:ArraySearchRuntime)lib/JIT/Builtin/ArrayIsListRuntime.php— same forArrayIsListJitHelper::isListlib/JIT/Builtin/InArrayNativeLlvm.php,lib/JIT/Builtin/ArrayIsListNativeLlvm.phpRepro
Done when
JitVmHelperLink::ensureBridgeInArrayNativeLlvm/ArrayIsListNativeLlvmreferencesmake bootstrap-selfhost-vm-driver-execute-probegreenRefs #12503, #13645, #18153, #1492