From ded1e2d1647e9c32502deac4014038d009883177 Mon Sep 17 00:00:00 2001 From: "ondrej@mirtes.cz" Date: Mon, 30 Nov 2026 09:21:42 +0000 Subject: [PATCH 1/4] Forget narrowed mutable properties in closures that may run later A closure or arrow function sees the objects it captures by handle, so a property narrowed where the closure is created can be reassigned before it runs. Closures kept the narrowed type of properties fetched on their by-value uses and arrow functions kept every narrowed expression, so `fn () => strlen($holder->value)` was accepted after `$holder->value !== null` even when `$holder->value = null` ran before the call. Both now drop narrowed expressions (and, for arrow functions, the conditional narrowings) that fetch a property which is not readonly, unless the function runs where it is written: invoked immediately, or passed to a parameter that calls it during the call - decided like ArgumentsHandler::callCallbackImmediately(). CallbackArgVisitor marks closures written as call arguments for that check. RecursionGuard::run() and runOnObjectIdentity() call their callback during the call, which their PHPDoc now says. Amp-Thread-ID: https://ampcode.com/threads/T-01a22b9a-ea57-769d-966d-00063668bb3b --- src/Analyser/MutatingScope.php | 108 +- src/Parser/CallbackArgVisitor.php | 40 + src/Type/RecursionGuard.php | 2 + tests/PHPStan/Analyser/nsrt/bug-15891.php | 113 ++ .../nsrt/specified-types-closure-use.php | 4 +- .../CallToFunctionParametersRuleTest.php | 15 + turbo-ext/src/CallbackArgVisitor.cpp | 96 ++ turbo-ext/src/MutatingScope.cpp | 211 ++- turbo-ext/src/generated/CallbackArgVisitor.h | 44 + turbo-ext/src/generated/MutatingScope.h | 1215 +++++++++-------- turbo-ext/tests/parser-visitors.php | 8 + turbo-ext/tests/scope-family.php | 13 +- turbo-ext/tests/smoke.php | 1 + 13 files changed, 1260 insertions(+), 610 deletions(-) create mode 100644 src/Parser/CallbackArgVisitor.php create mode 100644 tests/PHPStan/Analyser/nsrt/bug-15891.php create mode 100644 turbo-ext/src/CallbackArgVisitor.cpp create mode 100644 turbo-ext/src/generated/CallbackArgVisitor.h diff --git a/src/Analyser/MutatingScope.php b/src/Analyser/MutatingScope.php index 629f9985fc5..2795e686908 100644 --- a/src/Analyser/MutatingScope.php +++ b/src/Analyser/MutatingScope.php @@ -46,6 +46,8 @@ use PHPStan\Node\IssetExpr; use PHPStan\Node\Printer\ExprPrinter; use PHPStan\Node\VirtualNode; +use PHPStan\Parser\CallbackArgVisitor; +use PHPStan\Parser\ImmediatelyInvokedClosureVisitor; use PHPStan\Php\PhpVersionFactory; use PHPStan\Php\PhpVersions; use PHPStan\PhpDoc\ResolvedPhpDocBlock; @@ -55,6 +57,7 @@ use PHPStan\Reflection\ClassMemberReflection; use PHPStan\Reflection\ClassReflection; use PHPStan\Reflection\ExtendedMethodReflection; +use PHPStan\Reflection\ExtendedParameterReflection; use PHPStan\Reflection\ExtendedParametersAcceptor; use PHPStan\Reflection\ExtendedPropertyReflection; use PHPStan\Reflection\FunctionReflection; @@ -2586,6 +2589,7 @@ public function enterAnonymousFunctionWithoutReflection( $nativeTypes[$paramExprString] = ExpressionTypeHolder::createYes($use->var, $variableNativeType); } + $isInvokedWhereCreated = $this->isInvokedWhereCreated($closure); $nonStaticExpressions = $this->invalidateStaticExpressions($this->expressionTypes); foreach ($nonStaticExpressions as $exprString => $typeHolder) { $expr = $typeHolder->getExpr(); @@ -2608,6 +2612,10 @@ public function enterAnonymousFunctionWithoutReflection( } } + if (!$isInvokedWhereCreated && $this->containsMutablePropertyFetch($expr)) { + continue; + } + $expressionTypes[$exprString] = $typeHolder; } @@ -2674,6 +2682,91 @@ public function enterAnonymousFunctionWithoutReflection( ); } + /** + * A captured object is shared with the closure, so its properties can be + * reassigned between the closure's creation and its invocation - unless + * it runs right where it is written: immediately invoked, or passed to a + * parameter that calls it during the call (as ArgumentsHandler decides). + */ + private function isInvokedWhereCreated(Expr\Closure|Expr\ArrowFunction $function): bool + { + if ($function->getAttribute(ImmediatelyInvokedClosureVisitor::ATTRIBUTE_NAME) === true) { + return true; + } + + if ($function->getAttribute(CallbackArgVisitor::ATTRIBUTE_NAME) !== true || $this->inFunctionCallsStack === []) { + return false; + } + + [$calleeReflection, $parameter] = $this->inFunctionCallsStack[count($this->inFunctionCallsStack) - 1]; + if ($parameter === null) { + return false; + } + + if ($parameter instanceof ExtendedParameterReflection) { + $isImmediatelyInvoked = $parameter->isImmediatelyInvokedCallable(); + if (!$isImmediatelyInvoked->maybe()) { + return $isImmediatelyInvoked->yes(); + } + } + + return $calleeReflection instanceof FunctionReflection && TypeUtils::findCallableType($parameter->getType()) !== null; + } + + private function containsMutablePropertyFetch(Expr $expr): bool + { + return (new NodeFinder())->findFirst( + [$expr], + fn (Node $node): bool => $node instanceof Expr\NullsafePropertyFetch + || ($node instanceof PropertyFetch && !$this->isReadonlyPropertyFetch($node, false)), + ) !== null; + } + + /** + * @param array $expressionTypes + * @return array + */ + private function invalidateMutablePropertyFetches(array $expressionTypes): array + { + $filteredExpressionTypes = []; + foreach ($expressionTypes as $exprString => $expressionType) { + $expr = $expressionType->getExpr(); + if (!$expr instanceof Variable && $this->containsMutablePropertyFetch($expr)) { + continue; + } + $filteredExpressionTypes[$exprString] = $expressionType; + } + return $filteredExpressionTypes; + } + + /** + * @param array $conditionalExpressions + * @return array + */ + private function invalidateMutablePropertyFetchConditionalExpressions(array $conditionalExpressions): array + { + $filteredConditionalExpressions = []; + foreach ($conditionalExpressions as $exprString => $holders) { + $filteredHolders = []; + foreach ($holders as $key => $holder) { + if ($this->containsMutablePropertyFetch($holder->getTypeHolder()->getExpr())) { + continue; + } + foreach ($holder->getConditionExpressionTypeHolders() as $conditionTypeHolder) { + if ($this->containsMutablePropertyFetch($conditionTypeHolder->getExpr())) { + continue 2; + } + } + $filteredHolders[$key] = $holder; + } + if ($filteredHolders === []) { + continue; + } + $filteredConditionalExpressions[$exprString] = $filteredHolders; + } + return $filteredConditionalExpressions; + } + private function expressionTypeIsUnchangeable(ExpressionTypeHolder $typeHolder): bool { $expr = $typeHolder->getExpr(); @@ -2779,14 +2872,23 @@ public function enterArrowFunctionWithoutReflection(Expr\ArrowFunction $arrowFun $arrowFunctionScope = $arrowFunctionScope->invalidateExpression(new Variable('this')); } + $expressionTypes = $this->invalidateStaticExpressions($arrowFunctionScope->expressionTypes); + $nativeExpressionTypes = $arrowFunctionScope->nativeExpressionTypes; + $conditionalExpressions = $arrowFunctionScope->conditionalExpressions; + if (!$this->isInvokedWhereCreated($arrowFunction)) { + $expressionTypes = $this->invalidateMutablePropertyFetches($expressionTypes); + $nativeExpressionTypes = $this->invalidateMutablePropertyFetches($nativeExpressionTypes); + $conditionalExpressions = $this->invalidateMutablePropertyFetchConditionalExpressions($conditionalExpressions); + } + return $this->scopeFactory->create( $arrowFunctionScope->context, $this->isDeclareStrictTypes(), $arrowFunctionScope->getFunction(), $arrowFunctionScope->getNamespace(), - $this->invalidateStaticExpressions($arrowFunctionScope->expressionTypes), - $arrowFunctionScope->nativeExpressionTypes, - $arrowFunctionScope->conditionalExpressions, + $expressionTypes, + $nativeExpressionTypes, + $conditionalExpressions, $arrowFunctionScope->inClosureBindScopeClasses, new ClosureType(), true, diff --git a/src/Parser/CallbackArgVisitor.php b/src/Parser/CallbackArgVisitor.php new file mode 100644 index 00000000000..fc001cda2d6 --- /dev/null +++ b/src/Parser/CallbackArgVisitor.php @@ -0,0 +1,40 @@ +isPartialFunctionApplication()) { + return null; + } + + foreach ($node->getArgs() as $arg) { + if (!$arg->value instanceof Node\Expr\Closure && !$arg->value instanceof Node\Expr\ArrowFunction) { + continue; + } + + $arg->value->setAttribute(self::ATTRIBUTE_NAME, true); + } + + return null; + } + +} diff --git a/src/Type/RecursionGuard.php b/src/Type/RecursionGuard.php index 647fdd304a1..182c392f839 100644 --- a/src/Type/RecursionGuard.php +++ b/src/Type/RecursionGuard.php @@ -22,6 +22,7 @@ final class RecursionGuard /** * @template T * @param callable(): T $callback + * @param-immediately-invoked-callable $callback * @return T|ErrorType */ public static function run(Type $type, callable $callback) @@ -42,6 +43,7 @@ public static function run(Type $type, callable $callback) /** * @template T * @param callable(): T $callback + * @param-immediately-invoked-callable $callback * @return T|ErrorType */ public static function runOnObjectIdentity(Type $type, callable $callback) diff --git a/tests/PHPStan/Analyser/nsrt/bug-15891.php b/tests/PHPStan/Analyser/nsrt/bug-15891.php new file mode 100644 index 00000000000..9e075b05389 --- /dev/null +++ b/tests/PHPStan/Analyser/nsrt/bug-15891.php @@ -0,0 +1,113 @@ += 8.1 + +declare(strict_types = 1); + +namespace Bug15891; + +use function PHPStan\Testing\assertType; + +final class Holder +{ + public ?string $value = 'abc'; +} + +function capturedProperty(Holder $holder): int +{ + if ($holder->value === null) { + return 0; + } + + $length = function () use ($holder): int { + assertType('string|null', $holder->value); + return strlen($holder->value); + }; + $holder->value = null; + + return $length(); // TypeError: strlen(): Argument #1 ($string) must be of type string, null given +} + +function capturedPropertyArrowFn(Holder $holder): int +{ + if ($holder->value === null) { + return 0; + } + + $length = fn (): int => strlen($holder->value); + $holder->value = null; + + return $length(); // TypeError as well +} + +function capturedConditionalNarrowing(Holder $holder): void +{ + $isString = $holder->value !== null; + $f = fn () => $isString ? assertType('string|null', $holder->value) : null; + $g = function () use ($isString, $holder): void { + if ($isString) { + assertType('string|null', $holder->value); + } + }; + if ($isString) { + assertType('string', $holder->value); + } +} + +final class ReadonlyHolder +{ + public function __construct(public readonly ?string $value, public readonly ?Holder $holder) + { + } +} + +/** @param-later-invoked-callable $callback */ +function later(callable $callback): void +{ +} + +final class Foo +{ + + public ?string $value = null; + + public function takesCallable(callable $callback): void + { + } + + public function doFoo(Holder $holder, ReadonlyHolder $readonlyHolder, array $list): void + { + if ($holder->value === null || $this->value === null || $readonlyHolder->value === null || $readonlyHolder->holder === null || $readonlyHolder->holder->value === null) { + return; + } + + // run during the call: nothing can reassign the property in between + array_map(function () use ($holder): void { + assertType('string', $holder->value); + }, [1]); + array_map(fn () => assertType('string', $holder->value), [1]); + array_map(fn () => assertType('string', $this->value), [1]); + usort($list, fn ($a, $b) => assertType('string', $holder->value)); + (function () use ($holder): void { + assertType('string', $holder->value); + })(); + (fn () => assertType('string', $holder->value))(); + + // may run after the property is reassigned + $f = fn () => assertType('string|null', $this->value); + later(fn () => assertType('string|null', $holder->value)); + later(function () use ($holder): void { + assertType('string|null', $holder->value); + }); + $this->takesCallable(fn () => assertType('string|null', $holder->value)); + array_map(function () use ($holder): void { + $f = fn () => assertType('string|null', $holder->value); + }, [1]); + + // a readonly property cannot be reassigned, but the object it holds can change + $f = fn () => assertType('string', $readonlyHolder->value); + $f = function () use ($readonlyHolder): void { + assertType('string', $readonlyHolder->value); + assertType('string|null', $readonlyHolder->holder->value); + }; + } + +} diff --git a/tests/PHPStan/Analyser/nsrt/specified-types-closure-use.php b/tests/PHPStan/Analyser/nsrt/specified-types-closure-use.php index f5f8189ded2..d61da57b092 100644 --- a/tests/PHPStan/Analyser/nsrt/specified-types-closure-use.php +++ b/tests/PHPStan/Analyser/nsrt/specified-types-closure-use.php @@ -13,7 +13,7 @@ public function doFoo(MethodCall $call, MethodCall $bar): void { if ($call->name instanceof Identifier && $bar->name instanceof Identifier) { function () use ($call): void { - assertType('PhpParser\Node\Identifier', $call->name); + assertType('PhpParser\Node\Expr|PhpParser\Node\Identifier', $call->name); assertType('mixed', $bar->name); }; @@ -26,7 +26,7 @@ public function doBar(MethodCall $call, MethodCall $bar): void if ($call->name instanceof Identifier && $bar->name instanceof Identifier) { $a = 1; function () use ($call, &$a): void { - assertType('PhpParser\Node\Identifier', $call->name); + assertType('PhpParser\Node\Expr|PhpParser\Node\Identifier', $call->name); assertType('mixed', $bar->name); }; diff --git a/tests/PHPStan/Rules/Functions/CallToFunctionParametersRuleTest.php b/tests/PHPStan/Rules/Functions/CallToFunctionParametersRuleTest.php index baa449fb604..46023b80695 100644 --- a/tests/PHPStan/Rules/Functions/CallToFunctionParametersRuleTest.php +++ b/tests/PHPStan/Rules/Functions/CallToFunctionParametersRuleTest.php @@ -3754,6 +3754,21 @@ public function testBug15882(): void ]); } + #[RequiresPhp('>= 8.1.0')] + public function testBug15891(): void + { + $this->analyse([__DIR__ . '/../../Analyser/nsrt/bug-15891.php'], [ + [ + 'Parameter #1 $string of function strlen expects string, string|null given.', + 22, + ], + [ + 'Parameter #1 $string of function strlen expects string, string|null given.', + 35, + ], + ]); + } + public function testFloatConstantLoopGeneralize(): void { $this->analyse([__DIR__ . '/../../Analyser/nsrt/float-constant-loop-generalize.php'], []); diff --git a/turbo-ext/src/CallbackArgVisitor.cpp b/turbo-ext/src/CallbackArgVisitor.cpp new file mode 100644 index 00000000000..36b1af6f94c --- /dev/null +++ b/turbo-ext/src/CallbackArgVisitor.cpp @@ -0,0 +1,96 @@ +/* + * PHPStanTurbo\CallbackArgVisitor — native twin of + * PHPStan\Parser\CallbackArgVisitor, declared under that name at activation + * (final, extending PhpParser\NodeVisitorAbstract like the original). + * + * Marks a closure/arrow function written directly as an argument of a call. + * + * enterNode() always returns null, so the visitor is also registered with + * pt_native_visitor_register(): the native NodeTraverser then runs it + * directly per node instead of calling into the engine (ParserVisitors.h). + */ + +#include "ParserVisitors.h" +#include "generated/CallbackArgVisitor.h" + +namespace sigs = ptdecl::CallbackArgVisitor::sig; + +static zend_class_entry *pt_ce_callback_arg_visitor = nullptr; + +static const char pt_callback_arg_attribute[] = "isCallbackArg"; +static zend_string *pt_callback_arg_attribute_str = nullptr; + +namespace phpstanturbo { + +using visitors::NodeProp; + +/* Mirrors PHPStan\Parser\CallbackArgVisitor. */ +class CallbackArgVisitor +{ +public: + /* enterNode(); the twin always returns null, false = pending exception */ + [[nodiscard]] static bool enterNode(zend_object *visitor, zend_object *node) + { + static NodeProp argValueProp = PT_NODE_PROP(PT_CLASS_ARG, "value"); + + if (!visitors::isInstanceOf(node, PT_CLASS_CALL_LIKE)) return !EG(exception); + bool isPartial; + if (UNEXPECTED(!pt_call_like_is_partial_function_application(node, isPartial))) return false; + if (isPartial) return true; + + zv::Val hold; + zval *args = pt_call_like_args(node, hold); + if (UNEXPECTED(args == NULL)) return false; + if (Z_TYPE_P(args) != IS_ARRAY) return true; + for (auto entry : zv::ArrRef(args)) { + zv::Ref arg = entry.value().deref(); + if (!arg.isObject()) continue; + zend_object *value = argValueProp.objectOf(arg.asObject(), PT_CLASS_CLOSURE_EXPR); + if (value == NULL) { + value = argValueProp.objectOf(arg.asObject(), PT_CLASS_ARROW_FUNCTION); + } + if (value == NULL) { + if (UNEXPECTED(EG(exception))) return false; + continue; + } + + visitors::setAttributeTrue(value, pt_callback_arg_attribute_str); + } + return !EG(exception); + } +}; + +} // namespace phpstanturbo + +using phpstanturbo::CallbackArgVisitor; + +/* {{{ engine ABI glue: parameter parsing + registration */ + +static const pt_native_visitor pt_callback_arg_entry = { + &pt_ce_callback_arg_visitor, + CallbackArgVisitor::enterNode, + NULL, + NULL, +}; + +PT_MINIT_REGISTRATION(pt_register_callback_arg_visitor) +{ + pt_callback_arg_attribute_str = zend_string_init_interned(pt_callback_arg_attribute, sizeof(pt_callback_arg_attribute) - 1, 1); + + reg::Class cls("PHPStan\\Parser\\CallbackArgVisitor"); + ptdecl::CallbackArgVisitor::declareClass(cls); + ptdecl::CallbackArgVisitor::declareProperties(cls); + cls.publicClassConstantString("ATTRIBUTE_NAME", pt_callback_arg_attribute); + + cls.method(sigs::enterNode, [](INTERNAL_FUNCTION_PARAMETERS) { + zval *node; + if (!zp::parse(execute_data, node)) RETURN_THROWS(); + if (UNEXPECTED(!CallbackArgVisitor::enterNode(Z_OBJ_P(ZEND_THIS), Z_OBJ_P(node)))) RETURN_THROWS(); + RETURN_NULL(); + }); + + cls.shadow(&pt_ce_callback_arg_visitor); + pt_native_visitor_register(&pt_callback_arg_entry); +} + +/* }}} */ diff --git a/turbo-ext/src/MutatingScope.cpp b/turbo-ext/src/MutatingScope.cpp index ab425e6e856..f546608225a 100644 --- a/turbo-ext/src/MutatingScope.cpp +++ b/turbo-ext/src/MutatingScope.cpp @@ -540,6 +540,11 @@ static const InternalScopeFactorySlots *internalScopeFactorySlots(zend_object *f /* }}} */ +/* ImmediatelyInvokedClosureVisitor::ATTRIBUTE_NAME and + * CallbackArgVisitor::ATTRIBUTE_NAME, read by isInvokedWhereCreated() */ +static zend_string *pt_ms_immediately_invoked_closure_attribute_str = nullptr; +static zend_string *pt_ms_callback_arg_attribute_str = nullptr; + namespace phpstanturbo { /* the 18 arguments of InternalScopeFactory::create(), in its parameter @@ -5480,6 +5485,8 @@ class MutatingScope setHolder(nativeTypes, key.get(), var.deref().raw(), variableNativeType.raw(), PT_TRI_YES); } + bool invokedWhereCreated; + if (UNEXPECTED(!isInvokedWhereCreated(closure, invokedWhereCreated))) return zv::Val(); if (UNEXPECTED(!requireSlot(PT_MS_PROP_EXPRESSION_TYPES, "expressionTypes"))) return zv::Val(); zv::Val nonStaticExpressions = invalidateStaticExpressions(Z_ARRVAL_P(slot(PT_MS_PROP_EXPRESSION_TYPES).raw())); if (UNEXPECTED(nonStaticExpressions.isUndef())) return zv::Val(); @@ -5511,7 +5518,13 @@ class MutatingScope break; } } - if (skip || exprString == NULL) continue; + if (skip) continue; + if (!invokedWhereCreated) { + bool mutable_; + if (UNEXPECTED(!containsMutablePropertyFetch(expr.ref().asObject(), mutable_))) return zv::Val(); + if (mutable_) continue; + } + if (exprString == NULL) continue; expressionTypes.set(exprString, zv::Val::copyOf(entry.value().deref())); } @@ -5601,6 +5614,183 @@ class MutatingScope return scopeFactoryCreate(a); } + /* private isInvokedWhereCreated(); false = pending exception */ + [[nodiscard]] bool isInvokedWhereCreated(zend_object *function, bool &out) + { + out = false; + zval *immediatelyInvoked = pt_node_attribute(function, pt_ms_immediately_invoked_closure_attribute_str); + if (immediatelyInvoked != NULL) { + ZVAL_DEREF(immediatelyInvoked); + if (Z_TYPE_P(immediatelyInvoked) == IS_TRUE) { + out = true; + return true; + } + } + + zval *callbackArg = pt_node_attribute(function, pt_ms_callback_arg_attribute_str); + if (callbackArg != NULL) { + ZVAL_DEREF(callbackArg); + } + if (callbackArg == NULL || Z_TYPE_P(callbackArg) != IS_TRUE) return true; + if (UNEXPECTED(!requireSlot(PT_MS_PROP_IN_FUNCTION_CALLS_STACK, "inFunctionCallsStack"))) return false; + zval *top = arrayLast(Z_ARRVAL_P(slot(PT_MS_PROP_IN_FUNCTION_CALLS_STACK).raw())); + if (top == NULL) return true; + if (UNEXPECTED(Z_TYPE_P(top) != IS_ARRAY)) { + zend_throw_error(NULL, "phpstan_turbo: an inFunctionCallsStack entry must be an array"); + return false; + } + zval *calleeReflection = zend_hash_index_find(Z_ARRVAL_P(top), 0); + zval *parameter = zend_hash_index_find(Z_ARRVAL_P(top), 1); + if (parameter != NULL) ZVAL_DEREF(parameter); + if (parameter == NULL || Z_TYPE_P(parameter) == IS_NULL) return true; + if (UNEXPECTED(Z_TYPE_P(parameter) != IS_OBJECT)) { + zend_throw_error(NULL, "phpstan_turbo: an inFunctionCallsStack parameter must be an object"); + return false; + } + + bool isExtended; + if (UNEXPECTED(!isInstance(zv::Ref(parameter), PT_CLASS_EXTENDED_PARAMETER_REFLECTION, isExtended))) return false; + if (isExtended) { + zv::Val isImmediatelyInvoked = pt_type_call(Z_OBJ_P(parameter), PT_LC("isimmediatelyinvokedcallable"), 0, NULL); + if (UNEXPECTED(isImmediatelyInvoked.isUndef())) return false; + zend_long value = pt_type_trinary_value(isImmediatelyInvoked.raw()); + if (UNEXPECTED(value < 0)) return false; + if (value != PT_TRI_MAYBE) { + out = value == PT_TRI_YES; + return true; + } + } + + bool isFunction = false; + if (calleeReflection != NULL) { + ZVAL_DEREF(calleeReflection); + if (UNEXPECTED(!isInstance(zv::Ref(calleeReflection), PT_CLASS_FUNCTION_REFLECTION, isFunction))) return false; + } + if (!isFunction) return true; + zv::Val parameterType = pt_type_call(Z_OBJ_P(parameter), PT_LC("gettype"), 0, NULL); + if (UNEXPECTED(parameterType.isUndef())) return false; + zv::Val callableType = pt_type_utils_find_callable_type(parameterType.raw()); + if (UNEXPECTED(callableType.isUndef())) return false; + out = !callableType.isNull(); + return true; + } + + struct MutablePropertyFetchCtx + { + pt_find_ctx base; + MutatingScope *scope; + zend_class_entry *propertyFetch; + zend_class_entry *nullsafePropertyFetch; + }; + + static bool mutablePropertyFetchMatcher(zend_object *node, void *vctx) + { + MutablePropertyFetchCtx *ctx = (MutablePropertyFetchCtx *) vctx; + if (ctx->base.failed) return false; + if (instanceof_function(node->ce, ctx->nullsafePropertyFetch)) return true; + if (!instanceof_function(node->ce, ctx->propertyFetch)) return false; + zval nodeZv; + ZVAL_OBJ(&nodeZv, node); + bool readonly; + if (UNEXPECTED(!ctx->scope->thisIsReadonlyPropertyFetch(&nodeZv, false, readonly))) { + ctx->base.failed = true; + return false; + } + return !readonly; + } + + /* private containsMutablePropertyFetch(); false = pending exception */ + [[nodiscard]] bool containsMutablePropertyFetch(zend_object *expr, bool &out) + { + MutablePropertyFetchCtx ctx; + memset(&ctx, 0, sizeof(ctx)); + ctx.scope = this; + ctx.propertyFetch = pt_class(PT_CLASS_PROPERTY_FETCH); + ctx.nullsafePropertyFetch = pt_class(PT_CLASS_NULLSAFE_PROPERTY_FETCH); + if (UNEXPECTED(ctx.propertyFetch == NULL || ctx.nullsafePropertyFetch == NULL)) return false; + zend_object *found = pt_find_first_recursive(expr, mutablePropertyFetchMatcher, &ctx); + if (UNEXPECTED(ctx.base.failed)) return false; + out = found != NULL; + return true; + } + + /* private invalidateMutablePropertyFetches() */ + zv::Val invalidateMutablePropertyFetches(HashTable *expressionTypes) + { + zend_class_entry *variableCe = pt_class(PT_CLASS_VARIABLE); + if (UNEXPECTED(variableCe == NULL)) return zv::Val(); + zv::Arr filtered = zv::Arr::create(zend_hash_num_elements(expressionTypes)); + for (auto entry : zv::TableRef(expressionTypes)) { + zv::Val expr = holderExpr(entry.value()); + if (UNEXPECTED(expr.isUndef())) return zv::Val(); + if (UNEXPECTED(!expr.ref().isObject())) { + zend_throw_error(NULL, "phpstan_turbo: ExpressionTypeHolder::getExpr() must return an object"); + return zv::Val(); + } + if (!instanceof_function(expr.ref().asObject()->ce, variableCe)) { + bool mutable_; + if (UNEXPECTED(!containsMutablePropertyFetch(expr.ref().asObject(), mutable_))) return zv::Val(); + if (mutable_) continue; + } + zval copy; + ZVAL_COPY(©, entry.value().deref().raw()); + pt_ht_update(filtered.table(), entry.stringKeyOrNull(), entry.indexKey(), ©); + } + return zv::Val(std::move(filtered)); + } + + /* whether the holder's expression contains a mutable property fetch; + * false = pending exception */ + [[nodiscard]] bool holderContainsMutablePropertyFetch(zv::Ref holder, bool &out) + { + zv::Val expr = holderExpr(holder); + if (UNEXPECTED(expr.isUndef())) return false; + if (UNEXPECTED(!expr.ref().isObject())) { + zend_throw_error(NULL, "phpstan_turbo: ExpressionTypeHolder::getExpr() must return an object"); + return false; + } + return containsMutablePropertyFetch(expr.ref().asObject(), out); + } + + /* private invalidateMutablePropertyFetchConditionalExpressions() */ + zv::Val invalidateMutablePropertyFetchConditionalExpressions(HashTable *conditionalExpressions) + { + zv::Arr filtered = zv::Arr::create(0); + for (auto entry : zv::TableRef(conditionalExpressions)) { + zv::Arr filteredHolders = zv::Arr::create(0); + for (auto holderEntry : zv::ArrRef(entry.value().deref().raw())) { + zv::Ref holder = holderEntry.value().deref(); + if (UNEXPECTED(!holder.isObject())) { + zend_throw_error(NULL, "Call to a member function getTypeHolder() on %s", zend_zval_value_name(holder.raw())); + return zv::Val(); + } + zv::Val typeHolder = pt_type_call(holder.asObject(), PT_LC("gettypeholder"), 0, NULL); + if (UNEXPECTED(typeHolder.isUndef())) return zv::Val(); + bool mutable_; + if (UNEXPECTED(!holderContainsMutablePropertyFetch(typeHolder.ref(), mutable_))) return zv::Val(); + if (mutable_) continue; + zv::Val conditionHolders = pt_type_call(holder.asObject(), PT_LC("getconditionexpressiontypeholders"), 0, NULL); + if (UNEXPECTED(conditionHolders.isUndef())) return zv::Val(); + bool skip = false; + for (auto conditionEntry : zv::ArrRef(conditionHolders.raw())) { + if (UNEXPECTED(!holderContainsMutablePropertyFetch(conditionEntry.value(), mutable_))) return zv::Val(); + if (mutable_) { + skip = true; + break; + } + } + if (skip) continue; + zval copy; + ZVAL_COPY(©, holder.raw()); + pt_ht_update(filteredHolders.table(), holderEntry.stringKeyOrNull(), holderEntry.indexKey(), ©); + } + zend_string *exprString = entry.stringKeyOrNull(); + if (exprString == NULL || zend_hash_num_elements(filteredHolders.table()) == 0) continue; + filtered.set(exprString, zv::Val(std::move(filteredHolders))); + } + return zv::Val(std::move(filtered)); + } + /* private (twin 2741); false = pending exception */ [[nodiscard]] bool expressionTypeIsUnchangeable(zv::Ref typeHolder, bool &out) { @@ -5777,9 +5967,19 @@ class MutatingScope a.setBool(CreateArgs::DECLARE_STRICT_TYPES, declareStrictTypes); PT_MS_ARG_CREATE(a, CreateArgs::FUNCTION, pt_type_call(scopeObject, PT_LC("getfunction"), 0, NULL)); PT_MS_ARG_CREATE(a, CreateArgs::NAMESPACE_, pt_type_call(scopeObject, PT_LC("getnamespace"), 0, NULL)); - PT_MS_ARG_CREATE(a, CreateArgs::EXPRESSION_TYPES, invalidateStaticExpressions(Z_ARRVAL_P(scopeExpressionTypes))); - a.set(CreateArgs::NATIVE_EXPRESSION_TYPES, zv::Ref(scopeNativeExpressionTypes)); - a.set(CreateArgs::CONDITIONAL_EXPRESSIONS, zv::Ref(scopeConditionalExpressions)); + zv::Val expressionTypes = invalidateStaticExpressions(Z_ARRVAL_P(scopeExpressionTypes)); + if (UNEXPECTED(expressionTypes.isUndef())) return zv::Val(); + bool invokedWhereCreated; + if (UNEXPECTED(!isInvokedWhereCreated(arrowFunction, invokedWhereCreated))) return zv::Val(); + if (invokedWhereCreated) { + a.setOwned(CreateArgs::EXPRESSION_TYPES, std::move(expressionTypes)); + a.set(CreateArgs::NATIVE_EXPRESSION_TYPES, zv::Ref(scopeNativeExpressionTypes)); + a.set(CreateArgs::CONDITIONAL_EXPRESSIONS, zv::Ref(scopeConditionalExpressions)); + } else { + PT_MS_ARG_CREATE(a, CreateArgs::EXPRESSION_TYPES, invalidateMutablePropertyFetches(Z_ARRVAL_P(expressionTypes.raw()))); + PT_MS_ARG_CREATE(a, CreateArgs::NATIVE_EXPRESSION_TYPES, invalidateMutablePropertyFetches(Z_ARRVAL_P(scopeNativeExpressionTypes))); + PT_MS_ARG_CREATE(a, CreateArgs::CONDITIONAL_EXPRESSIONS, invalidateMutablePropertyFetchConditionalExpressions(Z_ARRVAL_P(scopeConditionalExpressions))); + } a.set(CreateArgs::IN_CLOSURE_BIND_SCOPE_CLASSES, zv::Ref(scopeInClosureBindScopeClasses)); zval closureTypeZv; if (UNEXPECTED(!pt_closure_type_new(&closureTypeZv))) return zv::Val(); @@ -14617,6 +14817,9 @@ PT_MINIT_REGISTRATION(pt_register_mutating_scope) { using namespace pt_ms; + pt_ms_immediately_invoked_closure_attribute_str = zend_string_init_interned(PT_LC("isImmediatelyInvokedClosure"), 1); + pt_ms_callback_arg_attribute_str = zend_string_init_interned(PT_LC("isCallbackArg"), 1); + reg::Class cls("PHPStan\\Analyser\\MutatingScope"); /* not final: NodeCallbackScope extends it in PHP (and a third party * may too), so every method stays dispatched through the object's diff --git a/turbo-ext/src/generated/CallbackArgVisitor.h b/turbo-ext/src/generated/CallbackArgVisitor.h new file mode 100644 index 00000000000..a7c1000c415 --- /dev/null +++ b/turbo-ext/src/generated/CallbackArgVisitor.h @@ -0,0 +1,44 @@ +/* Generated by turbo-ext/bin/generate-declarations.php from + * src/Parser/CallbackArgVisitor.php — do not edit. */ + +#ifndef PHPSTANTURBO_GENERATED_CALLBACK_ARG_VISITOR_H +#define PHPSTANTURBO_GENERATED_CALLBACK_ARG_VISITOR_H + +#include "../reg.h" + +namespace ptdecl::CallbackArgVisitor { + +inline void declareClass(reg::Class &cls) +{ + cls.final(); + cls.parent("PhpParser\\NodeVisitorAbstract"); +} + +/* the properties the class declares itself, in declaration order (a used trait's come from its registrar) */ +inline void declareProperties(reg::Class &cls) +{ + (void) cls; +} + +/* the string and parameter tables the signatures below index into (see reg::Sig) */ +namespace sigtab { +inline constexpr char strings[] = + "node\0" /* 0 */ + "PhpParser\\Node\0" /* 5 */ + "\0" /* 20 */ + "enterNode"; /* 21 */ +inline constexpr reg::PackedArg args[] = { + reg::packed(0, 0, 5), /* enterNode $node */ + reg::packed(20, MAY_BE_NULL, 5), /* enterNode return */ +}; +using Sig = reg::Sig; +} // namespace sigtab + +/* the signatures of the methods the class declares itself (a used trait's are in the trait's header) */ +namespace sig { +inline constexpr sigtab::Sig enterNode = { { 21 /* enterNode */, 1, 0, 1, 1, ZEND_ACC_PUBLIC } }; +} // namespace sig + +} // namespace ptdecl::CallbackArgVisitor + +#endif diff --git a/turbo-ext/src/generated/MutatingScope.h b/turbo-ext/src/generated/MutatingScope.h index 9b2b57b5716..5cb164d3c48 100644 --- a/turbo-ext/src/generated/MutatingScope.h +++ b/turbo-ext/src/generated/MutatingScope.h @@ -303,275 +303,280 @@ inline constexpr char strings[] = "nativeCallableParameters\0" /* 4647 */ "enterAnonymousFunction\0" /* 4672 */ "enterAnonymousFunctionWithoutReflection\0" /* 4695 */ - "typeHolder\0" /* 4735 */ - "PHPStan\\Analyser\\ExpressionTypeHolder\0" /* 4746 */ - "expressionTypeIsUnchangeable\0" /* 4784 */ - "invalidateStaticExpressions\0" /* 4813 */ - "arrowFunction\0" /* 4841 */ - "PhpParser\\Node\\Expr\\ArrowFunction\0" /* 4855 */ - "enterArrowFunction\0" /* 4889 */ - "enterArrowFunctionWithoutReflection\0" /* 4908 */ - "PhpParser\\Node\\Param\0" /* 4944 */ - "isParameterValueNullable\0" /* 4965 */ - "isNullable\0" /* 4990 */ - "isVariadic\0" /* 5001 */ - "getFunctionType\0" /* 5012 */ - "index\0" /* 5028 */ - "getCallableParameterType\0" /* 5034 */ - "startIndex\0" /* 5059 */ - "buildVariadicArrayTypeFromCallableParameters\0" /* 5070 */ - "nativeType\0" /* 5115 */ - "inferredType\0" /* 5126 */ - "intersectButNotNever\0" /* 5139 */ - "PhpParser\\Node\\Expr\\Match_\0" /* 5160 */ - "condType\0" /* 5187 */ - "condNativeType\0" /* 5196 */ - "enterMatch\0" /* 5211 */ - "iteratee\0" /* 5222 */ - "iterateeType\0" /* 5231 */ - "nativeIterateeType\0" /* 5244 */ - "valueName\0" /* 5263 */ - "keyName\0" /* 5273 */ - "valueByRef\0" /* 5281 */ - "enterForeach\0" /* 5292 */ - "enterForeachKey\0" /* 5305 */ - "catchType\0" /* 5321 */ - "enterCatchType\0" /* 5331 */ - "isPlainWrite\0" /* 5346 */ - "enterExpressionAssign\0" /* 5359 */ - "exitExpressionAssign\0" /* 5381 */ - "isInExpressionAssign\0" /* 5402 */ - "isInWriteExpressionAssign\0" /* 5423 */ - "setAllowedUndefinedExpression\0" /* 5449 */ - "unsetAllowedUndefinedExpression\0" /* 5479 */ - "isUndefinedExpressionAllowed\0" /* 5511 */ - "certainty\0" /* 5540 */ - "intertwinedPropagatedFrom\0" /* 5550 */ - "assignVariable\0" /* 5576 */ - "overwriteExpression\0" /* 5591 */ - "scope\0" /* 5611 */ - "rootType\0" /* 5617 */ - "assignedExpr\0" /* 5626 */ - "rootVariableName\0" /* 5639 */ - "native\0" /* 5656 */ - "resolveIntertwinedAssignedType\0" /* 5663 */ - "dimFetch\0" /* 5694 */ - "PhpParser\\Node\\Expr\\ArrayDimFetch\0" /* 5703 */ - "isDimFetchPathReachable\0" /* 5737 */ - "unsetExpression\0" /* 5761 */ - "getStateType\0" /* 5777 */ - "getScopeStateType\0" /* 5790 */ - "getScopeStateNativeType\0" /* 5808 */ - "resolveScopeStateType\0" /* 5832 */ - "specifyExpressionType\0" /* 5854 */ - "openSpecificationScope\0" /* 5876 */ - "isSpecifyExpressionTypeNoop\0" /* 5899 */ - "narrowedFrom\0" /* 5927 */ - "nativeNarrowedFrom\0" /* 5940 */ - "specifyExpressionTypeInPlace\0" /* 5959 */ - "assignExpression\0" /* 5988 */ - "specifyAssignedExpressionType\0" /* 6005 */ - "fetchedOnType\0" /* 6035 */ - "assignInitializedProperty\0" /* 6049 */ - "expressionToInvalidate\0" /* 6075 */ - "requireMoreCharacters\0" /* 6098 */ - "invalidatingClass\0" /* 6120 */ - "keepPropertyFetches\0" /* 6138 */ - "preservedPropertyNames\0" /* 6158 */ - "invalidateExpression\0" /* 6181 */ - "assignObjectAlias\0" /* 6202 */ - "assignNarrowedFrom\0" /* 6220 */ - "otherExpr\0" /* 6239 */ - "holdsSameObject\0" /* 6249 */ - "aliasedExpr\0" /* 6265 */ - "specifyObjectAlias\0" /* 6277 */ - "getObjectAliasRootVariableName\0" /* 6296 */ - "getObjectAliasEdges\0" /* 6327 */ - "includeSelf\0" /* 6347 */ - "getPropertyFetchChainPrefixes\0" /* 6359 */ - "edges\0" /* 6389 */ - "findObjectAliasClass\0" /* 6395 */ - "findObjectAliasInvalidationTargets\0" /* 6416 */ - "targets\0" /* 6451 */ - "reconnectObjectAliases\0" /* 6459 */ - "invalidateExpressionWithoutAliases\0" /* 6482 */ - "isPrivatePropertyOfDifferentClass\0" /* 6517 */ - "invalidateMethodsOnExpression\0" /* 6551 */ - "setExpressionCertaintyKeepingType\0" /* 6581 */ - "varType\0" /* 6615 */ - "dimType\0" /* 6623 */ - "offsetValueType\0" /* 6631 */ - "removeArraysWithoutOffsetValueType\0" /* 6647 */ - "isComplexUnionType\0" /* 6682 */ - "addTypeToExpression\0" /* 6701 */ - "typeToRemove\0" /* 6721 */ - "removeTypeFromExpression\0" /* 6734 */ - "filterByTruthyValue\0" /* 6759 */ - "filterByFalseyValue\0" /* 6779 */ - "specifiedTypes\0" /* 6799 */ - "applySpecifiedTypes\0" /* 6814 */ - "changedExpressions\0" /* 6834 */ - "respecifyRelationalFacts\0" /* 6853 */ - "applySpecifiedTypesBatch\0" /* 6878 */ - "specifiedExpressions\0" /* 6903 */ - "processConditionalExpressionsAfterSpecifying\0" /* 6924 */ - "getConditionalExpressions\0" /* 6969 */ - "conditionalExpressionHolders\0" /* 6995 */ - "addConditionalExpressions\0" /* 7024 */ - "exitFirstLevelStatements\0" /* 7050 */ - "isInFirstLevelStatement\0" /* 7075 */ - "otherScope\0" /* 7099 */ - "preserveVacuousConditionals\0" /* 7110 */ - "joinsIterations\0" /* 7138 */ - "mergeWith\0" /* 7154 */ - "differingKeys\0" /* 7164 */ - "ourTypes\0" /* 7178 */ - "theirTypes\0" /* 7187 */ - "ourNativeTypes\0" /* 7198 */ - "theirNativeTypes\0" /* 7213 */ - "completeOffsetWriteBases\0" /* 7230 */ - "holder\0" /* 7255 */ - "types\0" /* 7262 */ - "nativeTypes\0" /* 7268 */ - "completeOffsetWriteBase\0" /* 7280 */ - "ours\0" /* 7304 */ - "theirs\0" /* 7309 */ - "collectAbsorbedClosures\0" /* 7316 */ - "mergeWithVariableState\0" /* 7340 */ - "differingExpressionKeys\0" /* 7363 */ - "mergedExpressionTypes\0" /* 7387 */ - "findMergedCallCandidates\0" /* 7409 */ - "call\0" /* 7434 */ - "PhpParser\\Node\\Expr\\FuncCall|PhpParser\\Node\\Expr\\MethodCall|PhpParser\\Node\\Expr\\StaticCall\0" /* 7439 */ - "hasNarrowableArgument\0" /* 7530 */ - "candidates\0" /* 7552 */ - "mergedNativeTypes\0" /* 7563 */ - "findUninformativeMergedCalls\0" /* 7581 */ - "ourExpressionTypes\0" /* 7610 */ - "theirExpressionTypes\0" /* 7629 */ - "withoutPreciseClassConstantFetches\0" /* 7650 */ - "currentConditionalExpressions\0" /* 7685 */ - "sourceConditionalExpressions\0" /* 7715 */ - "otherExpressionTypes\0" /* 7744 */ - "preserveVacuousConditionalExpressions\0" /* 7765 */ - "PHPStan\\Analyser\\ConditionalExpressionHolder\0" /* 7803 */ - "isAboutCall\0" /* 7848 */ - "ourConditionalExpressions\0" /* 7860 */ - "theirConditionalExpressions\0" /* 7886 */ - "mergeSameGuardConditionalExpressions\0" /* 7914 */ - "newConditionalExpressions\0" /* 7951 */ - "existingConditionalExpressions\0" /* 7977 */ - "mergeConditionalExpressions\0" /* 8008 */ - "calledMethodScope\0" /* 8036 */ - "mergeInitializedProperties\0" /* 8054 */ - "finallyScope\0" /* 8081 */ - "originalFinallyScope\0" /* 8094 */ - "processFinallyScope\0" /* 8115 */ - "ourVariableTypeHolders\0" /* 8135 */ - "finallyVariableTypeHolders\0" /* 8158 */ - "originalVariableTypeHolders\0" /* 8185 */ - "processFinallyScopeVariableTypeHolders\0" /* 8213 */ - "closureScope\0" /* 8252 */ - "prevScope\0" /* 8265 */ - "byRefUses\0" /* 8275 */ - "processClosureScope\0" /* 8285 */ - "finalScope\0" /* 8305 */ - "processAlwaysIterableForeachScopeWithoutPollute\0" /* 8316 */ - "writtenVariableNames\0" /* 8364 */ - "forgetLoopWrittenVariables\0" /* 8385 */ - "previousScope\0" /* 8412 */ - "forgetChangedLoopVariables\0" /* 8426 */ - "getChangedVariableNames\0" /* 8453 */ - "previousType\0" /* 8477 */ - "generalizeIteratedType\0" /* 8490 */ - "writableVariableNames\0" /* 8513 */ - "loopEntryScope\0" /* 8535 */ - "generalizeWith\0" /* 8550 */ - "generalizeWithVariableState\0" /* 8565 */ - "generalizedExpressionTypes\0" /* 8593 */ - "withoutWidenedConditionalExpressions\0" /* 8620 */ - "variableTypeHolders\0" /* 8657 */ - "otherVariableTypeHolders\0" /* 8677 */ - "entryVariableTypeHolders\0" /* 8702 */ - "generalizeVariableTypeHolders\0" /* 8727 */ - "flattenUnionForGeneralization\0" /* 8757 */ - "a\0" /* 8787 */ - "b\0" /* 8789 */ - "depth\0" /* 8791 */ - "entryType\0" /* 8797 */ - "generalizeType\0" /* 8807 */ - "entryMin\0" /* 8822 */ - "entryMax\0" /* 8831 */ - "generalizeConstantFloats\0" /* 8840 */ - "allA\0" /* 8865 */ - "allB\0" /* 8870 */ - "generalizeShapesKeyByKey\0" /* 8875 */ - "pairShapes\0" /* 8900 */ - "shape\0" /* 8911 */ - "PHPStan\\Type\\Constant\\ConstantArrayType\0" /* 8917 */ - "getRequiredKeysSignature\0" /* 8957 */ - "getArrayDepth\0" /* 8982 */ - "equals\0" /* 8996 */ - "otherConditionalExpressions\0" /* 9003 */ - "compareConditionalExpressions\0" /* 9031 */ - "compareVariableTypeHolders\0" /* 9061 */ - "propertyReflection\0" /* 9088 */ - "PHPStan\\Reflection\\PropertyReflection\0" /* 9107 */ - "canAccessProperty\0" /* 9145 */ - "PHPStan\\Reflection\\ExtendedPropertyReflection\0" /* 9163 */ - "canReadProperty\0" /* 9209 */ - "canWriteProperty\0" /* 9225 */ - "methodReflection\0" /* 9242 */ - "PHPStan\\Reflection\\MethodReflection\0" /* 9259 */ - "canCallMethod\0" /* 9295 */ - "constantReflection\0" /* 9309 */ - "PHPStan\\Reflection\\ClassConstantReflection\0" /* 9328 */ - "canAccessConstant\0" /* 9371 */ - "classMemberReflection\0" /* 9389 */ - "PHPStan\\Reflection\\ClassMemberReflection\0" /* 9411 */ - "canAccessClassMember\0" /* 9452 */ - "debug\0" /* 9473 */ - "typeWithMethod\0" /* 9479 */ - "methodName\0" /* 9494 */ - "filterTypeWithMethod\0" /* 9505 */ - "PHPStan\\Reflection\\ExtendedMethodReflection\0" /* 9526 */ - "getMethodReflection\0" /* 9570 */ - "getNakedMethod\0" /* 9590 */ - "typeWithProperty\0" /* 9605 */ - "getPropertyReflection\0" /* 9622 */ - "getInstancePropertyReflection\0" /* 9644 */ - "getStaticPropertyReflection\0" /* 9674 */ - "typeWithConstant\0" /* 9702 */ - "constantName\0" /* 9719 */ - "getConstantReflection\0" /* 9732 */ - "constantType\0" /* 9754 */ - "getConstantExplicitTypeFromConfig\0" /* 9767 */ - "getConstantTypes\0" /* 9801 */ - "getGlobalConstantType\0" /* 9818 */ - "nameString\0" /* 9840 */ - "createGlobalConstantFetches\0" /* 9851 */ - "getNativeConstantTypes\0" /* 9879 */ - "getIterableKeyType\0" /* 9902 */ - "getIterableValueType\0" /* 9921 */ - "PHPStan\\Php\\PhpVersions\0" /* 9942 */ - "getPhpVersion\0" /* 9966 */ - "resolvePhpVersion\0" /* 9980 */ - "getConfiguredPhpVersionRange\0" /* 9998 */ - "isOverallPhpVersionRange\0" /* 10027 */ - "PhpParser\\Node\0" /* 10052 */ - "invokeNodeCallback\0" /* 10067 */ - "collectorType\0" /* 10086 */ - "data\0" /* 10100 */ - "emitCollectedData\0" /* 10105 */ - "extensionClass\0" /* 10123 */ - "trackValueDependency\0" /* 10138 */ - "file\0" /* 10159 */ - "trackFileDependency\0" /* 10164 */ - "directory\0" /* 10184 */ - "pattern\0" /* 10194 */ - "'*'\0" /* 10202 */ - "trackDirectoryDependency\0" /* 10206 */ - "trackClassDependency"; /* 10231 */ + "PhpParser\\Node\\Expr\\Closure|PhpParser\\Node\\Expr\\ArrowFunction\0" /* 4735 */ + "isInvokedWhereCreated\0" /* 4797 */ + "containsMutablePropertyFetch\0" /* 4819 */ + "invalidateMutablePropertyFetches\0" /* 4848 */ + "invalidateMutablePropertyFetchConditionalExpressions\0" /* 4881 */ + "typeHolder\0" /* 4934 */ + "PHPStan\\Analyser\\ExpressionTypeHolder\0" /* 4945 */ + "expressionTypeIsUnchangeable\0" /* 4983 */ + "invalidateStaticExpressions\0" /* 5012 */ + "arrowFunction\0" /* 5040 */ + "PhpParser\\Node\\Expr\\ArrowFunction\0" /* 5054 */ + "enterArrowFunction\0" /* 5088 */ + "enterArrowFunctionWithoutReflection\0" /* 5107 */ + "PhpParser\\Node\\Param\0" /* 5143 */ + "isParameterValueNullable\0" /* 5164 */ + "isNullable\0" /* 5189 */ + "isVariadic\0" /* 5200 */ + "getFunctionType\0" /* 5211 */ + "index\0" /* 5227 */ + "getCallableParameterType\0" /* 5233 */ + "startIndex\0" /* 5258 */ + "buildVariadicArrayTypeFromCallableParameters\0" /* 5269 */ + "nativeType\0" /* 5314 */ + "inferredType\0" /* 5325 */ + "intersectButNotNever\0" /* 5338 */ + "PhpParser\\Node\\Expr\\Match_\0" /* 5359 */ + "condType\0" /* 5386 */ + "condNativeType\0" /* 5395 */ + "enterMatch\0" /* 5410 */ + "iteratee\0" /* 5421 */ + "iterateeType\0" /* 5430 */ + "nativeIterateeType\0" /* 5443 */ + "valueName\0" /* 5462 */ + "keyName\0" /* 5472 */ + "valueByRef\0" /* 5480 */ + "enterForeach\0" /* 5491 */ + "enterForeachKey\0" /* 5504 */ + "catchType\0" /* 5520 */ + "enterCatchType\0" /* 5530 */ + "isPlainWrite\0" /* 5545 */ + "enterExpressionAssign\0" /* 5558 */ + "exitExpressionAssign\0" /* 5580 */ + "isInExpressionAssign\0" /* 5601 */ + "isInWriteExpressionAssign\0" /* 5622 */ + "setAllowedUndefinedExpression\0" /* 5648 */ + "unsetAllowedUndefinedExpression\0" /* 5678 */ + "isUndefinedExpressionAllowed\0" /* 5710 */ + "certainty\0" /* 5739 */ + "intertwinedPropagatedFrom\0" /* 5749 */ + "assignVariable\0" /* 5775 */ + "overwriteExpression\0" /* 5790 */ + "scope\0" /* 5810 */ + "rootType\0" /* 5816 */ + "assignedExpr\0" /* 5825 */ + "rootVariableName\0" /* 5838 */ + "native\0" /* 5855 */ + "resolveIntertwinedAssignedType\0" /* 5862 */ + "dimFetch\0" /* 5893 */ + "PhpParser\\Node\\Expr\\ArrayDimFetch\0" /* 5902 */ + "isDimFetchPathReachable\0" /* 5936 */ + "unsetExpression\0" /* 5960 */ + "getStateType\0" /* 5976 */ + "getScopeStateType\0" /* 5989 */ + "getScopeStateNativeType\0" /* 6007 */ + "resolveScopeStateType\0" /* 6031 */ + "specifyExpressionType\0" /* 6053 */ + "openSpecificationScope\0" /* 6075 */ + "isSpecifyExpressionTypeNoop\0" /* 6098 */ + "narrowedFrom\0" /* 6126 */ + "nativeNarrowedFrom\0" /* 6139 */ + "specifyExpressionTypeInPlace\0" /* 6158 */ + "assignExpression\0" /* 6187 */ + "specifyAssignedExpressionType\0" /* 6204 */ + "fetchedOnType\0" /* 6234 */ + "assignInitializedProperty\0" /* 6248 */ + "expressionToInvalidate\0" /* 6274 */ + "requireMoreCharacters\0" /* 6297 */ + "invalidatingClass\0" /* 6319 */ + "keepPropertyFetches\0" /* 6337 */ + "preservedPropertyNames\0" /* 6357 */ + "invalidateExpression\0" /* 6380 */ + "assignObjectAlias\0" /* 6401 */ + "assignNarrowedFrom\0" /* 6419 */ + "otherExpr\0" /* 6438 */ + "holdsSameObject\0" /* 6448 */ + "aliasedExpr\0" /* 6464 */ + "specifyObjectAlias\0" /* 6476 */ + "getObjectAliasRootVariableName\0" /* 6495 */ + "getObjectAliasEdges\0" /* 6526 */ + "includeSelf\0" /* 6546 */ + "getPropertyFetchChainPrefixes\0" /* 6558 */ + "edges\0" /* 6588 */ + "findObjectAliasClass\0" /* 6594 */ + "findObjectAliasInvalidationTargets\0" /* 6615 */ + "targets\0" /* 6650 */ + "reconnectObjectAliases\0" /* 6658 */ + "invalidateExpressionWithoutAliases\0" /* 6681 */ + "isPrivatePropertyOfDifferentClass\0" /* 6716 */ + "invalidateMethodsOnExpression\0" /* 6750 */ + "setExpressionCertaintyKeepingType\0" /* 6780 */ + "varType\0" /* 6814 */ + "dimType\0" /* 6822 */ + "offsetValueType\0" /* 6830 */ + "removeArraysWithoutOffsetValueType\0" /* 6846 */ + "isComplexUnionType\0" /* 6881 */ + "addTypeToExpression\0" /* 6900 */ + "typeToRemove\0" /* 6920 */ + "removeTypeFromExpression\0" /* 6933 */ + "filterByTruthyValue\0" /* 6958 */ + "filterByFalseyValue\0" /* 6978 */ + "specifiedTypes\0" /* 6998 */ + "applySpecifiedTypes\0" /* 7013 */ + "changedExpressions\0" /* 7033 */ + "respecifyRelationalFacts\0" /* 7052 */ + "applySpecifiedTypesBatch\0" /* 7077 */ + "specifiedExpressions\0" /* 7102 */ + "processConditionalExpressionsAfterSpecifying\0" /* 7123 */ + "getConditionalExpressions\0" /* 7168 */ + "conditionalExpressionHolders\0" /* 7194 */ + "addConditionalExpressions\0" /* 7223 */ + "exitFirstLevelStatements\0" /* 7249 */ + "isInFirstLevelStatement\0" /* 7274 */ + "otherScope\0" /* 7298 */ + "preserveVacuousConditionals\0" /* 7309 */ + "joinsIterations\0" /* 7337 */ + "mergeWith\0" /* 7353 */ + "differingKeys\0" /* 7363 */ + "ourTypes\0" /* 7377 */ + "theirTypes\0" /* 7386 */ + "ourNativeTypes\0" /* 7397 */ + "theirNativeTypes\0" /* 7412 */ + "completeOffsetWriteBases\0" /* 7429 */ + "holder\0" /* 7454 */ + "types\0" /* 7461 */ + "nativeTypes\0" /* 7467 */ + "completeOffsetWriteBase\0" /* 7479 */ + "ours\0" /* 7503 */ + "theirs\0" /* 7508 */ + "collectAbsorbedClosures\0" /* 7515 */ + "mergeWithVariableState\0" /* 7539 */ + "differingExpressionKeys\0" /* 7562 */ + "mergedExpressionTypes\0" /* 7586 */ + "findMergedCallCandidates\0" /* 7608 */ + "call\0" /* 7633 */ + "PhpParser\\Node\\Expr\\FuncCall|PhpParser\\Node\\Expr\\MethodCall|PhpParser\\Node\\Expr\\StaticCall\0" /* 7638 */ + "hasNarrowableArgument\0" /* 7729 */ + "candidates\0" /* 7751 */ + "mergedNativeTypes\0" /* 7762 */ + "findUninformativeMergedCalls\0" /* 7780 */ + "ourExpressionTypes\0" /* 7809 */ + "theirExpressionTypes\0" /* 7828 */ + "withoutPreciseClassConstantFetches\0" /* 7849 */ + "currentConditionalExpressions\0" /* 7884 */ + "sourceConditionalExpressions\0" /* 7914 */ + "otherExpressionTypes\0" /* 7943 */ + "preserveVacuousConditionalExpressions\0" /* 7964 */ + "PHPStan\\Analyser\\ConditionalExpressionHolder\0" /* 8002 */ + "isAboutCall\0" /* 8047 */ + "ourConditionalExpressions\0" /* 8059 */ + "theirConditionalExpressions\0" /* 8085 */ + "mergeSameGuardConditionalExpressions\0" /* 8113 */ + "newConditionalExpressions\0" /* 8150 */ + "existingConditionalExpressions\0" /* 8176 */ + "mergeConditionalExpressions\0" /* 8207 */ + "calledMethodScope\0" /* 8235 */ + "mergeInitializedProperties\0" /* 8253 */ + "finallyScope\0" /* 8280 */ + "originalFinallyScope\0" /* 8293 */ + "processFinallyScope\0" /* 8314 */ + "ourVariableTypeHolders\0" /* 8334 */ + "finallyVariableTypeHolders\0" /* 8357 */ + "originalVariableTypeHolders\0" /* 8384 */ + "processFinallyScopeVariableTypeHolders\0" /* 8412 */ + "closureScope\0" /* 8451 */ + "prevScope\0" /* 8464 */ + "byRefUses\0" /* 8474 */ + "processClosureScope\0" /* 8484 */ + "finalScope\0" /* 8504 */ + "processAlwaysIterableForeachScopeWithoutPollute\0" /* 8515 */ + "writtenVariableNames\0" /* 8563 */ + "forgetLoopWrittenVariables\0" /* 8584 */ + "previousScope\0" /* 8611 */ + "forgetChangedLoopVariables\0" /* 8625 */ + "getChangedVariableNames\0" /* 8652 */ + "previousType\0" /* 8676 */ + "generalizeIteratedType\0" /* 8689 */ + "writableVariableNames\0" /* 8712 */ + "loopEntryScope\0" /* 8734 */ + "generalizeWith\0" /* 8749 */ + "generalizeWithVariableState\0" /* 8764 */ + "generalizedExpressionTypes\0" /* 8792 */ + "withoutWidenedConditionalExpressions\0" /* 8819 */ + "variableTypeHolders\0" /* 8856 */ + "otherVariableTypeHolders\0" /* 8876 */ + "entryVariableTypeHolders\0" /* 8901 */ + "generalizeVariableTypeHolders\0" /* 8926 */ + "flattenUnionForGeneralization\0" /* 8956 */ + "a\0" /* 8986 */ + "b\0" /* 8988 */ + "depth\0" /* 8990 */ + "entryType\0" /* 8996 */ + "generalizeType\0" /* 9006 */ + "entryMin\0" /* 9021 */ + "entryMax\0" /* 9030 */ + "generalizeConstantFloats\0" /* 9039 */ + "allA\0" /* 9064 */ + "allB\0" /* 9069 */ + "generalizeShapesKeyByKey\0" /* 9074 */ + "pairShapes\0" /* 9099 */ + "shape\0" /* 9110 */ + "PHPStan\\Type\\Constant\\ConstantArrayType\0" /* 9116 */ + "getRequiredKeysSignature\0" /* 9156 */ + "getArrayDepth\0" /* 9181 */ + "equals\0" /* 9195 */ + "otherConditionalExpressions\0" /* 9202 */ + "compareConditionalExpressions\0" /* 9230 */ + "compareVariableTypeHolders\0" /* 9260 */ + "propertyReflection\0" /* 9287 */ + "PHPStan\\Reflection\\PropertyReflection\0" /* 9306 */ + "canAccessProperty\0" /* 9344 */ + "PHPStan\\Reflection\\ExtendedPropertyReflection\0" /* 9362 */ + "canReadProperty\0" /* 9408 */ + "canWriteProperty\0" /* 9424 */ + "methodReflection\0" /* 9441 */ + "PHPStan\\Reflection\\MethodReflection\0" /* 9458 */ + "canCallMethod\0" /* 9494 */ + "constantReflection\0" /* 9508 */ + "PHPStan\\Reflection\\ClassConstantReflection\0" /* 9527 */ + "canAccessConstant\0" /* 9570 */ + "classMemberReflection\0" /* 9588 */ + "PHPStan\\Reflection\\ClassMemberReflection\0" /* 9610 */ + "canAccessClassMember\0" /* 9651 */ + "debug\0" /* 9672 */ + "typeWithMethod\0" /* 9678 */ + "methodName\0" /* 9693 */ + "filterTypeWithMethod\0" /* 9704 */ + "PHPStan\\Reflection\\ExtendedMethodReflection\0" /* 9725 */ + "getMethodReflection\0" /* 9769 */ + "getNakedMethod\0" /* 9789 */ + "typeWithProperty\0" /* 9804 */ + "getPropertyReflection\0" /* 9821 */ + "getInstancePropertyReflection\0" /* 9843 */ + "getStaticPropertyReflection\0" /* 9873 */ + "typeWithConstant\0" /* 9901 */ + "constantName\0" /* 9918 */ + "getConstantReflection\0" /* 9931 */ + "constantType\0" /* 9953 */ + "getConstantExplicitTypeFromConfig\0" /* 9966 */ + "getConstantTypes\0" /* 10000 */ + "getGlobalConstantType\0" /* 10017 */ + "nameString\0" /* 10039 */ + "createGlobalConstantFetches\0" /* 10050 */ + "getNativeConstantTypes\0" /* 10078 */ + "getIterableKeyType\0" /* 10101 */ + "getIterableValueType\0" /* 10120 */ + "PHPStan\\Php\\PhpVersions\0" /* 10141 */ + "getPhpVersion\0" /* 10165 */ + "resolvePhpVersion\0" /* 10179 */ + "getConfiguredPhpVersionRange\0" /* 10197 */ + "isOverallPhpVersionRange\0" /* 10226 */ + "PhpParser\\Node\0" /* 10251 */ + "invokeNodeCallback\0" /* 10266 */ + "collectorType\0" /* 10285 */ + "data\0" /* 10299 */ + "emitCollectedData\0" /* 10304 */ + "extensionClass\0" /* 10322 */ + "trackValueDependency\0" /* 10337 */ + "file\0" /* 10358 */ + "trackFileDependency\0" /* 10363 */ + "directory\0" /* 10383 */ + "pattern\0" /* 10393 */ + "'*'\0" /* 10401 */ + "trackDirectoryDependency\0" /* 10405 */ + "trackClassDependency"; /* 10430 */ inline constexpr reg::PackedArg args[] = { reg::packed(0, 0, 9), /* __construct $services */ reg::packed(40, 0, 53), /* __construct $scopeFactory */ @@ -823,57 +828,65 @@ inline constexpr reg::PackedArg args[] = { reg::packed(4628, MAY_BE_NULL | MAY_BE_ARRAY), /* enterAnonymousFunctionWithoutReflection $callableParameters */ reg::packed(4647, MAY_BE_NULL | MAY_BE_ARRAY), /* enterAnonymousFunctionWithoutReflection $nativeCallableParameters */ reg::packed(738, 0, 523), /* enterAnonymousFunctionWithoutReflection return */ - reg::packed(4735, 0, 4746), /* expressionTypeIsUnchangeable $typeHolder */ + reg::packed(154, 0, 4735), /* isInvokedWhereCreated $function */ + reg::packed(738, MAY_BE_BOOL), /* isInvokedWhereCreated return */ + reg::packed(966, 0, 1742), /* containsMutablePropertyFetch $expr */ + reg::packed(738, MAY_BE_BOOL), /* containsMutablePropertyFetch return */ + reg::packed(237, MAY_BE_ARRAY), /* invalidateMutablePropertyFetches $expressionTypes */ + reg::packed(738, MAY_BE_ARRAY), /* invalidateMutablePropertyFetches return */ + reg::packed(278, MAY_BE_ARRAY), /* invalidateMutablePropertyFetchConditionalExpressions $conditionalExpressions */ + reg::packed(738, MAY_BE_ARRAY), /* invalidateMutablePropertyFetchConditionalExpressions return */ + reg::packed(4934, 0, 4945), /* expressionTypeIsUnchangeable $typeHolder */ reg::packed(738, MAY_BE_BOOL), /* expressionTypeIsUnchangeable return */ reg::packed(237, MAY_BE_ARRAY), /* invalidateStaticExpressions $expressionTypes */ reg::packed(738, MAY_BE_ARRAY), /* invalidateStaticExpressions return */ - reg::packed(4841, 0, 4855), /* enterArrowFunction $arrowFunction */ + reg::packed(5040, 0, 5054), /* enterArrowFunction $arrowFunction */ reg::packed(4628, MAY_BE_NULL | MAY_BE_ARRAY), /* enterArrowFunction $callableParameters */ reg::packed(4647, MAY_BE_NULL | MAY_BE_ARRAY, reg::NoString, false, false, 222), /* enterArrowFunction $nativeCallableParameters */ reg::packed(738, 0, 523), /* enterArrowFunction return */ - reg::packed(4841, 0, 4855), /* enterArrowFunctionWithoutReflection $arrowFunction */ + reg::packed(5040, 0, 5054), /* enterArrowFunctionWithoutReflection $arrowFunction */ reg::packed(4628, MAY_BE_NULL | MAY_BE_ARRAY), /* enterArrowFunctionWithoutReflection $callableParameters */ reg::packed(4647, MAY_BE_NULL | MAY_BE_ARRAY), /* enterArrowFunctionWithoutReflection $nativeCallableParameters */ reg::packed(738, 0, 523), /* enterArrowFunctionWithoutReflection return */ - reg::packed(2961, 0, 4944), /* isParameterValueNullable $parameter */ + reg::packed(2961, 0, 5143), /* isParameterValueNullable $parameter */ reg::packed(738, MAY_BE_BOOL), /* isParameterValueNullable return */ reg::packed(3958, 0), /* getFunctionType $type */ - reg::packed(4990, MAY_BE_BOOL), /* getFunctionType $isNullable */ - reg::packed(5001, MAY_BE_BOOL), /* getFunctionType $isVariadic */ + reg::packed(5189, MAY_BE_BOOL), /* getFunctionType $isNullable */ + reg::packed(5200, MAY_BE_BOOL), /* getFunctionType $isVariadic */ reg::packed(738, 0, 1454), /* getFunctionType return */ - reg::packed(2961, 0, 4944), /* getCallableParameterType $parameter */ + reg::packed(2961, 0, 5143), /* getCallableParameterType $parameter */ reg::packed(4628, MAY_BE_ARRAY), /* getCallableParameterType $callableParameters */ - reg::packed(5028, MAY_BE_LONG), /* getCallableParameterType $index */ + reg::packed(5227, MAY_BE_LONG), /* getCallableParameterType $index */ reg::packed(738, 0, 1454), /* getCallableParameterType return */ reg::packed(4628, MAY_BE_ARRAY), /* buildVariadicArrayTypeFromCallableParameters $callableParameters */ - reg::packed(5059, MAY_BE_LONG), /* buildVariadicArrayTypeFromCallableParameters $startIndex */ + reg::packed(5258, MAY_BE_LONG), /* buildVariadicArrayTypeFromCallableParameters $startIndex */ reg::packed(738, 0, 1454), /* buildVariadicArrayTypeFromCallableParameters return */ - reg::packed(5115, 0, 1454), /* intersectButNotNever $nativeType */ - reg::packed(5126, 0, 1454), /* intersectButNotNever $inferredType */ + reg::packed(5314, 0, 1454), /* intersectButNotNever $nativeType */ + reg::packed(5325, 0, 1454), /* intersectButNotNever $inferredType */ reg::packed(738, 0, 1454), /* intersectButNotNever return */ - reg::packed(966, 0, 5160), /* enterMatch $expr */ - reg::packed(5187, 0, 1454), /* enterMatch $condType */ - reg::packed(5196, 0, 1454), /* enterMatch $condNativeType */ + reg::packed(966, 0, 5359), /* enterMatch $expr */ + reg::packed(5386, 0, 1454), /* enterMatch $condType */ + reg::packed(5395, 0, 1454), /* enterMatch $condNativeType */ reg::packed(738, 0, 523), /* enterMatch return */ reg::packed(4451, 0, 523), /* enterForeach $originalScope */ - reg::packed(5222, 0, 1742), /* enterForeach $iteratee */ - reg::packed(5231, 0, 1454), /* enterForeach $iterateeType */ - reg::packed(5244, 0, 1454), /* enterForeach $nativeIterateeType */ - reg::packed(5263, MAY_BE_STRING), /* enterForeach $valueName */ - reg::packed(5273, MAY_BE_NULL | MAY_BE_STRING), /* enterForeach $keyName */ - reg::packed(5281, MAY_BE_BOOL), /* enterForeach $valueByRef */ + reg::packed(5421, 0, 1742), /* enterForeach $iteratee */ + reg::packed(5430, 0, 1454), /* enterForeach $iterateeType */ + reg::packed(5443, 0, 1454), /* enterForeach $nativeIterateeType */ + reg::packed(5462, MAY_BE_STRING), /* enterForeach $valueName */ + reg::packed(5472, MAY_BE_NULL | MAY_BE_STRING), /* enterForeach $keyName */ + reg::packed(5480, MAY_BE_BOOL), /* enterForeach $valueByRef */ reg::packed(738, 0, 523), /* enterForeach return */ reg::packed(4451, 0, 523), /* enterForeachKey $originalScope */ - reg::packed(5222, 0, 1742), /* enterForeachKey $iteratee */ - reg::packed(5231, 0, 1454), /* enterForeachKey $iterateeType */ - reg::packed(5244, 0, 1454), /* enterForeachKey $nativeIterateeType */ - reg::packed(5273, MAY_BE_STRING), /* enterForeachKey $keyName */ + reg::packed(5421, 0, 1742), /* enterForeachKey $iteratee */ + reg::packed(5430, 0, 1454), /* enterForeachKey $iterateeType */ + reg::packed(5443, 0, 1454), /* enterForeachKey $nativeIterateeType */ + reg::packed(5472, MAY_BE_STRING), /* enterForeachKey $keyName */ reg::packed(738, 0, 523), /* enterForeachKey return */ - reg::packed(5321, 0, 1454), /* enterCatchType $catchType */ + reg::packed(5520, 0, 1454), /* enterCatchType $catchType */ reg::packed(1404, MAY_BE_NULL | MAY_BE_STRING), /* enterCatchType $variableName */ reg::packed(738, 0, 523), /* enterCatchType return */ reg::packed(966, 0, 1742), /* enterExpressionAssign $expr */ - reg::packed(5346, MAY_BE_BOOL, reg::NoString, false, false, 402), /* enterExpressionAssign $isPlainWrite */ + reg::packed(5545, MAY_BE_BOOL, reg::NoString, false, false, 402), /* enterExpressionAssign $isPlainWrite */ reg::packed(738, 0, 523), /* enterExpressionAssign return */ reg::packed(966, 0, 1742), /* exitExpressionAssign $expr */ reg::packed(738, 0, 523), /* exitExpressionAssign return */ @@ -889,22 +902,22 @@ inline constexpr reg::PackedArg args[] = { reg::packed(738, MAY_BE_BOOL), /* isUndefinedExpressionAllowed return */ reg::packed(1404, MAY_BE_STRING), /* assignVariable $variableName */ reg::packed(3958, 0, 1454), /* assignVariable $type */ - reg::packed(5115, 0, 1454), /* assignVariable $nativeType */ - reg::packed(5540, 0, 1417), /* assignVariable $certainty */ - reg::packed(5550, MAY_BE_ARRAY, reg::NoString, false, false, 253), /* assignVariable $intertwinedPropagatedFrom */ + reg::packed(5314, 0, 1454), /* assignVariable $nativeType */ + reg::packed(5739, 0, 1417), /* assignVariable $certainty */ + reg::packed(5749, MAY_BE_ARRAY, reg::NoString, false, false, 253), /* assignVariable $intertwinedPropagatedFrom */ reg::packed(738, 0, 523), /* assignVariable return */ reg::packed(966, 0, 1742), /* overwriteExpression $expr */ reg::packed(3958, 0, 1454), /* overwriteExpression $type */ - reg::packed(5115, 0, 1454), /* overwriteExpression $nativeType */ + reg::packed(5314, 0, 1454), /* overwriteExpression $nativeType */ reg::packed(738, 0, 523), /* overwriteExpression return */ - reg::packed(5611, 0, 523), /* resolveIntertwinedAssignedType $scope */ - reg::packed(5617, 0, 1454), /* resolveIntertwinedAssignedType $rootType */ - reg::packed(5626, 0, 1742), /* resolveIntertwinedAssignedType $assignedExpr */ - reg::packed(5639, MAY_BE_STRING), /* resolveIntertwinedAssignedType $rootVariableName */ - reg::packed(5656, MAY_BE_BOOL), /* resolveIntertwinedAssignedType $native */ + reg::packed(5810, 0, 523), /* resolveIntertwinedAssignedType $scope */ + reg::packed(5816, 0, 1454), /* resolveIntertwinedAssignedType $rootType */ + reg::packed(5825, 0, 1742), /* resolveIntertwinedAssignedType $assignedExpr */ + reg::packed(5838, MAY_BE_STRING), /* resolveIntertwinedAssignedType $rootVariableName */ + reg::packed(5855, MAY_BE_BOOL), /* resolveIntertwinedAssignedType $native */ reg::packed(738, 0, 1454), /* resolveIntertwinedAssignedType return */ - reg::packed(5611, 0, 523), /* isDimFetchPathReachable $scope */ - reg::packed(5694, 0, 5703), /* isDimFetchPathReachable $dimFetch */ + reg::packed(5810, 0, 523), /* isDimFetchPathReachable $scope */ + reg::packed(5893, 0, 5902), /* isDimFetchPathReachable $dimFetch */ reg::packed(738, MAY_BE_BOOL), /* isDimFetchPathReachable return */ reg::packed(966, 0, 1742), /* unsetExpression $expr */ reg::packed(738, 0, 523), /* unsetExpression return */ @@ -915,12 +928,12 @@ inline constexpr reg::PackedArg args[] = { reg::packed(966, 0, 1742), /* getScopeStateNativeType $expr */ reg::packed(738, 0, 1454), /* getScopeStateNativeType return */ reg::packed(966, 0, 1742), /* resolveScopeStateType $expr */ - reg::packed(5656, MAY_BE_BOOL), /* resolveScopeStateType $native */ + reg::packed(5855, MAY_BE_BOOL), /* resolveScopeStateType $native */ reg::packed(738, 0, 1454), /* resolveScopeStateType return */ reg::packed(966, 0, 1742), /* specifyExpressionType $expr */ reg::packed(3958, 0, 1454), /* specifyExpressionType $type */ - reg::packed(5115, 0, 1454), /* specifyExpressionType $nativeType */ - reg::packed(5540, 0, 1417), /* specifyExpressionType $certainty */ + reg::packed(5314, 0, 1454), /* specifyExpressionType $nativeType */ + reg::packed(5739, 0, 1417), /* specifyExpressionType $certainty */ reg::packed(738, 0, 523), /* specifyExpressionType return */ reg::packed(738, 0, 523), /* openSpecificationScope return */ reg::packed(966, 0, 1742), /* isSpecifyExpressionTypeNoop $expr */ @@ -928,75 +941,75 @@ inline constexpr reg::PackedArg args[] = { reg::packed(738, MAY_BE_BOOL), /* isSpecifyExpressionTypeNoop return */ reg::packed(966, 0, 1742), /* specifyExpressionTypeInPlace $expr */ reg::packed(3958, 0, 1454), /* specifyExpressionTypeInPlace $type */ - reg::packed(5115, 0, 1454), /* specifyExpressionTypeInPlace $nativeType */ - reg::packed(5540, 0, 1417), /* specifyExpressionTypeInPlace $certainty */ - reg::packed(5927, MAY_BE_NULL, 1454, false, false, 222), /* specifyExpressionTypeInPlace $narrowedFrom */ - reg::packed(5940, MAY_BE_NULL, 1454, false, false, 222), /* specifyExpressionTypeInPlace $nativeNarrowedFrom */ + reg::packed(5314, 0, 1454), /* specifyExpressionTypeInPlace $nativeType */ + reg::packed(5739, 0, 1417), /* specifyExpressionTypeInPlace $certainty */ + reg::packed(6126, MAY_BE_NULL, 1454, false, false, 222), /* specifyExpressionTypeInPlace $narrowedFrom */ + reg::packed(6139, MAY_BE_NULL, 1454, false, false, 222), /* specifyExpressionTypeInPlace $nativeNarrowedFrom */ reg::packed(738, MAY_BE_VOID), /* specifyExpressionTypeInPlace return */ reg::packed(966, 0, 1742), /* assignExpression $expr */ reg::packed(3958, 0, 1454), /* assignExpression $type */ - reg::packed(5115, 0, 1454), /* assignExpression $nativeType */ + reg::packed(5314, 0, 1454), /* assignExpression $nativeType */ reg::packed(738, 0, 523), /* assignExpression return */ reg::packed(966, 0, 1742), /* specifyAssignedExpressionType $expr */ reg::packed(3958, 0, 1454), /* specifyAssignedExpressionType $type */ - reg::packed(5115, 0, 1454), /* specifyAssignedExpressionType $nativeType */ + reg::packed(5314, 0, 1454), /* specifyAssignedExpressionType $nativeType */ reg::packed(738, 0, 523), /* specifyAssignedExpressionType return */ - reg::packed(6035, 0, 1454), /* assignInitializedProperty $fetchedOnType */ + reg::packed(6234, 0, 1454), /* assignInitializedProperty $fetchedOnType */ reg::packed(3812, MAY_BE_STRING), /* assignInitializedProperty $propertyName */ reg::packed(738, 0, 523), /* assignInitializedProperty return */ - reg::packed(6075, 0, 1742), /* invalidateExpression $expressionToInvalidate */ - reg::packed(6098, MAY_BE_BOOL, reg::NoString, false, false, 148), /* invalidateExpression $requireMoreCharacters */ - reg::packed(6120, MAY_BE_NULL, 1065, false, false, 222), /* invalidateExpression $invalidatingClass */ - reg::packed(6138, MAY_BE_BOOL, reg::NoString, false, false, 148), /* invalidateExpression $keepPropertyFetches */ - reg::packed(6158, MAY_BE_NULL | MAY_BE_ARRAY, reg::NoString, false, false, 222), /* invalidateExpression $preservedPropertyNames */ + reg::packed(6274, 0, 1742), /* invalidateExpression $expressionToInvalidate */ + reg::packed(6297, MAY_BE_BOOL, reg::NoString, false, false, 148), /* invalidateExpression $requireMoreCharacters */ + reg::packed(6319, MAY_BE_NULL, 1065, false, false, 222), /* invalidateExpression $invalidatingClass */ + reg::packed(6337, MAY_BE_BOOL, reg::NoString, false, false, 148), /* invalidateExpression $keepPropertyFetches */ + reg::packed(6357, MAY_BE_NULL | MAY_BE_ARRAY, reg::NoString, false, false, 222), /* invalidateExpression $preservedPropertyNames */ reg::packed(738, 0, 523), /* invalidateExpression return */ reg::packed(1404, MAY_BE_STRING), /* assignObjectAlias $variableName */ - reg::packed(5626, 0, 1742), /* assignObjectAlias $assignedExpr */ - reg::packed(5540, MAY_BE_NULL, 1417, false, false, 222), /* assignObjectAlias $certainty */ + reg::packed(5825, 0, 1742), /* assignObjectAlias $assignedExpr */ + reg::packed(5739, MAY_BE_NULL, 1417, false, false, 222), /* assignObjectAlias $certainty */ reg::packed(738, 0, 523), /* assignObjectAlias return */ reg::packed(1404, MAY_BE_STRING), /* assignNarrowedFrom $variableName */ - reg::packed(5626, 0, 1742), /* assignNarrowedFrom $assignedExpr */ + reg::packed(5825, 0, 1742), /* assignNarrowedFrom $assignedExpr */ reg::packed(738, 0, 523), /* assignNarrowedFrom return */ reg::packed(966, 0, 1742), /* holdsSameObject $expr */ - reg::packed(6239, 0, 1742), /* holdsSameObject $otherExpr */ + reg::packed(6438, 0, 1742), /* holdsSameObject $otherExpr */ reg::packed(738, MAY_BE_BOOL), /* holdsSameObject return */ reg::packed(966, 0, 1742), /* specifyObjectAlias $expr */ - reg::packed(6265, 0, 1742), /* specifyObjectAlias $aliasedExpr */ - reg::packed(5540, 0, 1417), /* specifyObjectAlias $certainty */ + reg::packed(6464, 0, 1742), /* specifyObjectAlias $aliasedExpr */ + reg::packed(5739, 0, 1417), /* specifyObjectAlias $certainty */ reg::packed(738, 0, 523), /* specifyObjectAlias return */ reg::packed(966, 0, 1742), /* getObjectAliasRootVariableName $expr */ reg::packed(738, MAY_BE_NULL | MAY_BE_STRING), /* getObjectAliasRootVariableName return */ reg::packed(738, MAY_BE_ARRAY), /* getObjectAliasEdges return */ reg::packed(966, 0, 1742), /* getPropertyFetchChainPrefixes $expr */ - reg::packed(6347, MAY_BE_BOOL), /* getPropertyFetchChainPrefixes $includeSelf */ + reg::packed(6546, MAY_BE_BOOL), /* getPropertyFetchChainPrefixes $includeSelf */ reg::packed(738, MAY_BE_ARRAY), /* getPropertyFetchChainPrefixes return */ reg::packed(966, 0, 1742), /* findObjectAliasClass $expr */ - reg::packed(6389, MAY_BE_ARRAY), /* findObjectAliasClass $edges */ + reg::packed(6588, MAY_BE_ARRAY), /* findObjectAliasClass $edges */ reg::packed(738, MAY_BE_ARRAY), /* findObjectAliasClass return */ reg::packed(966, 0, 1742), /* findObjectAliasInvalidationTargets $expr */ - reg::packed(6098, MAY_BE_BOOL), /* findObjectAliasInvalidationTargets $requireMoreCharacters */ - reg::packed(6389, MAY_BE_ARRAY), /* findObjectAliasInvalidationTargets $edges */ + reg::packed(6297, MAY_BE_BOOL), /* findObjectAliasInvalidationTargets $requireMoreCharacters */ + reg::packed(6588, MAY_BE_ARRAY), /* findObjectAliasInvalidationTargets $edges */ reg::packed(738, MAY_BE_ARRAY), /* findObjectAliasInvalidationTargets return */ - reg::packed(6389, MAY_BE_ARRAY), /* reconnectObjectAliases $edges */ - reg::packed(6451, MAY_BE_ARRAY), /* reconnectObjectAliases $targets */ + reg::packed(6588, MAY_BE_ARRAY), /* reconnectObjectAliases $edges */ + reg::packed(6650, MAY_BE_ARRAY), /* reconnectObjectAliases $targets */ reg::packed(738, 0, 523), /* reconnectObjectAliases return */ - reg::packed(6075, 0, 1742), /* invalidateExpressionWithoutAliases $expressionToInvalidate */ - reg::packed(6098, MAY_BE_BOOL), /* invalidateExpressionWithoutAliases $requireMoreCharacters */ - reg::packed(6120, MAY_BE_NULL, 1065), /* invalidateExpressionWithoutAliases $invalidatingClass */ - reg::packed(6138, MAY_BE_BOOL), /* invalidateExpressionWithoutAliases $keepPropertyFetches */ - reg::packed(6158, MAY_BE_NULL | MAY_BE_ARRAY), /* invalidateExpressionWithoutAliases $preservedPropertyNames */ + reg::packed(6274, 0, 1742), /* invalidateExpressionWithoutAliases $expressionToInvalidate */ + reg::packed(6297, MAY_BE_BOOL), /* invalidateExpressionWithoutAliases $requireMoreCharacters */ + reg::packed(6319, MAY_BE_NULL, 1065), /* invalidateExpressionWithoutAliases $invalidatingClass */ + reg::packed(6337, MAY_BE_BOOL), /* invalidateExpressionWithoutAliases $keepPropertyFetches */ + reg::packed(6357, MAY_BE_NULL | MAY_BE_ARRAY), /* invalidateExpressionWithoutAliases $preservedPropertyNames */ reg::packed(738, 0, 523), /* invalidateExpressionWithoutAliases return */ reg::packed(966, 0, 1742), /* isPrivatePropertyOfDifferentClass $expr */ - reg::packed(6120, 0, 1065), /* isPrivatePropertyOfDifferentClass $invalidatingClass */ + reg::packed(6319, 0, 1065), /* isPrivatePropertyOfDifferentClass $invalidatingClass */ reg::packed(738, MAY_BE_BOOL), /* isPrivatePropertyOfDifferentClass return */ - reg::packed(6075, 0, 1742), /* invalidateMethodsOnExpression $expressionToInvalidate */ + reg::packed(6274, 0, 1742), /* invalidateMethodsOnExpression $expressionToInvalidate */ reg::packed(738, 0, 523), /* invalidateMethodsOnExpression return */ reg::packed(966, 0, 1742), /* setExpressionCertaintyKeepingType $expr */ - reg::packed(5540, 0, 1417), /* setExpressionCertaintyKeepingType $certainty */ + reg::packed(5739, 0, 1417), /* setExpressionCertaintyKeepingType $certainty */ reg::packed(738, 0, 523), /* setExpressionCertaintyKeepingType return */ - reg::packed(6615, 0, 1454), /* removeArraysWithoutOffsetValueType $varType */ - reg::packed(6623, 0, 1454), /* removeArraysWithoutOffsetValueType $dimType */ - reg::packed(6631, 0, 1454), /* removeArraysWithoutOffsetValueType $offsetValueType */ + reg::packed(6814, 0, 1454), /* removeArraysWithoutOffsetValueType $varType */ + reg::packed(6822, 0, 1454), /* removeArraysWithoutOffsetValueType $dimType */ + reg::packed(6830, 0, 1454), /* removeArraysWithoutOffsetValueType $offsetValueType */ reg::packed(738, 0, 1454), /* removeArraysWithoutOffsetValueType return */ reg::packed(3958, 0, 1454), /* isComplexUnionType $type */ reg::packed(738, MAY_BE_BOOL), /* isComplexUnionType return */ @@ -1004,215 +1017,215 @@ inline constexpr reg::PackedArg args[] = { reg::packed(3958, 0, 1454), /* addTypeToExpression $type */ reg::packed(738, 0, 523), /* addTypeToExpression return */ reg::packed(966, 0, 1742), /* removeTypeFromExpression $expr */ - reg::packed(6721, 0, 1454), /* removeTypeFromExpression $typeToRemove */ + reg::packed(6920, 0, 1454), /* removeTypeFromExpression $typeToRemove */ reg::packed(738, 0, 523), /* removeTypeFromExpression return */ reg::packed(966, 0, 1742), /* filterByTruthyValue $expr */ reg::packed(738, 0, 523), /* filterByTruthyValue return */ reg::packed(966, 0, 1742), /* filterByFalseyValue $expr */ reg::packed(738, 0, 523), /* filterByFalseyValue return */ - reg::packed(6799, 0, 2065), /* applySpecifiedTypes $specifiedTypes */ + reg::packed(6998, 0, 2065), /* applySpecifiedTypes $specifiedTypes */ reg::packed(738, 0, 523), /* applySpecifiedTypes return */ - reg::packed(6834, MAY_BE_ARRAY), /* respecifyRelationalFacts $changedExpressions */ + reg::packed(7033, MAY_BE_ARRAY), /* respecifyRelationalFacts $changedExpressions */ reg::packed(738, MAY_BE_NULL, 2065), /* respecifyRelationalFacts return */ - reg::packed(6799, 0, 2065), /* applySpecifiedTypesBatch $specifiedTypes */ + reg::packed(6998, 0, 2065), /* applySpecifiedTypesBatch $specifiedTypes */ reg::packed(738, MAY_BE_ARRAY), /* applySpecifiedTypesBatch return */ - reg::packed(6903, MAY_BE_ARRAY), /* processConditionalExpressionsAfterSpecifying $specifiedExpressions */ + reg::packed(7102, MAY_BE_ARRAY), /* processConditionalExpressionsAfterSpecifying $specifiedExpressions */ reg::packed(738, 0, 523), /* processConditionalExpressionsAfterSpecifying return */ reg::packed(738, MAY_BE_ARRAY), /* getConditionalExpressions return */ reg::packed(1913, MAY_BE_STRING), /* addConditionalExpressions $exprString */ - reg::packed(6995, MAY_BE_ARRAY), /* addConditionalExpressions $conditionalExpressionHolders */ + reg::packed(7194, MAY_BE_ARRAY), /* addConditionalExpressions $conditionalExpressionHolders */ reg::packed(738, 0, 523), /* addConditionalExpressions return */ reg::packed(738, 0, 523), /* exitFirstLevelStatements return */ reg::packed(738, MAY_BE_BOOL), /* isInFirstLevelStatement return */ - reg::packed(7099, MAY_BE_NULL, 523), /* mergeWith $otherScope */ - reg::packed(7110, MAY_BE_BOOL, reg::NoString, false, false, 148), /* mergeWith $preserveVacuousConditionals */ - reg::packed(7138, MAY_BE_BOOL, reg::NoString, false, false, 148), /* mergeWith $joinsIterations */ + reg::packed(7298, MAY_BE_NULL, 523), /* mergeWith $otherScope */ + reg::packed(7309, MAY_BE_BOOL, reg::NoString, false, false, 148), /* mergeWith $preserveVacuousConditionals */ + reg::packed(7337, MAY_BE_BOOL, reg::NoString, false, false, 148), /* mergeWith $joinsIterations */ reg::packed(738, 0, 523), /* mergeWith return */ - reg::packed(7164, MAY_BE_ARRAY), /* completeOffsetWriteBases $differingKeys */ - reg::packed(7178, MAY_BE_ARRAY, reg::NoString, true, false), /* completeOffsetWriteBases $ourTypes */ - reg::packed(7187, MAY_BE_ARRAY, reg::NoString, true, false), /* completeOffsetWriteBases $theirTypes */ - reg::packed(7198, MAY_BE_ARRAY, reg::NoString, true, false), /* completeOffsetWriteBases $ourNativeTypes */ - reg::packed(7213, MAY_BE_ARRAY, reg::NoString, true, false), /* completeOffsetWriteBases $theirNativeTypes */ + reg::packed(7363, MAY_BE_ARRAY), /* completeOffsetWriteBases $differingKeys */ + reg::packed(7377, MAY_BE_ARRAY, reg::NoString, true, false), /* completeOffsetWriteBases $ourTypes */ + reg::packed(7386, MAY_BE_ARRAY, reg::NoString, true, false), /* completeOffsetWriteBases $theirTypes */ + reg::packed(7397, MAY_BE_ARRAY, reg::NoString, true, false), /* completeOffsetWriteBases $ourNativeTypes */ + reg::packed(7412, MAY_BE_ARRAY, reg::NoString, true, false), /* completeOffsetWriteBases $theirNativeTypes */ reg::packed(738, MAY_BE_BOOL), /* completeOffsetWriteBases return */ reg::packed(1913, MAY_BE_STRING), /* completeOffsetWriteBase $exprString */ - reg::packed(7255, 0, 4746), /* completeOffsetWriteBase $holder */ - reg::packed(7262, MAY_BE_ARRAY, reg::NoString, true, false), /* completeOffsetWriteBase $types */ - reg::packed(7268, MAY_BE_ARRAY, reg::NoString, true, false), /* completeOffsetWriteBase $nativeTypes */ + reg::packed(7454, 0, 4945), /* completeOffsetWriteBase $holder */ + reg::packed(7461, MAY_BE_ARRAY, reg::NoString, true, false), /* completeOffsetWriteBase $types */ + reg::packed(7467, MAY_BE_ARRAY, reg::NoString, true, false), /* completeOffsetWriteBase $nativeTypes */ reg::packed(738, MAY_BE_BOOL), /* completeOffsetWriteBase return */ - reg::packed(7304, 0, 523), /* collectAbsorbedClosures $ours */ - reg::packed(7309, 0, 523), /* collectAbsorbedClosures $theirs */ + reg::packed(7503, 0, 523), /* collectAbsorbedClosures $ours */ + reg::packed(7508, 0, 523), /* collectAbsorbedClosures $theirs */ reg::packed(738, MAY_BE_NULL, 672), /* collectAbsorbedClosures return */ - reg::packed(7099, MAY_BE_NULL, 523), /* mergeWithVariableState $otherScope */ - reg::packed(7110, MAY_BE_BOOL), /* mergeWithVariableState $preserveVacuousConditionals */ - reg::packed(7138, MAY_BE_BOOL), /* mergeWithVariableState $joinsIterations */ + reg::packed(7298, MAY_BE_NULL, 523), /* mergeWithVariableState $otherScope */ + reg::packed(7309, MAY_BE_BOOL), /* mergeWithVariableState $preserveVacuousConditionals */ + reg::packed(7337, MAY_BE_BOOL), /* mergeWithVariableState $joinsIterations */ reg::packed(738, 0, 523), /* mergeWithVariableState return */ - reg::packed(7363, MAY_BE_ARRAY), /* findMergedCallCandidates $differingExpressionKeys */ - reg::packed(7387, MAY_BE_ARRAY), /* findMergedCallCandidates $mergedExpressionTypes */ + reg::packed(7562, MAY_BE_ARRAY), /* findMergedCallCandidates $differingExpressionKeys */ + reg::packed(7586, MAY_BE_ARRAY), /* findMergedCallCandidates $mergedExpressionTypes */ reg::packed(738, MAY_BE_ARRAY), /* findMergedCallCandidates return */ - reg::packed(7434, 0, 7439), /* hasNarrowableArgument $call */ + reg::packed(7633, 0, 7638), /* hasNarrowableArgument $call */ reg::packed(738, MAY_BE_BOOL), /* hasNarrowableArgument return */ - reg::packed(7552, MAY_BE_ARRAY), /* findUninformativeMergedCalls $candidates */ - reg::packed(7563, MAY_BE_ARRAY), /* findUninformativeMergedCalls $mergedNativeTypes */ + reg::packed(7751, MAY_BE_ARRAY), /* findUninformativeMergedCalls $candidates */ + reg::packed(7762, MAY_BE_ARRAY), /* findUninformativeMergedCalls $mergedNativeTypes */ reg::packed(738, MAY_BE_ARRAY), /* findUninformativeMergedCalls return */ - reg::packed(7363, MAY_BE_ARRAY), /* withoutPreciseClassConstantFetches $differingExpressionKeys */ - reg::packed(7610, MAY_BE_ARRAY), /* withoutPreciseClassConstantFetches $ourExpressionTypes */ - reg::packed(7629, MAY_BE_ARRAY), /* withoutPreciseClassConstantFetches $theirExpressionTypes */ + reg::packed(7562, MAY_BE_ARRAY), /* withoutPreciseClassConstantFetches $differingExpressionKeys */ + reg::packed(7809, MAY_BE_ARRAY), /* withoutPreciseClassConstantFetches $ourExpressionTypes */ + reg::packed(7828, MAY_BE_ARRAY), /* withoutPreciseClassConstantFetches $theirExpressionTypes */ reg::packed(738, MAY_BE_ARRAY), /* withoutPreciseClassConstantFetches return */ - reg::packed(7685, MAY_BE_ARRAY), /* preserveVacuousConditionalExpressions $currentConditionalExpressions */ - reg::packed(7715, MAY_BE_ARRAY), /* preserveVacuousConditionalExpressions $sourceConditionalExpressions */ - reg::packed(7744, MAY_BE_ARRAY), /* preserveVacuousConditionalExpressions $otherExpressionTypes */ - reg::packed(7138, MAY_BE_BOOL), /* preserveVacuousConditionalExpressions $joinsIterations */ + reg::packed(7884, MAY_BE_ARRAY), /* preserveVacuousConditionalExpressions $currentConditionalExpressions */ + reg::packed(7914, MAY_BE_ARRAY), /* preserveVacuousConditionalExpressions $sourceConditionalExpressions */ + reg::packed(7943, MAY_BE_ARRAY), /* preserveVacuousConditionalExpressions $otherExpressionTypes */ + reg::packed(7337, MAY_BE_BOOL), /* preserveVacuousConditionalExpressions $joinsIterations */ reg::packed(738, MAY_BE_ARRAY), /* preserveVacuousConditionalExpressions return */ - reg::packed(7255, 0, 7803), /* isAboutCall $holder */ + reg::packed(7454, 0, 8002), /* isAboutCall $holder */ reg::packed(738, MAY_BE_BOOL), /* isAboutCall return */ - reg::packed(7685, MAY_BE_ARRAY), /* mergeSameGuardConditionalExpressions $currentConditionalExpressions */ - reg::packed(7860, MAY_BE_ARRAY), /* mergeSameGuardConditionalExpressions $ourConditionalExpressions */ - reg::packed(7886, MAY_BE_ARRAY), /* mergeSameGuardConditionalExpressions $theirConditionalExpressions */ + reg::packed(7884, MAY_BE_ARRAY), /* mergeSameGuardConditionalExpressions $currentConditionalExpressions */ + reg::packed(8059, MAY_BE_ARRAY), /* mergeSameGuardConditionalExpressions $ourConditionalExpressions */ + reg::packed(8085, MAY_BE_ARRAY), /* mergeSameGuardConditionalExpressions $theirConditionalExpressions */ reg::packed(738, MAY_BE_ARRAY), /* mergeSameGuardConditionalExpressions return */ - reg::packed(7951, MAY_BE_ARRAY), /* mergeConditionalExpressions $newConditionalExpressions */ - reg::packed(7977, MAY_BE_ARRAY), /* mergeConditionalExpressions $existingConditionalExpressions */ + reg::packed(8150, MAY_BE_ARRAY), /* mergeConditionalExpressions $newConditionalExpressions */ + reg::packed(8176, MAY_BE_ARRAY), /* mergeConditionalExpressions $existingConditionalExpressions */ reg::packed(738, MAY_BE_ARRAY), /* mergeConditionalExpressions return */ - reg::packed(8036, 0, 523), /* mergeInitializedProperties $calledMethodScope */ + reg::packed(8235, 0, 523), /* mergeInitializedProperties $calledMethodScope */ reg::packed(738, 0, 523), /* mergeInitializedProperties return */ - reg::packed(8081, 0, 523), /* processFinallyScope $finallyScope */ - reg::packed(8094, 0, 523), /* processFinallyScope $originalFinallyScope */ + reg::packed(8280, 0, 523), /* processFinallyScope $finallyScope */ + reg::packed(8293, 0, 523), /* processFinallyScope $originalFinallyScope */ reg::packed(738, 0, 523), /* processFinallyScope return */ - reg::packed(8135, MAY_BE_ARRAY), /* processFinallyScopeVariableTypeHolders $ourVariableTypeHolders */ - reg::packed(8158, MAY_BE_ARRAY), /* processFinallyScopeVariableTypeHolders $finallyVariableTypeHolders */ - reg::packed(8185, MAY_BE_ARRAY), /* processFinallyScopeVariableTypeHolders $originalVariableTypeHolders */ + reg::packed(8334, MAY_BE_ARRAY), /* processFinallyScopeVariableTypeHolders $ourVariableTypeHolders */ + reg::packed(8357, MAY_BE_ARRAY), /* processFinallyScopeVariableTypeHolders $finallyVariableTypeHolders */ + reg::packed(8384, MAY_BE_ARRAY), /* processFinallyScopeVariableTypeHolders $originalVariableTypeHolders */ reg::packed(738, MAY_BE_ARRAY), /* processFinallyScopeVariableTypeHolders return */ - reg::packed(8252, 0, 523), /* processClosureScope $closureScope */ - reg::packed(8265, MAY_BE_NULL, 523), /* processClosureScope $prevScope */ - reg::packed(8275, MAY_BE_ARRAY), /* processClosureScope $byRefUses */ + reg::packed(8451, 0, 523), /* processClosureScope $closureScope */ + reg::packed(8464, MAY_BE_NULL, 523), /* processClosureScope $prevScope */ + reg::packed(8474, MAY_BE_ARRAY), /* processClosureScope $byRefUses */ reg::packed(738, 0, 523), /* processClosureScope return */ - reg::packed(8305, 0, 523), /* processAlwaysIterableForeachScopeWithoutPollute $finalScope */ + reg::packed(8504, 0, 523), /* processAlwaysIterableForeachScopeWithoutPollute $finalScope */ reg::packed(738, 0, 523), /* processAlwaysIterableForeachScopeWithoutPollute return */ - reg::packed(8364, MAY_BE_NULL | MAY_BE_ARRAY), /* forgetLoopWrittenVariables $writtenVariableNames */ + reg::packed(8563, MAY_BE_NULL | MAY_BE_ARRAY), /* forgetLoopWrittenVariables $writtenVariableNames */ reg::packed(738, 0, 523), /* forgetLoopWrittenVariables return */ - reg::packed(8412, 0, 523), /* forgetChangedLoopVariables $previousScope */ - reg::packed(8364, MAY_BE_NULL | MAY_BE_ARRAY), /* forgetChangedLoopVariables $writtenVariableNames */ + reg::packed(8611, 0, 523), /* forgetChangedLoopVariables $previousScope */ + reg::packed(8563, MAY_BE_NULL | MAY_BE_ARRAY), /* forgetChangedLoopVariables $writtenVariableNames */ reg::packed(738, MAY_BE_NULL, 523), /* forgetChangedLoopVariables return */ - reg::packed(7099, 0, 523), /* getChangedVariableNames $otherScope */ + reg::packed(7298, 0, 523), /* getChangedVariableNames $otherScope */ reg::packed(738, MAY_BE_ARRAY), /* getChangedVariableNames return */ - reg::packed(8477, 0, 1454), /* generalizeIteratedType $previousType */ + reg::packed(8676, 0, 1454), /* generalizeIteratedType $previousType */ reg::packed(3958, 0, 1454), /* generalizeIteratedType $type */ reg::packed(738, 0, 1454), /* generalizeIteratedType return */ - reg::packed(7099, 0, 523), /* generalizeWith $otherScope */ - reg::packed(8513, MAY_BE_NULL | MAY_BE_ARRAY, reg::NoString, false, false, 222), /* generalizeWith $writableVariableNames */ - reg::packed(8535, MAY_BE_NULL, 523, false, false, 222), /* generalizeWith $loopEntryScope */ + reg::packed(7298, 0, 523), /* generalizeWith $otherScope */ + reg::packed(8712, MAY_BE_NULL | MAY_BE_ARRAY, reg::NoString, false, false, 222), /* generalizeWith $writableVariableNames */ + reg::packed(8734, MAY_BE_NULL, 523, false, false, 222), /* generalizeWith $loopEntryScope */ reg::packed(738, 0, 523), /* generalizeWith return */ - reg::packed(7099, 0, 523), /* generalizeWithVariableState $otherScope */ - reg::packed(8513, MAY_BE_NULL | MAY_BE_ARRAY), /* generalizeWithVariableState $writableVariableNames */ - reg::packed(8535, MAY_BE_NULL, 523), /* generalizeWithVariableState $loopEntryScope */ + reg::packed(7298, 0, 523), /* generalizeWithVariableState $otherScope */ + reg::packed(8712, MAY_BE_NULL | MAY_BE_ARRAY), /* generalizeWithVariableState $writableVariableNames */ + reg::packed(8734, MAY_BE_NULL, 523), /* generalizeWithVariableState $loopEntryScope */ reg::packed(738, 0, 523), /* generalizeWithVariableState return */ reg::packed(278, MAY_BE_ARRAY), /* withoutWidenedConditionalExpressions $conditionalExpressions */ reg::packed(237, MAY_BE_ARRAY), /* withoutWidenedConditionalExpressions $expressionTypes */ - reg::packed(8593, MAY_BE_ARRAY), /* withoutWidenedConditionalExpressions $generalizedExpressionTypes */ + reg::packed(8792, MAY_BE_ARRAY), /* withoutWidenedConditionalExpressions $generalizedExpressionTypes */ reg::packed(738, MAY_BE_ARRAY), /* withoutWidenedConditionalExpressions return */ - reg::packed(8657, MAY_BE_ARRAY), /* generalizeVariableTypeHolders $variableTypeHolders */ - reg::packed(8677, MAY_BE_ARRAY), /* generalizeVariableTypeHolders $otherVariableTypeHolders */ - reg::packed(8513, MAY_BE_NULL | MAY_BE_ARRAY), /* generalizeVariableTypeHolders $writableVariableNames */ - reg::packed(8702, MAY_BE_ARRAY), /* generalizeVariableTypeHolders $entryVariableTypeHolders */ + reg::packed(8856, MAY_BE_ARRAY), /* generalizeVariableTypeHolders $variableTypeHolders */ + reg::packed(8876, MAY_BE_ARRAY), /* generalizeVariableTypeHolders $otherVariableTypeHolders */ + reg::packed(8712, MAY_BE_NULL | MAY_BE_ARRAY), /* generalizeVariableTypeHolders $writableVariableNames */ + reg::packed(8901, MAY_BE_ARRAY), /* generalizeVariableTypeHolders $entryVariableTypeHolders */ reg::packed(738, MAY_BE_ARRAY), /* generalizeVariableTypeHolders return */ reg::packed(3958, 0, 1454), /* flattenUnionForGeneralization $type */ reg::packed(738, MAY_BE_ARRAY), /* flattenUnionForGeneralization return */ - reg::packed(8787, 0, 1454), /* generalizeType $a */ - reg::packed(8789, 0, 1454), /* generalizeType $b */ - reg::packed(8791, MAY_BE_LONG), /* generalizeType $depth */ - reg::packed(8797, MAY_BE_NULL, 1454, false, false, 222), /* generalizeType $entryType */ + reg::packed(8986, 0, 1454), /* generalizeType $a */ + reg::packed(8988, 0, 1454), /* generalizeType $b */ + reg::packed(8990, MAY_BE_LONG), /* generalizeType $depth */ + reg::packed(8996, MAY_BE_NULL, 1454, false, false, 222), /* generalizeType $entryType */ reg::packed(738, 0, 1454), /* generalizeType return */ - reg::packed(8787, MAY_BE_ARRAY), /* generalizeConstantFloats $a */ - reg::packed(8789, MAY_BE_ARRAY), /* generalizeConstantFloats $b */ - reg::packed(8822, MAY_BE_DOUBLE), /* generalizeConstantFloats $entryMin */ - reg::packed(8831, MAY_BE_DOUBLE), /* generalizeConstantFloats $entryMax */ + reg::packed(8986, MAY_BE_ARRAY), /* generalizeConstantFloats $a */ + reg::packed(8988, MAY_BE_ARRAY), /* generalizeConstantFloats $b */ + reg::packed(9021, MAY_BE_DOUBLE), /* generalizeConstantFloats $entryMin */ + reg::packed(9030, MAY_BE_DOUBLE), /* generalizeConstantFloats $entryMax */ reg::packed(738, 0, 1454), /* generalizeConstantFloats return */ - reg::packed(8787, 0, 1454), /* generalizeShapesKeyByKey $a */ - reg::packed(8789, 0, 1454), /* generalizeShapesKeyByKey $b */ - reg::packed(8791, MAY_BE_LONG), /* generalizeShapesKeyByKey $depth */ - reg::packed(8865, 0, 1454), /* generalizeShapesKeyByKey $allA */ - reg::packed(8870, 0, 1454), /* generalizeShapesKeyByKey $allB */ + reg::packed(8986, 0, 1454), /* generalizeShapesKeyByKey $a */ + reg::packed(8988, 0, 1454), /* generalizeShapesKeyByKey $b */ + reg::packed(8990, MAY_BE_LONG), /* generalizeShapesKeyByKey $depth */ + reg::packed(9064, 0, 1454), /* generalizeShapesKeyByKey $allA */ + reg::packed(9069, 0, 1454), /* generalizeShapesKeyByKey $allB */ reg::packed(738, 0, 1454), /* generalizeShapesKeyByKey return */ - reg::packed(8787, 0, 1454), /* pairShapes $a */ - reg::packed(8789, 0, 1454), /* pairShapes $b */ + reg::packed(8986, 0, 1454), /* pairShapes $a */ + reg::packed(8988, 0, 1454), /* pairShapes $b */ reg::packed(738, MAY_BE_NULL | MAY_BE_ARRAY), /* pairShapes return */ - reg::packed(8911, 0, 8917), /* getRequiredKeysSignature $shape */ + reg::packed(9110, 0, 9116), /* getRequiredKeysSignature $shape */ reg::packed(738, MAY_BE_STRING), /* getRequiredKeysSignature return */ reg::packed(3958, 0, 1454), /* getArrayDepth $type */ reg::packed(738, MAY_BE_LONG), /* getArrayDepth return */ - reg::packed(7099, 0, 523), /* equals $otherScope */ + reg::packed(7298, 0, 523), /* equals $otherScope */ reg::packed(738, MAY_BE_BOOL), /* equals return */ reg::packed(278, MAY_BE_ARRAY), /* compareConditionalExpressions $conditionalExpressions */ - reg::packed(9003, MAY_BE_ARRAY), /* compareConditionalExpressions $otherConditionalExpressions */ + reg::packed(9202, MAY_BE_ARRAY), /* compareConditionalExpressions $otherConditionalExpressions */ reg::packed(738, MAY_BE_BOOL), /* compareConditionalExpressions return */ - reg::packed(8657, MAY_BE_ARRAY), /* compareVariableTypeHolders $variableTypeHolders */ - reg::packed(8677, MAY_BE_ARRAY), /* compareVariableTypeHolders $otherVariableTypeHolders */ + reg::packed(8856, MAY_BE_ARRAY), /* compareVariableTypeHolders $variableTypeHolders */ + reg::packed(8876, MAY_BE_ARRAY), /* compareVariableTypeHolders $otherVariableTypeHolders */ reg::packed(738, MAY_BE_BOOL), /* compareVariableTypeHolders return */ - reg::packed(9088, 0, 9107), /* canAccessProperty $propertyReflection */ + reg::packed(9287, 0, 9306), /* canAccessProperty $propertyReflection */ reg::packed(738, MAY_BE_BOOL), /* canAccessProperty return */ - reg::packed(9088, 0, 9163), /* canReadProperty $propertyReflection */ + reg::packed(9287, 0, 9362), /* canReadProperty $propertyReflection */ reg::packed(738, MAY_BE_BOOL), /* canReadProperty return */ - reg::packed(9088, 0, 9163), /* canWriteProperty $propertyReflection */ + reg::packed(9287, 0, 9362), /* canWriteProperty $propertyReflection */ reg::packed(738, MAY_BE_BOOL), /* canWriteProperty return */ - reg::packed(9242, 0, 9259), /* canCallMethod $methodReflection */ + reg::packed(9441, 0, 9458), /* canCallMethod $methodReflection */ reg::packed(738, MAY_BE_BOOL), /* canCallMethod return */ - reg::packed(9309, 0, 9328), /* canAccessConstant $constantReflection */ + reg::packed(9508, 0, 9527), /* canAccessConstant $constantReflection */ reg::packed(738, MAY_BE_BOOL), /* canAccessConstant return */ - reg::packed(9389, 0, 9411), /* canAccessClassMember $classMemberReflection */ + reg::packed(9588, 0, 9610), /* canAccessClassMember $classMemberReflection */ reg::packed(738, MAY_BE_BOOL), /* canAccessClassMember return */ reg::packed(738, MAY_BE_ARRAY), /* debug return */ - reg::packed(9479, 0, 1454), /* filterTypeWithMethod $typeWithMethod */ - reg::packed(9494, MAY_BE_STRING), /* filterTypeWithMethod $methodName */ + reg::packed(9678, 0, 1454), /* filterTypeWithMethod $typeWithMethod */ + reg::packed(9693, MAY_BE_STRING), /* filterTypeWithMethod $methodName */ reg::packed(738, MAY_BE_NULL, 1454), /* filterTypeWithMethod return */ - reg::packed(9479, 0, 1454), /* getMethodReflection $typeWithMethod */ - reg::packed(9494, MAY_BE_STRING), /* getMethodReflection $methodName */ - reg::packed(738, MAY_BE_NULL, 9526), /* getMethodReflection return */ - reg::packed(9479, 0, 1454), /* getNakedMethod $typeWithMethod */ - reg::packed(9494, MAY_BE_STRING), /* getNakedMethod $methodName */ - reg::packed(738, MAY_BE_NULL, 9526), /* getNakedMethod return */ - reg::packed(9605, 0, 1454), /* getPropertyReflection $typeWithProperty */ + reg::packed(9678, 0, 1454), /* getMethodReflection $typeWithMethod */ + reg::packed(9693, MAY_BE_STRING), /* getMethodReflection $methodName */ + reg::packed(738, MAY_BE_NULL, 9725), /* getMethodReflection return */ + reg::packed(9678, 0, 1454), /* getNakedMethod $typeWithMethod */ + reg::packed(9693, MAY_BE_STRING), /* getNakedMethod $methodName */ + reg::packed(738, MAY_BE_NULL, 9725), /* getNakedMethod return */ + reg::packed(9804, 0, 1454), /* getPropertyReflection $typeWithProperty */ reg::packed(3812, MAY_BE_STRING), /* getPropertyReflection $propertyName */ - reg::packed(738, MAY_BE_NULL, 9163), /* getPropertyReflection return */ - reg::packed(9605, 0, 1454), /* getInstancePropertyReflection $typeWithProperty */ + reg::packed(738, MAY_BE_NULL, 9362), /* getPropertyReflection return */ + reg::packed(9804, 0, 1454), /* getInstancePropertyReflection $typeWithProperty */ reg::packed(3812, MAY_BE_STRING), /* getInstancePropertyReflection $propertyName */ - reg::packed(738, MAY_BE_NULL, 9163), /* getInstancePropertyReflection return */ - reg::packed(9605, 0, 1454), /* getStaticPropertyReflection $typeWithProperty */ + reg::packed(738, MAY_BE_NULL, 9362), /* getInstancePropertyReflection return */ + reg::packed(9804, 0, 1454), /* getStaticPropertyReflection $typeWithProperty */ reg::packed(3812, MAY_BE_STRING), /* getStaticPropertyReflection $propertyName */ - reg::packed(738, MAY_BE_NULL, 9163), /* getStaticPropertyReflection return */ - reg::packed(9702, 0, 1454), /* getConstantReflection $typeWithConstant */ - reg::packed(9719, MAY_BE_STRING), /* getConstantReflection $constantName */ - reg::packed(738, MAY_BE_NULL, 9328), /* getConstantReflection return */ - reg::packed(9719, MAY_BE_STRING), /* getConstantExplicitTypeFromConfig $constantName */ - reg::packed(9754, 0, 1454), /* getConstantExplicitTypeFromConfig $constantType */ + reg::packed(738, MAY_BE_NULL, 9362), /* getStaticPropertyReflection return */ + reg::packed(9901, 0, 1454), /* getConstantReflection $typeWithConstant */ + reg::packed(9918, MAY_BE_STRING), /* getConstantReflection $constantName */ + reg::packed(738, MAY_BE_NULL, 9527), /* getConstantReflection return */ + reg::packed(9918, MAY_BE_STRING), /* getConstantExplicitTypeFromConfig $constantName */ + reg::packed(9953, 0, 1454), /* getConstantExplicitTypeFromConfig $constantType */ reg::packed(738, 0, 1454), /* getConstantExplicitTypeFromConfig return */ reg::packed(738, MAY_BE_ARRAY), /* getConstantTypes return */ reg::packed(1550, 0, 1555), /* getGlobalConstantType $name */ reg::packed(738, MAY_BE_NULL, 1454), /* getGlobalConstantType return */ reg::packed(1550, 0, 1555), /* createGlobalConstantFetches $name */ - reg::packed(9840, MAY_BE_STRING), /* createGlobalConstantFetches $nameString */ + reg::packed(10039, MAY_BE_STRING), /* createGlobalConstantFetches $nameString */ reg::packed(227, MAY_BE_NULL | MAY_BE_STRING), /* createGlobalConstantFetches $namespace */ reg::packed(738, MAY_BE_ARRAY), /* createGlobalConstantFetches return */ reg::packed(738, MAY_BE_ARRAY), /* getNativeConstantTypes return */ - reg::packed(5222, 0, 1454), /* getIterableKeyType $iteratee */ + reg::packed(5421, 0, 1454), /* getIterableKeyType $iteratee */ reg::packed(738, 0, 1454), /* getIterableKeyType return */ - reg::packed(5222, 0, 1454), /* getIterableValueType $iteratee */ + reg::packed(5421, 0, 1454), /* getIterableValueType $iteratee */ reg::packed(738, 0, 1454), /* getIterableValueType return */ - reg::packed(738, 0, 9942), /* getPhpVersion return */ - reg::packed(738, 0, 9942), /* resolvePhpVersion return */ + reg::packed(738, 0, 10141), /* getPhpVersion return */ + reg::packed(738, 0, 10141), /* resolvePhpVersion return */ reg::packed(738, MAY_BE_NULL, 1454), /* getConfiguredPhpVersionRange return */ reg::packed(3958, 0, 1454), /* isOverallPhpVersionRange $type */ reg::packed(738, MAY_BE_BOOL), /* isOverallPhpVersionRange return */ - reg::packed(1737, 0, 10052), /* invokeNodeCallback $node */ + reg::packed(1737, 0, 10251), /* invokeNodeCallback $node */ reg::packed(738, MAY_BE_VOID), /* invokeNodeCallback return */ - reg::packed(10086, MAY_BE_STRING), /* emitCollectedData $collectorType */ - reg::packed(10100, MAY_BE_ANY), /* emitCollectedData $data */ + reg::packed(10285, MAY_BE_STRING), /* emitCollectedData $collectorType */ + reg::packed(10299, MAY_BE_ANY), /* emitCollectedData $data */ reg::packed(738, MAY_BE_VOID), /* emitCollectedData return */ - reg::packed(10123, MAY_BE_STRING), /* trackValueDependency $extensionClass */ + reg::packed(10322, MAY_BE_STRING), /* trackValueDependency $extensionClass */ reg::packed(2604, MAY_BE_STRING), /* trackValueDependency $key */ reg::packed(738, MAY_BE_VOID), /* trackValueDependency return */ - reg::packed(10159, MAY_BE_STRING), /* trackFileDependency $file */ + reg::packed(10358, MAY_BE_STRING), /* trackFileDependency $file */ reg::packed(738, MAY_BE_VOID), /* trackFileDependency return */ - reg::packed(10184, MAY_BE_STRING), /* trackDirectoryDependency $directory */ - reg::packed(10194, MAY_BE_STRING, reg::NoString, false, false, 10202), /* trackDirectoryDependency $pattern */ + reg::packed(10383, MAY_BE_STRING), /* trackDirectoryDependency $directory */ + reg::packed(10393, MAY_BE_STRING, reg::NoString, false, false, 10401), /* trackDirectoryDependency $pattern */ reg::packed(738, MAY_BE_VOID), /* trackDirectoryDependency return */ reg::packed(3061, MAY_BE_STRING), /* trackClassDependency $className */ reg::packed(738, MAY_BE_VOID), /* trackClassDependency return */ @@ -1321,138 +1334,142 @@ inline constexpr sigtab::Sig isInClosureBind = { { 4548 /* isInClosureBind */, 0 inline constexpr sigtab::Sig withClosureBindScopeClasses = { { 4564 /* withClosureBindScopeClasses */, 1, 240, 1, 241, ZEND_ACC_PUBLIC } }; inline constexpr sigtab::Sig enterAnonymousFunction = { { 4672 /* enterAnonymousFunction */, 2, 242, 3, 245, ZEND_ACC_PUBLIC } }; inline constexpr sigtab::Sig enterAnonymousFunctionWithoutReflection = { { 4695 /* enterAnonymousFunctionWithoutReflection */, 3, 246, 3, 249, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig expressionTypeIsUnchangeable = { { 4784 /* expressionTypeIsUnchangeable */, 1, 250, 1, 251, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig invalidateStaticExpressions = { { 4813 /* invalidateStaticExpressions */, 1, 252, 1, 253, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig enterArrowFunction = { { 4889 /* enterArrowFunction */, 2, 254, 3, 257, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig enterArrowFunctionWithoutReflection = { { 4908 /* enterArrowFunctionWithoutReflection */, 3, 258, 3, 261, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig isParameterValueNullable = { { 4965 /* isParameterValueNullable */, 1, 262, 1, 263, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig getFunctionType = { { 5012 /* getFunctionType */, 3, 264, 3, 267, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig getCallableParameterType = { { 5034 /* getCallableParameterType */, 3, 268, 3, 271, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig buildVariadicArrayTypeFromCallableParameters = { { 5070 /* buildVariadicArrayTypeFromCallableParameters */, 2, 272, 2, 274, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig intersectButNotNever = { { 5139 /* intersectButNotNever */, 2, 275, 2, 277, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC } }; -inline constexpr sigtab::Sig enterMatch = { { 5211 /* enterMatch */, 3, 278, 3, 281, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig enterForeach = { { 5292 /* enterForeach */, 7, 282, 7, 289, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig enterForeachKey = { { 5305 /* enterForeachKey */, 5, 290, 5, 295, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig enterCatchType = { { 5331 /* enterCatchType */, 2, 296, 2, 298, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig enterExpressionAssign = { { 5359 /* enterExpressionAssign */, 1, 299, 2, 301, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig exitExpressionAssign = { { 5381 /* exitExpressionAssign */, 1, 302, 1, 303, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig isInExpressionAssign = { { 5402 /* isInExpressionAssign */, 1, 304, 1, 305, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig isInWriteExpressionAssign = { { 5423 /* isInWriteExpressionAssign */, 1, 306, 1, 307, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig setAllowedUndefinedExpression = { { 5449 /* setAllowedUndefinedExpression */, 1, 308, 1, 309, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig unsetAllowedUndefinedExpression = { { 5479 /* unsetAllowedUndefinedExpression */, 1, 310, 1, 311, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig isUndefinedExpressionAllowed = { { 5511 /* isUndefinedExpressionAllowed */, 1, 312, 1, 313, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig assignVariable = { { 5576 /* assignVariable */, 4, 314, 5, 319, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig overwriteExpression = { { 5591 /* overwriteExpression */, 3, 320, 3, 323, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig resolveIntertwinedAssignedType = { { 5663 /* resolveIntertwinedAssignedType */, 5, 324, 5, 329, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig isDimFetchPathReachable = { { 5737 /* isDimFetchPathReachable */, 2, 330, 2, 332, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig unsetExpression = { { 5761 /* unsetExpression */, 1, 333, 1, 334, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig getStateType = { { 5777 /* getStateType */, 1, 335, 1, 336, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig getScopeStateType = { { 5790 /* getScopeStateType */, 1, 337, 1, 338, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig getScopeStateNativeType = { { 5808 /* getScopeStateNativeType */, 1, 339, 1, 340, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig resolveScopeStateType = { { 5832 /* resolveScopeStateType */, 2, 341, 2, 343, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig specifyExpressionType = { { 5854 /* specifyExpressionType */, 4, 344, 4, 348, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig openSpecificationScope = { { 5876 /* openSpecificationScope */, 0, 349, 0, 349, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig isSpecifyExpressionTypeNoop = { { 5899 /* isSpecifyExpressionTypeNoop */, 2, 350, 2, 352, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig specifyExpressionTypeInPlace = { { 5959 /* specifyExpressionTypeInPlace */, 4, 353, 6, 359, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig assignExpression = { { 5988 /* assignExpression */, 3, 360, 3, 363, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig specifyAssignedExpressionType = { { 6005 /* specifyAssignedExpressionType */, 3, 364, 3, 367, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig assignInitializedProperty = { { 6049 /* assignInitializedProperty */, 2, 368, 2, 370, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig invalidateExpression = { { 6181 /* invalidateExpression */, 1, 371, 5, 376, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig assignObjectAlias = { { 6202 /* assignObjectAlias */, 2, 377, 3, 380, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig assignNarrowedFrom = { { 6220 /* assignNarrowedFrom */, 2, 381, 2, 383, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig holdsSameObject = { { 6249 /* holdsSameObject */, 2, 384, 2, 386, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig specifyObjectAlias = { { 6277 /* specifyObjectAlias */, 3, 387, 3, 390, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig getObjectAliasRootVariableName = { { 6296 /* getObjectAliasRootVariableName */, 1, 391, 1, 392, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig getObjectAliasEdges = { { 6327 /* getObjectAliasEdges */, 0, 393, 0, 393, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig getPropertyFetchChainPrefixes = { { 6359 /* getPropertyFetchChainPrefixes */, 2, 394, 2, 396, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig findObjectAliasClass = { { 6395 /* findObjectAliasClass */, 2, 397, 2, 399, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig findObjectAliasInvalidationTargets = { { 6416 /* findObjectAliasInvalidationTargets */, 3, 400, 3, 403, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig reconnectObjectAliases = { { 6459 /* reconnectObjectAliases */, 2, 404, 2, 406, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig invalidateExpressionWithoutAliases = { { 6482 /* invalidateExpressionWithoutAliases */, 5, 407, 5, 412, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig isPrivatePropertyOfDifferentClass = { { 6517 /* isPrivatePropertyOfDifferentClass */, 2, 413, 2, 415, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig invalidateMethodsOnExpression = { { 6551 /* invalidateMethodsOnExpression */, 1, 416, 1, 417, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig setExpressionCertaintyKeepingType = { { 6581 /* setExpressionCertaintyKeepingType */, 2, 418, 2, 420, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig removeArraysWithoutOffsetValueType = { { 6647 /* removeArraysWithoutOffsetValueType */, 3, 421, 3, 424, ZEND_ACC_PRIVATE | ZEND_ACC_STATIC } }; -inline constexpr sigtab::Sig isComplexUnionType = { { 6682 /* isComplexUnionType */, 1, 425, 1, 426, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig addTypeToExpression = { { 6701 /* addTypeToExpression */, 2, 427, 2, 429, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig removeTypeFromExpression = { { 6734 /* removeTypeFromExpression */, 2, 430, 2, 432, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig filterByTruthyValue = { { 6759 /* filterByTruthyValue */, 1, 433, 1, 434, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig filterByFalseyValue = { { 6779 /* filterByFalseyValue */, 1, 435, 1, 436, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig applySpecifiedTypes = { { 6814 /* applySpecifiedTypes */, 1, 437, 1, 438, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig respecifyRelationalFacts = { { 6853 /* respecifyRelationalFacts */, 1, 439, 1, 440, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig applySpecifiedTypesBatch = { { 6878 /* applySpecifiedTypesBatch */, 1, 441, 1, 442, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig processConditionalExpressionsAfterSpecifying = { { 6924 /* processConditionalExpressionsAfterSpecifying */, 1, 443, 1, 444, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig getConditionalExpressions = { { 6969 /* getConditionalExpressions */, 0, 445, 0, 445, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig addConditionalExpressions = { { 7024 /* addConditionalExpressions */, 2, 446, 2, 448, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig exitFirstLevelStatements = { { 7050 /* exitFirstLevelStatements */, 0, 449, 0, 449, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig isInFirstLevelStatement = { { 7075 /* isInFirstLevelStatement */, 0, 450, 0, 450, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig mergeWith = { { 7154 /* mergeWith */, 1, 451, 3, 454, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig completeOffsetWriteBases = { { 7230 /* completeOffsetWriteBases */, 5, 455, 5, 460, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig completeOffsetWriteBase = { { 7280 /* completeOffsetWriteBase */, 4, 461, 4, 465, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig collectAbsorbedClosures = { { 7316 /* collectAbsorbedClosures */, 2, 466, 2, 468, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig mergeWithVariableState = { { 7340 /* mergeWithVariableState */, 3, 469, 3, 472, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig findMergedCallCandidates = { { 7409 /* findMergedCallCandidates */, 2, 473, 2, 475, ZEND_ACC_PRIVATE | ZEND_ACC_STATIC } }; -inline constexpr sigtab::Sig hasNarrowableArgument = { { 7530 /* hasNarrowableArgument */, 1, 476, 1, 477, ZEND_ACC_PRIVATE | ZEND_ACC_STATIC } }; -inline constexpr sigtab::Sig findUninformativeMergedCalls = { { 7581 /* findUninformativeMergedCalls */, 2, 478, 2, 480, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig withoutPreciseClassConstantFetches = { { 7650 /* withoutPreciseClassConstantFetches */, 3, 481, 3, 484, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig preserveVacuousConditionalExpressions = { { 7765 /* preserveVacuousConditionalExpressions */, 4, 485, 4, 489, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig isAboutCall = { { 7848 /* isAboutCall */, 1, 490, 1, 491, ZEND_ACC_PRIVATE | ZEND_ACC_STATIC } }; -inline constexpr sigtab::Sig mergeSameGuardConditionalExpressions = { { 7914 /* mergeSameGuardConditionalExpressions */, 3, 492, 3, 495, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig mergeConditionalExpressions = { { 8008 /* mergeConditionalExpressions */, 2, 496, 2, 498, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig mergeInitializedProperties = { { 8054 /* mergeInitializedProperties */, 1, 499, 1, 500, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig processFinallyScope = { { 8115 /* processFinallyScope */, 2, 501, 2, 503, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig processFinallyScopeVariableTypeHolders = { { 8213 /* processFinallyScopeVariableTypeHolders */, 3, 504, 3, 507, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig processClosureScope = { { 8285 /* processClosureScope */, 3, 508, 3, 511, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig processAlwaysIterableForeachScopeWithoutPollute = { { 8316 /* processAlwaysIterableForeachScopeWithoutPollute */, 1, 512, 1, 513, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig forgetLoopWrittenVariables = { { 8385 /* forgetLoopWrittenVariables */, 1, 514, 1, 515, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig forgetChangedLoopVariables = { { 8426 /* forgetChangedLoopVariables */, 2, 516, 2, 518, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig getChangedVariableNames = { { 8453 /* getChangedVariableNames */, 1, 519, 1, 520, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig generalizeIteratedType = { { 8490 /* generalizeIteratedType */, 2, 521, 2, 523, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig generalizeWith = { { 8550 /* generalizeWith */, 1, 524, 3, 527, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig generalizeWithVariableState = { { 8565 /* generalizeWithVariableState */, 3, 528, 3, 531, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig withoutWidenedConditionalExpressions = { { 8620 /* withoutWidenedConditionalExpressions */, 3, 532, 3, 535, ZEND_ACC_PRIVATE | ZEND_ACC_STATIC } }; -inline constexpr sigtab::Sig generalizeVariableTypeHolders = { { 8727 /* generalizeVariableTypeHolders */, 4, 536, 4, 540, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig flattenUnionForGeneralization = { { 8757 /* flattenUnionForGeneralization */, 1, 541, 1, 542, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig generalizeType = { { 8807 /* generalizeType */, 3, 543, 4, 547, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig generalizeConstantFloats = { { 8840 /* generalizeConstantFloats */, 4, 548, 4, 552, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig generalizeShapesKeyByKey = { { 8875 /* generalizeShapesKeyByKey */, 5, 553, 5, 558, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig pairShapes = { { 8900 /* pairShapes */, 2, 559, 2, 561, ZEND_ACC_PRIVATE | ZEND_ACC_STATIC } }; -inline constexpr sigtab::Sig getRequiredKeysSignature = { { 8957 /* getRequiredKeysSignature */, 1, 562, 1, 563, ZEND_ACC_PRIVATE | ZEND_ACC_STATIC } }; -inline constexpr sigtab::Sig getArrayDepth = { { 8982 /* getArrayDepth */, 1, 564, 1, 565, ZEND_ACC_PRIVATE | ZEND_ACC_STATIC } }; -inline constexpr sigtab::Sig equals = { { 8996 /* equals */, 1, 566, 1, 567, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig compareConditionalExpressions = { { 9031 /* compareConditionalExpressions */, 2, 568, 2, 570, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig compareVariableTypeHolders = { { 9061 /* compareVariableTypeHolders */, 2, 571, 2, 573, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig canAccessProperty = { { 9145 /* canAccessProperty */, 1, 574, 1, 575, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig canReadProperty = { { 9209 /* canReadProperty */, 1, 576, 1, 577, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig canWriteProperty = { { 9225 /* canWriteProperty */, 1, 578, 1, 579, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig canCallMethod = { { 9295 /* canCallMethod */, 1, 580, 1, 581, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig canAccessConstant = { { 9371 /* canAccessConstant */, 1, 582, 1, 583, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig canAccessClassMember = { { 9452 /* canAccessClassMember */, 1, 584, 1, 585, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig debug = { { 9473 /* debug */, 0, 586, 0, 586, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig filterTypeWithMethod = { { 9505 /* filterTypeWithMethod */, 2, 587, 2, 589, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig getMethodReflection = { { 9570 /* getMethodReflection */, 2, 590, 2, 592, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig getNakedMethod = { { 9590 /* getNakedMethod */, 2, 593, 2, 595, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig getPropertyReflection = { { 9622 /* getPropertyReflection */, 2, 596, 2, 598, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig getInstancePropertyReflection = { { 9644 /* getInstancePropertyReflection */, 2, 599, 2, 601, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig getStaticPropertyReflection = { { 9674 /* getStaticPropertyReflection */, 2, 602, 2, 604, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig getConstantReflection = { { 9732 /* getConstantReflection */, 2, 605, 2, 607, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig getConstantExplicitTypeFromConfig = { { 9767 /* getConstantExplicitTypeFromConfig */, 2, 608, 2, 610, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig getConstantTypes = { { 9801 /* getConstantTypes */, 0, 611, 0, 611, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig getGlobalConstantType = { { 9818 /* getGlobalConstantType */, 1, 612, 1, 613, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig createGlobalConstantFetches = { { 9851 /* createGlobalConstantFetches */, 3, 614, 3, 617, ZEND_ACC_PRIVATE | ZEND_ACC_STATIC } }; -inline constexpr sigtab::Sig getNativeConstantTypes = { { 9879 /* getNativeConstantTypes */, 0, 618, 0, 618, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig getIterableKeyType = { { 9902 /* getIterableKeyType */, 1, 619, 1, 620, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig getIterableValueType = { { 9921 /* getIterableValueType */, 1, 621, 1, 622, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig getPhpVersion = { { 9966 /* getPhpVersion */, 0, 623, 0, 623, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig resolvePhpVersion = { { 9980 /* resolvePhpVersion */, 0, 624, 0, 624, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig getConfiguredPhpVersionRange = { { 9998 /* getConfiguredPhpVersionRange */, 0, 625, 0, 625, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig isOverallPhpVersionRange = { { 10027 /* isOverallPhpVersionRange */, 1, 626, 1, 627, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig invokeNodeCallback = { { 10067 /* invokeNodeCallback */, 1, 628, 1, 629, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig emitCollectedData = { { 10105 /* emitCollectedData */, 2, 630, 2, 632, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig trackValueDependency = { { 10138 /* trackValueDependency */, 2, 633, 2, 635, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig trackFileDependency = { { 10164 /* trackFileDependency */, 1, 636, 1, 637, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig trackDirectoryDependency = { { 10206 /* trackDirectoryDependency */, 1, 638, 2, 640, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig trackClassDependency = { { 10231 /* trackClassDependency */, 1, 641, 1, 642, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig isInvokedWhereCreated = { { 4797 /* isInvokedWhereCreated */, 1, 250, 1, 251, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig containsMutablePropertyFetch = { { 4819 /* containsMutablePropertyFetch */, 1, 252, 1, 253, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig invalidateMutablePropertyFetches = { { 4848 /* invalidateMutablePropertyFetches */, 1, 254, 1, 255, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig invalidateMutablePropertyFetchConditionalExpressions = { { 4881 /* invalidateMutablePropertyFetchConditionalExpressions */, 1, 256, 1, 257, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig expressionTypeIsUnchangeable = { { 4983 /* expressionTypeIsUnchangeable */, 1, 258, 1, 259, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig invalidateStaticExpressions = { { 5012 /* invalidateStaticExpressions */, 1, 260, 1, 261, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig enterArrowFunction = { { 5088 /* enterArrowFunction */, 2, 262, 3, 265, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig enterArrowFunctionWithoutReflection = { { 5107 /* enterArrowFunctionWithoutReflection */, 3, 266, 3, 269, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig isParameterValueNullable = { { 5164 /* isParameterValueNullable */, 1, 270, 1, 271, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig getFunctionType = { { 5211 /* getFunctionType */, 3, 272, 3, 275, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig getCallableParameterType = { { 5233 /* getCallableParameterType */, 3, 276, 3, 279, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig buildVariadicArrayTypeFromCallableParameters = { { 5269 /* buildVariadicArrayTypeFromCallableParameters */, 2, 280, 2, 282, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig intersectButNotNever = { { 5338 /* intersectButNotNever */, 2, 283, 2, 285, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC } }; +inline constexpr sigtab::Sig enterMatch = { { 5410 /* enterMatch */, 3, 286, 3, 289, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig enterForeach = { { 5491 /* enterForeach */, 7, 290, 7, 297, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig enterForeachKey = { { 5504 /* enterForeachKey */, 5, 298, 5, 303, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig enterCatchType = { { 5530 /* enterCatchType */, 2, 304, 2, 306, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig enterExpressionAssign = { { 5558 /* enterExpressionAssign */, 1, 307, 2, 309, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig exitExpressionAssign = { { 5580 /* exitExpressionAssign */, 1, 310, 1, 311, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig isInExpressionAssign = { { 5601 /* isInExpressionAssign */, 1, 312, 1, 313, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig isInWriteExpressionAssign = { { 5622 /* isInWriteExpressionAssign */, 1, 314, 1, 315, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig setAllowedUndefinedExpression = { { 5648 /* setAllowedUndefinedExpression */, 1, 316, 1, 317, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig unsetAllowedUndefinedExpression = { { 5678 /* unsetAllowedUndefinedExpression */, 1, 318, 1, 319, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig isUndefinedExpressionAllowed = { { 5710 /* isUndefinedExpressionAllowed */, 1, 320, 1, 321, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig assignVariable = { { 5775 /* assignVariable */, 4, 322, 5, 327, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig overwriteExpression = { { 5790 /* overwriteExpression */, 3, 328, 3, 331, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig resolveIntertwinedAssignedType = { { 5862 /* resolveIntertwinedAssignedType */, 5, 332, 5, 337, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig isDimFetchPathReachable = { { 5936 /* isDimFetchPathReachable */, 2, 338, 2, 340, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig unsetExpression = { { 5960 /* unsetExpression */, 1, 341, 1, 342, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig getStateType = { { 5976 /* getStateType */, 1, 343, 1, 344, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig getScopeStateType = { { 5989 /* getScopeStateType */, 1, 345, 1, 346, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig getScopeStateNativeType = { { 6007 /* getScopeStateNativeType */, 1, 347, 1, 348, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig resolveScopeStateType = { { 6031 /* resolveScopeStateType */, 2, 349, 2, 351, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig specifyExpressionType = { { 6053 /* specifyExpressionType */, 4, 352, 4, 356, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig openSpecificationScope = { { 6075 /* openSpecificationScope */, 0, 357, 0, 357, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig isSpecifyExpressionTypeNoop = { { 6098 /* isSpecifyExpressionTypeNoop */, 2, 358, 2, 360, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig specifyExpressionTypeInPlace = { { 6158 /* specifyExpressionTypeInPlace */, 4, 361, 6, 367, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig assignExpression = { { 6187 /* assignExpression */, 3, 368, 3, 371, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig specifyAssignedExpressionType = { { 6204 /* specifyAssignedExpressionType */, 3, 372, 3, 375, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig assignInitializedProperty = { { 6248 /* assignInitializedProperty */, 2, 376, 2, 378, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig invalidateExpression = { { 6380 /* invalidateExpression */, 1, 379, 5, 384, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig assignObjectAlias = { { 6401 /* assignObjectAlias */, 2, 385, 3, 388, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig assignNarrowedFrom = { { 6419 /* assignNarrowedFrom */, 2, 389, 2, 391, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig holdsSameObject = { { 6448 /* holdsSameObject */, 2, 392, 2, 394, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig specifyObjectAlias = { { 6476 /* specifyObjectAlias */, 3, 395, 3, 398, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig getObjectAliasRootVariableName = { { 6495 /* getObjectAliasRootVariableName */, 1, 399, 1, 400, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig getObjectAliasEdges = { { 6526 /* getObjectAliasEdges */, 0, 401, 0, 401, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig getPropertyFetchChainPrefixes = { { 6558 /* getPropertyFetchChainPrefixes */, 2, 402, 2, 404, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig findObjectAliasClass = { { 6594 /* findObjectAliasClass */, 2, 405, 2, 407, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig findObjectAliasInvalidationTargets = { { 6615 /* findObjectAliasInvalidationTargets */, 3, 408, 3, 411, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig reconnectObjectAliases = { { 6658 /* reconnectObjectAliases */, 2, 412, 2, 414, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig invalidateExpressionWithoutAliases = { { 6681 /* invalidateExpressionWithoutAliases */, 5, 415, 5, 420, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig isPrivatePropertyOfDifferentClass = { { 6716 /* isPrivatePropertyOfDifferentClass */, 2, 421, 2, 423, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig invalidateMethodsOnExpression = { { 6750 /* invalidateMethodsOnExpression */, 1, 424, 1, 425, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig setExpressionCertaintyKeepingType = { { 6780 /* setExpressionCertaintyKeepingType */, 2, 426, 2, 428, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig removeArraysWithoutOffsetValueType = { { 6846 /* removeArraysWithoutOffsetValueType */, 3, 429, 3, 432, ZEND_ACC_PRIVATE | ZEND_ACC_STATIC } }; +inline constexpr sigtab::Sig isComplexUnionType = { { 6881 /* isComplexUnionType */, 1, 433, 1, 434, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig addTypeToExpression = { { 6900 /* addTypeToExpression */, 2, 435, 2, 437, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig removeTypeFromExpression = { { 6933 /* removeTypeFromExpression */, 2, 438, 2, 440, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig filterByTruthyValue = { { 6958 /* filterByTruthyValue */, 1, 441, 1, 442, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig filterByFalseyValue = { { 6978 /* filterByFalseyValue */, 1, 443, 1, 444, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig applySpecifiedTypes = { { 7013 /* applySpecifiedTypes */, 1, 445, 1, 446, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig respecifyRelationalFacts = { { 7052 /* respecifyRelationalFacts */, 1, 447, 1, 448, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig applySpecifiedTypesBatch = { { 7077 /* applySpecifiedTypesBatch */, 1, 449, 1, 450, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig processConditionalExpressionsAfterSpecifying = { { 7123 /* processConditionalExpressionsAfterSpecifying */, 1, 451, 1, 452, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig getConditionalExpressions = { { 7168 /* getConditionalExpressions */, 0, 453, 0, 453, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig addConditionalExpressions = { { 7223 /* addConditionalExpressions */, 2, 454, 2, 456, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig exitFirstLevelStatements = { { 7249 /* exitFirstLevelStatements */, 0, 457, 0, 457, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig isInFirstLevelStatement = { { 7274 /* isInFirstLevelStatement */, 0, 458, 0, 458, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig mergeWith = { { 7353 /* mergeWith */, 1, 459, 3, 462, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig completeOffsetWriteBases = { { 7429 /* completeOffsetWriteBases */, 5, 463, 5, 468, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig completeOffsetWriteBase = { { 7479 /* completeOffsetWriteBase */, 4, 469, 4, 473, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig collectAbsorbedClosures = { { 7515 /* collectAbsorbedClosures */, 2, 474, 2, 476, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig mergeWithVariableState = { { 7539 /* mergeWithVariableState */, 3, 477, 3, 480, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig findMergedCallCandidates = { { 7608 /* findMergedCallCandidates */, 2, 481, 2, 483, ZEND_ACC_PRIVATE | ZEND_ACC_STATIC } }; +inline constexpr sigtab::Sig hasNarrowableArgument = { { 7729 /* hasNarrowableArgument */, 1, 484, 1, 485, ZEND_ACC_PRIVATE | ZEND_ACC_STATIC } }; +inline constexpr sigtab::Sig findUninformativeMergedCalls = { { 7780 /* findUninformativeMergedCalls */, 2, 486, 2, 488, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig withoutPreciseClassConstantFetches = { { 7849 /* withoutPreciseClassConstantFetches */, 3, 489, 3, 492, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig preserveVacuousConditionalExpressions = { { 7964 /* preserveVacuousConditionalExpressions */, 4, 493, 4, 497, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig isAboutCall = { { 8047 /* isAboutCall */, 1, 498, 1, 499, ZEND_ACC_PRIVATE | ZEND_ACC_STATIC } }; +inline constexpr sigtab::Sig mergeSameGuardConditionalExpressions = { { 8113 /* mergeSameGuardConditionalExpressions */, 3, 500, 3, 503, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig mergeConditionalExpressions = { { 8207 /* mergeConditionalExpressions */, 2, 504, 2, 506, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig mergeInitializedProperties = { { 8253 /* mergeInitializedProperties */, 1, 507, 1, 508, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig processFinallyScope = { { 8314 /* processFinallyScope */, 2, 509, 2, 511, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig processFinallyScopeVariableTypeHolders = { { 8412 /* processFinallyScopeVariableTypeHolders */, 3, 512, 3, 515, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig processClosureScope = { { 8484 /* processClosureScope */, 3, 516, 3, 519, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig processAlwaysIterableForeachScopeWithoutPollute = { { 8515 /* processAlwaysIterableForeachScopeWithoutPollute */, 1, 520, 1, 521, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig forgetLoopWrittenVariables = { { 8584 /* forgetLoopWrittenVariables */, 1, 522, 1, 523, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig forgetChangedLoopVariables = { { 8625 /* forgetChangedLoopVariables */, 2, 524, 2, 526, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig getChangedVariableNames = { { 8652 /* getChangedVariableNames */, 1, 527, 1, 528, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig generalizeIteratedType = { { 8689 /* generalizeIteratedType */, 2, 529, 2, 531, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig generalizeWith = { { 8749 /* generalizeWith */, 1, 532, 3, 535, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig generalizeWithVariableState = { { 8764 /* generalizeWithVariableState */, 3, 536, 3, 539, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig withoutWidenedConditionalExpressions = { { 8819 /* withoutWidenedConditionalExpressions */, 3, 540, 3, 543, ZEND_ACC_PRIVATE | ZEND_ACC_STATIC } }; +inline constexpr sigtab::Sig generalizeVariableTypeHolders = { { 8926 /* generalizeVariableTypeHolders */, 4, 544, 4, 548, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig flattenUnionForGeneralization = { { 8956 /* flattenUnionForGeneralization */, 1, 549, 1, 550, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig generalizeType = { { 9006 /* generalizeType */, 3, 551, 4, 555, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig generalizeConstantFloats = { { 9039 /* generalizeConstantFloats */, 4, 556, 4, 560, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig generalizeShapesKeyByKey = { { 9074 /* generalizeShapesKeyByKey */, 5, 561, 5, 566, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig pairShapes = { { 9099 /* pairShapes */, 2, 567, 2, 569, ZEND_ACC_PRIVATE | ZEND_ACC_STATIC } }; +inline constexpr sigtab::Sig getRequiredKeysSignature = { { 9156 /* getRequiredKeysSignature */, 1, 570, 1, 571, ZEND_ACC_PRIVATE | ZEND_ACC_STATIC } }; +inline constexpr sigtab::Sig getArrayDepth = { { 9181 /* getArrayDepth */, 1, 572, 1, 573, ZEND_ACC_PRIVATE | ZEND_ACC_STATIC } }; +inline constexpr sigtab::Sig equals = { { 9195 /* equals */, 1, 574, 1, 575, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig compareConditionalExpressions = { { 9230 /* compareConditionalExpressions */, 2, 576, 2, 578, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig compareVariableTypeHolders = { { 9260 /* compareVariableTypeHolders */, 2, 579, 2, 581, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig canAccessProperty = { { 9344 /* canAccessProperty */, 1, 582, 1, 583, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig canReadProperty = { { 9408 /* canReadProperty */, 1, 584, 1, 585, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig canWriteProperty = { { 9424 /* canWriteProperty */, 1, 586, 1, 587, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig canCallMethod = { { 9494 /* canCallMethod */, 1, 588, 1, 589, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig canAccessConstant = { { 9570 /* canAccessConstant */, 1, 590, 1, 591, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig canAccessClassMember = { { 9651 /* canAccessClassMember */, 1, 592, 1, 593, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig debug = { { 9672 /* debug */, 0, 594, 0, 594, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig filterTypeWithMethod = { { 9704 /* filterTypeWithMethod */, 2, 595, 2, 597, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig getMethodReflection = { { 9769 /* getMethodReflection */, 2, 598, 2, 600, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig getNakedMethod = { { 9789 /* getNakedMethod */, 2, 601, 2, 603, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig getPropertyReflection = { { 9821 /* getPropertyReflection */, 2, 604, 2, 606, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig getInstancePropertyReflection = { { 9843 /* getInstancePropertyReflection */, 2, 607, 2, 609, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig getStaticPropertyReflection = { { 9873 /* getStaticPropertyReflection */, 2, 610, 2, 612, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig getConstantReflection = { { 9931 /* getConstantReflection */, 2, 613, 2, 615, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig getConstantExplicitTypeFromConfig = { { 9966 /* getConstantExplicitTypeFromConfig */, 2, 616, 2, 618, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig getConstantTypes = { { 10000 /* getConstantTypes */, 0, 619, 0, 619, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig getGlobalConstantType = { { 10017 /* getGlobalConstantType */, 1, 620, 1, 621, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig createGlobalConstantFetches = { { 10050 /* createGlobalConstantFetches */, 3, 622, 3, 625, ZEND_ACC_PRIVATE | ZEND_ACC_STATIC } }; +inline constexpr sigtab::Sig getNativeConstantTypes = { { 10078 /* getNativeConstantTypes */, 0, 626, 0, 626, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig getIterableKeyType = { { 10101 /* getIterableKeyType */, 1, 627, 1, 628, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig getIterableValueType = { { 10120 /* getIterableValueType */, 1, 629, 1, 630, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig getPhpVersion = { { 10165 /* getPhpVersion */, 0, 631, 0, 631, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig resolvePhpVersion = { { 10179 /* resolvePhpVersion */, 0, 632, 0, 632, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig getConfiguredPhpVersionRange = { { 10197 /* getConfiguredPhpVersionRange */, 0, 633, 0, 633, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig isOverallPhpVersionRange = { { 10226 /* isOverallPhpVersionRange */, 1, 634, 1, 635, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig invokeNodeCallback = { { 10266 /* invokeNodeCallback */, 1, 636, 1, 637, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig emitCollectedData = { { 10304 /* emitCollectedData */, 2, 638, 2, 640, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig trackValueDependency = { { 10337 /* trackValueDependency */, 2, 641, 2, 643, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig trackFileDependency = { { 10363 /* trackFileDependency */, 1, 644, 1, 645, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig trackDirectoryDependency = { { 10405 /* trackDirectoryDependency */, 1, 646, 2, 648, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig trackClassDependency = { { 10430 /* trackClassDependency */, 1, 649, 1, 650, ZEND_ACC_PUBLIC } }; } // namespace sig } // namespace ptdecl::MutatingScope diff --git a/turbo-ext/tests/parser-visitors.php b/turbo-ext/tests/parser-visitors.php index 3e2796fab25..442b5effdc8 100644 --- a/turbo-ext/tests/parser-visitors.php +++ b/turbo-ext/tests/parser-visitors.php @@ -27,6 +27,7 @@ 'ArrayOffsetNormalizingVisitor', 'ArrayWalkArgVisitor', 'ArrowFunctionArgVisitor', + 'CallbackArgVisitor', 'ClosureArgVisitor', 'ClosureBindArgVisitor', 'ClosureBindToVarVisitor', @@ -72,6 +73,13 @@ array_filter($a, ?); array_find(?, $cb); array_map($cb, ?); array_map(?, $a, ...); array_map($cb, $a, ...);', ' $x)(?, 2); $c->bindTo(?); Closure::bind($c, ?);', + // closures and arrow functions written as arguments of every kind of call, + // and the ones that are not (nested in another expression, partial + // function applications) + ' 1, $x); $o->m(fn () => 1); $o?->m(function () {}); C::m(fn () => 1); + new C(function () {}); f(cb: fn () => 1); f(...[fn () => 1]); f([fn () => 1]); f($g = fn () => 1); + f(fn () => g(fn () => 1)); f(?, fn () => 1); $o->m(fn () => 1, ...); f(...);', + // closures and arrow functions called where they are written ' $x)(1); (fn () => 1)(); ($f = fn ($x) => $x)(2);', diff --git a/turbo-ext/tests/scope-family.php b/turbo-ext/tests/scope-family.php index c125b414b5e..c940853ae37 100644 --- a/turbo-ext/tests/scope-family.php +++ b/turbo-ext/tests/scope-family.php @@ -676,8 +676,12 @@ public function exprRef(Node\Expr $expr): mixed $sfVersionScope = $sfScopeFactory->create(\PHPStan\Analyser\ScopeContext::create($sfFile)->enterClass($sfReflectionProvider->getClass(\ScopeFamilyFixture\Holder::class))) ->assignExpression(new \PhpParser\Node\Expr\ConstFetch(new \PhpParser\Node\Name('PHP_VERSION_ID')), new \PHPStan\Type\Constant\ConstantIntegerType($sfVersionId), new \PHPStan\Type\IntegerType()) // $this for isReadonlyPropertyFetch() over the readonly Holder::$name - ->assignVariable('this', new \PHPStan\Type\ObjectType(\ScopeFamilyFixture\Holder::class), new \PHPStan\Type\ObjectType(\ScopeFamilyFixture\Holder::class), \PHPStan\TrinaryLogic::createYes()); - $sfScopes[spl_object_id($sfVersionScope)] = [$sfVersionScope, [new \PhpParser\Node\Expr\ConstFetch(new \PhpParser\Node\Name('PHP_VERSION_ID'))], null]; + ->assignVariable('this', new \PHPStan\Type\ObjectType(\ScopeFamilyFixture\Holder::class), new \PHPStan\Type\ObjectType(\ScopeFamilyFixture\Holder::class), \PHPStan\TrinaryLogic::createYes()) + // a narrowed readonly and a narrowed mutable property: an arrow function + // that does not run where it is written keeps only the readonly one + ->assignExpression($sfVersionReadonlyFetch = new \PhpParser\Node\Expr\PropertyFetch(new \PhpParser\Node\Expr\Variable('this'), 'name'), new \PHPStan\Type\Constant\ConstantStringType('n'), new \PHPStan\Type\StringType()) + ->assignExpression($sfVersionMutableFetch = new \PhpParser\Node\Expr\PropertyFetch(new \PhpParser\Node\Expr\Variable('this'), 'counter'), new \PHPStan\Type\Constant\ConstantIntegerType(1), new \PHPStan\Type\IntegerType()); + $sfScopes[spl_object_id($sfVersionScope)] = [$sfVersionScope, [new \PhpParser\Node\Expr\ConstFetch(new \PhpParser\Node\Name('PHP_VERSION_ID')), $sfVersionReadonlyFetch, $sfVersionMutableFetch], null]; } // a scope whose tables carry types built on each side's own classes: under // the prefix a PHP twin Type's describe() rejects the native VerbosityLevel @@ -1272,6 +1276,9 @@ public function exprRef(Node\Expr $expr): mixed ]), 'uses' => [], 'stmts' => []]); $sfProbeArrowFunction = new \PhpParser\Node\Expr\ArrowFunction(['params' => $sfProbeClosureParams, 'expr' => new \PhpParser\Node\Expr\Variable('a')]); $sfProbeStaticArrowFunction = new \PhpParser\Node\Expr\ArrowFunction(['static' => true, 'params' => $sfProbeClosureParams, 'expr' => new \PhpParser\Node\Expr\Variable('a')]); +// runs where it is written, so it keeps the narrowed property fetches without +// asking isReadonlyPropertyFetch() (see $sfTracksPhpVersionId) +$sfProbeImmediatelyInvokedArrowFunction = new \PhpParser\Node\Expr\ArrowFunction(['params' => $sfProbeClosureParams, 'expr' => new \PhpParser\Node\Expr\Variable('a')], [\PHPStan\Parser\ImmediatelyInvokedClosureVisitor::ATTRIBUTE_NAME => true]); $sfProbeVariadicArrowFunction = new \PhpParser\Node\Expr\ArrowFunction(['params' => array_merge($sfProbeClosureParams, [ new \PhpParser\Node\Param(new \PhpParser\Node\Expr\Variable('rest'), null, new \PhpParser\Node\Identifier('string'), false, true), ]), 'expr' => new \PhpParser\Node\Expr\Variable('a')]); @@ -1801,6 +1808,7 @@ public function exprRef(Node\Expr $expr): mixed 'enterArrowFunctionWithoutReflection(static)' => static fn () => $scope->enterArrowFunctionWithoutReflection($sfProbeStaticArrowFunction, null, null), 'enterArrowFunctionWithoutReflection(callable params)' => static fn () => $scope->enterArrowFunctionWithoutReflection($sfProbeArrowFunction, [$sfPushParameter], null), 'enterArrowFunctionWithoutReflection(variadic callable params)' => static fn () => $scope->enterArrowFunctionWithoutReflection($sfProbeVariadicArrowFunction, [$sfPushParameter, $sfPushVariadicParameter], null), + 'enterArrowFunctionWithoutReflection(immediately invoked)' => static fn () => $scope->enterArrowFunctionWithoutReflection($sfProbeImmediatelyInvokedArrowFunction, null, null), // the ClosureTypeResolver's MutatingScope parameter is the real // class name: these two cross the prefix type barrier 'enterAnonymousFunction' => static fn () => $scope->enterAnonymousFunction($sfProbeClosure, null), @@ -2232,6 +2240,7 @@ public function exprRef(Node\Expr $expr): mixed foreach ($chainingRuns as $label => $fn) { if ( str_starts_with($label, 'enterAnonymousFunctionWithoutReflection') + || (str_starts_with($label, 'enterArrowFunction') && $label !== 'enterArrowFunctionWithoutReflection(immediately invoked)') || str_starts_with($label, 'invalidateExpression(') ) { unset($chainingRuns[$label]); diff --git a/turbo-ext/tests/smoke.php b/turbo-ext/tests/smoke.php index 1f76020192c..f3bb89aa9b7 100644 --- a/turbo-ext/tests/smoke.php +++ b/turbo-ext/tests/smoke.php @@ -641,6 +641,7 @@ public function enterNode(\PhpParser\Node $node) $covered[\PHPStan\Parser\ArrayOffsetNormalizingVisitor::class] = true; $covered[\PHPStan\Parser\ArrayWalkArgVisitor::class] = true; $covered[\PHPStan\Parser\ArrowFunctionArgVisitor::class] = true; +$covered[\PHPStan\Parser\CallbackArgVisitor::class] = true; $covered[\PHPStan\Parser\ClosureArgVisitor::class] = true; $covered[\PHPStan\Parser\ClosureBindArgVisitor::class] = true; $covered[\PHPStan\Parser\ClosureBindToVarVisitor::class] = true; From 34daf8201f2506976fa2bc5b9cc6620619fe443b Mon Sep 17 00:00:00 2001 From: "ondrej@mirtes.cz" Date: Mon, 30 Nov 2026 09:45:54 +0000 Subject: [PATCH 2/4] Add regression tests for closures over properties reassigned before the call The issue bot found these reproducers changed by forgetting narrowed mutable properties in closures that may run later: an arrow function now sees the same property type as the equivalent closure, and a captured object's property narrowed to array{} is no longer empty inside a closure invoked after the property changed. Amp-Thread-ID: https://ampcode.com/threads/T-01a22b9a-ea57-769d-966d-00063668bb3b --- tests/PHPStan/Analyser/nsrt/bug-12912.php | 36 ++++++++++++ tests/PHPStan/Analyser/nsrt/bug-13563.php | 56 +++++++++++++++++++ .../Rules/Arrays/DeadForeachRuleTest.php | 6 ++ tests/PHPStan/Rules/Arrays/data/bug-10345.php | 20 +++++++ .../PHPStan/Rules/Arrays/data/bug-10345b.php | 19 +++++++ .../Rules/Variables/NullCoalesceRuleTest.php | 6 ++ .../Rules/Variables/data/bug-13563.php | 56 +++++++++++++++++++ 7 files changed, 199 insertions(+) create mode 100644 tests/PHPStan/Analyser/nsrt/bug-12912.php create mode 100644 tests/PHPStan/Analyser/nsrt/bug-13563.php create mode 100644 tests/PHPStan/Rules/Arrays/data/bug-10345.php create mode 100644 tests/PHPStan/Rules/Arrays/data/bug-10345b.php create mode 100644 tests/PHPStan/Rules/Variables/data/bug-13563.php diff --git a/tests/PHPStan/Analyser/nsrt/bug-12912.php b/tests/PHPStan/Analyser/nsrt/bug-12912.php new file mode 100644 index 00000000000..f517fe170ae --- /dev/null +++ b/tests/PHPStan/Analyser/nsrt/bug-12912.php @@ -0,0 +1,36 @@ += 8.1 + +declare(strict_types = 1); + +namespace Bug12912; + +use function PHPStan\Testing\assertType; + +class Foo +{ + protected Bar $foo = Bar::Yes; + + public function foo(): void + { + if($this->foo === Bar::No) { + return; + } + + assertType('Bug12912\Bar::Yes', $this->foo); + + $this->wrap(fn() => assertType('Bug12912\Bar', $this->foo)); + + $this->wrap(function() { assertType('Bug12912\Bar', $this->foo); }); + } + + public function wrap(callable $callback): void + { + $callback(); + } +} + +enum Bar: string +{ + case Yes = 'yes'; + case No = 'no'; +} diff --git a/tests/PHPStan/Analyser/nsrt/bug-13563.php b/tests/PHPStan/Analyser/nsrt/bug-13563.php new file mode 100644 index 00000000000..a325b3e2b20 --- /dev/null +++ b/tests/PHPStan/Analyser/nsrt/bug-13563.php @@ -0,0 +1,56 @@ += 7.4 + +declare(strict_types = 1); + +namespace Bug13563; + +use Closure; +use DateTime; +use function PHPStan\Testing\assertType; + +class Invoker +{ + /** + * @var array + */ + private array $callbacks = []; + + public function willReturnCallback(string $method, callable $callback): void + { + $this->callbacks[$method] = Closure::fromCallable($callback); + } + + public function doSomethingToReadProperty(string $method): ?Closure + { + return $this->callbacks[$method] ?? null; + } +} + +class MyTest +{ + /** + * @var array + */ + private array $dates = []; + + /** + * @var array + */ + private array $propNotCleared = []; + + public function setUp(): void + { + $invoker = new Invoker(); + $this->dates = []; + assertType('array{}', $this->dates); + $invoker->willReturnCallback('get', fn (int $id) => assertType('array', $this->dates)); + $invoker->willReturnCallback('get', function (int $id) { + assertType('array', $this->dates); + }); + assertType('array', $this->propNotCleared); + $invoker->willReturnCallback('get', fn (int $id) => assertType('array', $this->propNotCleared)); + $invoker->willReturnCallback('get', function (int $id) { + assertType('array', $this->propNotCleared); + }); + } +} diff --git a/tests/PHPStan/Rules/Arrays/DeadForeachRuleTest.php b/tests/PHPStan/Rules/Arrays/DeadForeachRuleTest.php index cad638997f0..aa0399bcea8 100644 --- a/tests/PHPStan/Rules/Arrays/DeadForeachRuleTest.php +++ b/tests/PHPStan/Rules/Arrays/DeadForeachRuleTest.php @@ -65,6 +65,12 @@ public function testBug8056(): void $this->analyse([__DIR__ . '/data/bug-8056.php'], []); } + public function testBug10345(): void + { + $this->analyse([__DIR__ . '/data/bug-10345.php'], []); + $this->analyse([__DIR__ . '/data/bug-10345b.php'], []); + } + public function testBug15147(): void { $this->analyse([__DIR__ . '/data/bug-15147.php'], []); diff --git a/tests/PHPStan/Rules/Arrays/data/bug-10345.php b/tests/PHPStan/Rules/Arrays/data/bug-10345.php new file mode 100644 index 00000000000..c29fd377d78 --- /dev/null +++ b/tests/PHPStan/Rules/Arrays/data/bug-10345.php @@ -0,0 +1,20 @@ +items = []; + +$func = function() use ($container): int { + foreach ($container->items as $item) {} + return 1; +}; + +$container->items[] = '1'; + +$a = $func(); + diff --git a/tests/PHPStan/Rules/Arrays/data/bug-10345b.php b/tests/PHPStan/Rules/Arrays/data/bug-10345b.php new file mode 100644 index 00000000000..b41a76785f5 --- /dev/null +++ b/tests/PHPStan/Rules/Arrays/data/bug-10345b.php @@ -0,0 +1,19 @@ +items = []; + +$func = function() use ($container): void { + foreach ($container->items as $item) {} +}; + +$container->items[] = '1'; + +$func(); + diff --git a/tests/PHPStan/Rules/Variables/NullCoalesceRuleTest.php b/tests/PHPStan/Rules/Variables/NullCoalesceRuleTest.php index f68d9c15874..3ba9c552573 100644 --- a/tests/PHPStan/Rules/Variables/NullCoalesceRuleTest.php +++ b/tests/PHPStan/Rules/Variables/NullCoalesceRuleTest.php @@ -732,6 +732,12 @@ public function testReadonlyPropertyOnNullableReceiver(): void ]); } + #[RequiresPhp('>= 7.4.0')] + public function testBug13563(): void + { + $this->analyse([__DIR__ . '/data/bug-13563.php'], []); + } + public function testBug15194(): void { $this->analyse([__DIR__ . '/data/bug-15194.php'], []); diff --git a/tests/PHPStan/Rules/Variables/data/bug-13563.php b/tests/PHPStan/Rules/Variables/data/bug-13563.php new file mode 100644 index 00000000000..ab54ea24635 --- /dev/null +++ b/tests/PHPStan/Rules/Variables/data/bug-13563.php @@ -0,0 +1,56 @@ += 7.4 + +declare(strict_types = 1); + +namespace Bug13563Rule; + +use Closure; +use DateTime; + +class Invoker +{ + /** + * @var array + */ + private array $callbacks = []; + + public function willReturnCallback(string $method, callable $callback): void + { + $this->callbacks[$method] = Closure::fromCallable($callback); + } + + public function doSomethingToReadProperty(string $method): ?Closure + { + return $this->callbacks[$method] ?? null; + } +} + +class MyTest +{ + /** + * @var array + */ + private array $dates = []; + + /** + * @var array + */ + private array $propNotCleared = []; + + public function setUp(): void + { + $invoker = new Invoker(); + $this->dates = []; + $invoker->willReturnCallback('get1', fn (int $id): ?DateTime => $this->dates[$id] ?? null); + $invoker->willReturnCallback('get2', function (int $id): ?DateTime { + return $this->dates[$id] ?? null; + }); + $invoker->willReturnCallback('get3', fn (int $id): ?DateTime => $this->propNotCleared[$id] ?? null); + $invoker->willReturnCallback('get4', function (int $id): ?DateTime { + return $this->propNotCleared[$id] ?? null; + }); + $invoker->willReturnCallback('update', function (int $id, DateTime $date) { + $this->dates[$id] = $date; + }); + } +} From a6ac69c2617d5bf15c64b4eedbf306291b57d7f3 Mon Sep 17 00:00:00 2001 From: "ondrej@mirtes.cz" Date: Thu, 3 Dec 2026 11:34:08 +0000 Subject: [PATCH 3/4] Walk closure bodies only in ClosureProcessor ClosureTypeResolver::getClosureType() walked a closure or arrow function body on its own, with its own scope entry and depth guard, for MutatingScope::getType(), on-demand argument types, FuncCallHandler, ClosureParameterResolver and the by-reference use fixpoint. Those callers now ask ClosureProcessor::getClosureType(), so ClosureProcessor is the only code that walks a body; ClosureTypeResolver returns the declared signature, reads cached types and builds them from a walk. Every walk enters through ClosureProcessor::enterWhereInvoked(), which forgets narrowed mutable properties unless the function runs where it is written: invoked immediately, or passed to a parameter that calls it during the call, decided like callCallbackImmediately(). ArgumentsHandler marks callback arguments for it, replacing CallbackArgVisitor. Closures now keep narrowed properties of $this on entry like arrow functions, so both get the same result. The observation pass over a function body runs outside bleeding edge too. Its frame resolves template arguments, infers closure signatures and static variables only with the unresolvedTemplateArguments toggle. Amp-Thread-ID: https://ampcode.com/threads/T-01a22b9a-ea57-769d-966d-00063668bb3b --- src/Analyser/ArgumentsHandler.php | 14 +- src/Analyser/ClosureProcessor.php | 225 ++- src/Analyser/ExprHandler/FuncCallHandler.php | 2 +- .../Helper/ClosureParameterResolver.php | 12 +- .../Helper/ClosureTypeResolver.php | 299 +-- .../Helper/ClosureWalkTemplateTypes.php | 2 +- .../Generics/TemplateArgumentFrame.php | 15 + src/Analyser/MutatingScope.php | 104 +- src/Analyser/StatementsHandler.php | 16 +- src/Parser/CallbackArgVisitor.php | 40 - tests/PHPStan/Analyser/nsrt/bug-12912.php | 31 + tests/PHPStan/Analyser/nsrt/bug-13321.php | 2 +- turbo-ext/src/ArgumentsHandler.cpp | 26 +- turbo-ext/src/CallbackArgVisitor.cpp | 96 - turbo-ext/src/ClosureParameterResolver.cpp | 25 +- turbo-ext/src/ClosureProcessor.cpp | 298 ++- turbo-ext/src/ClosureTypeResolver.cpp | 529 ++--- turbo-ext/src/FuncCallHandler.cpp | 2 +- turbo-ext/src/MutatingScope.cpp | 176 +- turbo-ext/src/StatementsHandler.cpp | 17 +- turbo-ext/src/TemplateArgumentFrame.cpp | 46 +- turbo-ext/src/generated/CallbackArgVisitor.h | 44 - .../src/generated/ClosureParameterResolver.h | 104 +- turbo-ext/src/generated/ClosureProcessor.h | 242 ++- turbo-ext/src/generated/ClosureTypeResolver.h | 400 ++-- turbo-ext/src/generated/MutatingScope.h | 1763 +++++++++-------- .../src/generated/TemplateArgumentFrame.h | 141 +- turbo-ext/src/support.h | 26 +- turbo-ext/tests/parser-visitors.php | 8 - turbo-ext/tests/scope-family.php | 11 +- turbo-ext/tests/smoke.php | 1 - 31 files changed, 2434 insertions(+), 2283 deletions(-) delete mode 100644 src/Parser/CallbackArgVisitor.php delete mode 100644 turbo-ext/src/CallbackArgVisitor.cpp delete mode 100644 turbo-ext/src/generated/CallbackArgVisitor.h diff --git a/src/Analyser/ArgumentsHandler.php b/src/Analyser/ArgumentsHandler.php index 99b0f2fbbed..4ec58728726 100644 --- a/src/Analyser/ArgumentsHandler.php +++ b/src/Analyser/ArgumentsHandler.php @@ -250,7 +250,7 @@ public function processArgs( } $gatheredArgTypeByIndex[$i] = $solvedClosureTypes[$i] ?? $this->gatherClosureArgType($parametersAcceptors, $i, $arg->value, $scope, $gatheredTypes); } else { - $gatheredArgTypeByIndex[$i] = $this->closureTypeResolver->getClosureType($scope, $arg->value, true, $storage); + $gatheredArgTypeByIndex[$i] = $this->closureTypeResolver->getShallowClosureType($scope, $arg->value, $storage); } $this->addGatheredArgType($gatheredTypes, $gatheredUnpack, $gatheredHasName, $originalArgForGather, $i, $gatheredArgTypeByIndex[$i]); } @@ -362,6 +362,10 @@ public function processArgs( $scopeToPass = $closureBindScopeFactory($scope); } + if ($arg->value instanceof Expr\Closure || $arg->value instanceof Expr\ArrowFunction) { + ClosureProcessor::markCallbackArgument($arg->value, $this->callCallbackImmediately($parameter, $parameterType, $calleeReflection)); + } + if ($arg->value instanceof Expr\Closure) { $storedClosureArgResult = null; @@ -381,8 +385,8 @@ public function processArgs( isAlwaysTerminating: false, throwPoints: [], impurePoints: [], - type: $this->closureTypeResolver->getClosureType($scopeToPass, $arg->value, false, $storage), - nativeType: $this->closureTypeResolver->getClosureType($scopeToPass->doNotTreatPhpDocTypesAsCertain(), $arg->value, false, $storage), + type: $this->closureProcessor->getClosureType($scopeToPass, $arg->value, $storage), + nativeType: $this->closureProcessor->getClosureType($scopeToPass->doNotTreatPhpDocTypesAsCertain(), $arg->value, $storage), typeCallback: null, specifyTypesCallback: SpecifiedTypes::emptySpecifyCallback(), ); @@ -531,8 +535,8 @@ public function processArgs( isAlwaysTerminating: false, throwPoints: [], impurePoints: [], - type: $this->closureTypeResolver->getClosureType($scopeToPass, $arg->value, false, $storage), - nativeType: $this->closureTypeResolver->getClosureType($scopeToPass->doNotTreatPhpDocTypesAsCertain(), $arg->value, false, $storage), + type: $this->closureProcessor->getClosureType($scopeToPass, $arg->value, $storage), + nativeType: $this->closureProcessor->getClosureType($scopeToPass->doNotTreatPhpDocTypesAsCertain(), $arg->value, $storage), typeCallback: null, specifyTypesCallback: SpecifiedTypes::emptySpecifyCallback(), ); diff --git a/src/Analyser/ClosureProcessor.php b/src/Analyser/ClosureProcessor.php index d762a2abece..2924aea2aee 100644 --- a/src/Analyser/ClosureProcessor.php +++ b/src/Analyser/ClosureProcessor.php @@ -10,8 +10,10 @@ use PHPStan\Analyser\ExprHandler\ArrowFunctionHandler; use PHPStan\Analyser\ExprHandler\Helper\ClosureParameterResolver; use PHPStan\Analyser\ExprHandler\Helper\ClosureTypeResolver; +use PHPStan\Analyser\ExprHandler\Helper\ClosureWalkTemplateTypes; use PHPStan\Analyser\ExprHandler\Helper\ContextualClosureParameterResolver; use PHPStan\Analyser\Generics\ClosureSignatureInference; +use PHPStan\Analyser\Generics\TemplateArgumentStats; use PHPStan\Dependency\Dependencies; use PHPStan\DependencyInjection\AutowiredService; use PHPStan\DependencyInjection\Container; @@ -42,6 +44,7 @@ use function count; use function in_array; use function is_string; +use function spl_object_id; /** * Walks closure and arrow function bodies for NodeScopeResolver and builds @@ -103,6 +106,212 @@ private function processAttributeGroupsAndParams( ); } + /** + * Set by ArgumentsHandler on a closure or arrow function written as a call + * argument: whether the parameter calls it during the call - decided like + * ArgumentsHandler::callCallbackImmediately(), so an untagged method + * parameter needs @param-immediately-invoked-callable. + */ + private const INVOKED_DURING_CALL_ATTRIBUTE = 'phpstanInvokedDuringCall'; + + public static function markCallbackArgument(Expr\Closure|Expr\ArrowFunction $expr, bool $invokedDuringCall): void + { + $expr->setAttribute(self::INVOKED_DURING_CALL_ATTRIBUTE, $invokedDuringCall); + } + + /** + * The function's scope as it runs. It sees the objects it captures by + * handle, so a property narrowed where it is created can be reassigned + * before it runs - unless it runs right where it is written: invoked + * immediately, or passed to a parameter that calls it during the call. + * Every walk of the body enters through here. + */ + private static function enterWhereInvoked(MutatingScope $functionScope, Expr\Closure|Expr\ArrowFunction $expr): MutatingScope + { + if ( + $expr->getAttribute(ImmediatelyInvokedClosureVisitor::ATTRIBUTE_NAME) === true + || $expr->getAttribute(self::INVOKED_DURING_CALL_ATTRIBUTE) === true + ) { + return $functionScope; + } + + return $functionScope->forgetMutablePropertyFetches(); + } + + /** + * Guards the walks of getClosureType(): a closure whose body asks for its + * own type (use (&$self)) is answered with its signature from the second + * nested walk on. + */ + private static int $closureTypeWalkDepth = 0; + + /** + * Counts the closure types the depth guard answered without a walk. A + * walk that sees it change stored the types of nested closures it could + * not walk, so its return types are priced again on the scope once the + * guard is lower. + */ + private static int $cappedClosureTypeWalks = 0; + + /** + * The type of a closure or arrow function whose expression result is not + * stored: asked before its own walk stored it (its body asks for it, a + * callable parameter is derived from it while it is processed), priced + * for a call argument walked on demand, or typed for other parameter or + * by-ref use types than the ones it is written with. The body is walked + * here, without reporting anything - this is the only body walk besides + * processClosureNode()/processArrowFunctionNode(), so a closure is always + * entered the same way. + * + * $passedToType types the parameters like a callable parameter the closure + * is passed to does - FuncCallHandler passes the arguments of an invocation. + * $byRefUseTypes types variables the closure uses by reference, which the + * walk otherwise enters as mixed - resolveAssignedClosureType(). + * + * @param array $byRefUseTypes + */ + public function getClosureType( + MutatingScope $scope, + Expr\Closure|Expr\ArrowFunction $expr, + ?ExpressionResultStorage $storage = null, + ?Type $passedToType = null, + array $byRefUseTypes = [], + ): ClosureType + { + $templateSuffix = '@' . spl_object_id($expr); + [$passedToType, $nativePassedToType] = $this->closureTypeResolver->getWalkPassedToTypes($scope, $passedToType, $templateSuffix); + $cached = $this->closureTypeResolver->findCachedClosureType($scope, $expr, $storage, $passedToType, $nativePassedToType, $byRefUseTypes, $templateSuffix); + if ($cached !== null) { + return $cached; + } + if (self::$closureTypeWalkDepth >= 2) { + self::$cappedClosureTypeWalks++; + return $this->closureTypeResolver->getShallowClosureType($scope, $expr, $storage, $passedToType); + } + if (TemplateArgumentStats::$enabled) { + TemplateArgumentStats::increment('closureTypeBodyWalks'); + } + + $nodeScopeResolver = $this->container->getByType(NodeScopeResolver::class); + $parameterTypes = $this->contextualClosureParameterResolver->resolve($scope, $expr, $storage, $passedToType, $nativePassedToType); + $invalidateExpressions = []; + $impurePoints = []; + self::$closureTypeWalkDepth++; + $cappedBefore = self::$cappedClosureTypeWalks; + $walkStorage = new ExpressionResultStorage(); + if ($expr instanceof Expr\ArrowFunction) { + $arrowScope = self::enterWhereInvoked($scope->enterArrowFunctionWithoutReflection($expr, $parameterTypes->parameters, $parameterTypes->nativeParameters), $expr); + $arrowScope->pushExpressionResultStorage($walkStorage); + try { + $exprResult = $nodeScopeResolver->processExprNode( + new Node\Stmt\Expression($expr->expr), + $expr->expr, + $arrowScope, + $walkStorage, + self::createClosureTypeGatherer($arrowScope, $impurePoints, $invalidateExpressions), + ExpressionContext::createDeep(), + ); + } finally { + $arrowScope->popExpressionResultStorage(); + self::$closureTypeWalkDepth--; + } + + return ClosureWalkTemplateTypes::restore($this->closureTypeResolver->buildClosureTypeForArrowFunction( + $scope, + $expr, + $arrowScope, + array_map(static fn (InternalThrowPoint $throwPoint) => $throwPoint->toPublic(), $exprResult->getThrowPoints()), + array_merge($impurePoints, $exprResult->getImpurePoints()), + $invalidateExpressions, + false, + self::$cappedClosureTypeWalks === $cappedBefore ? $walkStorage : null, + $passedToType, + $nativePassedToType, + $byRefUseTypes, + ), $templateSuffix); + } + + $closureScope = self::enterWhereInvoked($scope->enterAnonymousFunctionWithoutReflection($expr, $parameterTypes->parameters, $parameterTypes->nativeParameters), $expr); + foreach ($byRefUseTypes as $name => $byRefUseType) { + $closureScope = $closureScope->assignVariable($name, $byRefUseType, $byRefUseType, TrinaryLogic::createYes()); + } + $returnStatements = []; + $yieldStatements = []; + $executionEnds = []; + $closureScope->pushExpressionResultStorage($walkStorage); + try { + $statementResult = $nodeScopeResolver->processStmtNodesInternal( + $expr, + $expr->stmts, + $closureScope, + $walkStorage, + self::createClosureTypeGatherer($closureScope, $impurePoints, $invalidateExpressions, $returnStatements, $yieldStatements, $executionEnds), + StatementContext::createTopLevel(), + ); + } finally { + $closureScope->popExpressionResultStorage(); + self::$closureTypeWalkDepth--; + } + + return ClosureWalkTemplateTypes::restore($this->closureTypeResolver->buildClosureTypeForClosure( + $scope, + $expr, + $returnStatements, + $yieldStatements, + $executionEnds, + $statementResult->getThrowPoints(), + array_merge($impurePoints, $statementResult->getImpurePoints()), + $invalidateExpressions, + false, + self::$cappedClosureTypeWalks === $cappedBefore ? $walkStorage : null, + $passedToType, + $nativePassedToType, + $byRefUseTypes, + ), $templateSuffix); + } + + /** + * The node callback of a getClosureType() walk: gathers what the closure + * type is built from, for nodes of the walked function only. + * + * @param ImpurePoint[] $impurePoints + * @param InvalidateExprNode[] $invalidateExpressions + * @param list $returnStatements + * @param list $yieldStatements + * @param list $executionEnds + * @return callable(Node, Scope): void + */ + private static function createClosureTypeGatherer(MutatingScope $functionScope, array &$impurePoints, array &$invalidateExpressions, array &$returnStatements = [], array &$yieldStatements = [], array &$executionEnds = []): callable + { + return static function (Node $node, Scope $scope) use ($functionScope, &$impurePoints, &$invalidateExpressions, &$returnStatements, &$yieldStatements, &$executionEnds): void { + if ($scope->getAnonymousFunctionReflection() !== $functionScope->getAnonymousFunctionReflection()) { + return; + } + if ($node instanceof InvalidateExprNode) { + $invalidateExpressions[] = $node; + return; + } + if ($node instanceof PropertyAssignNode) { + $impurePoints[] = new ImpurePoint($scope, $node, 'propertyAssign', 'property assignment', true); + $invalidateExpressions[] = new InvalidateExprNode($node->getPropertyFetch()); + return; + } + if ($node instanceof ExecutionEndNode) { + $executionEnds[] = $node; + return; + } + if ($node instanceof Return_) { + $returnStatements[] = [$node, $scope]; + return; + } + if (!$node instanceof Expr\Yield_ && !$node instanceof Expr\YieldFrom) { + return; + } + + $yieldStatements[] = [$node, $scope]; + }; + } + /** * @param callable(Node $node, Scope $scope): void $nodeCallback */ @@ -148,7 +357,7 @@ private function processClosureNodeInternal( // the closure's own body may invoke it (use (&$self)): its sites must // exist before the body is observed if ($this->closureSignatureInference->isObserving($scope)) { - $scope = $scope->addTemplateArgumentConstraints($this->closureSignatureInference->collectSites($scope, $this->closureTypeResolver->getClosureType($scope, $expr, true, $storage))); + $scope = $scope->addTemplateArgumentConstraints($this->closureSignatureInference->collectSites($scope, $this->closureTypeResolver->getShallowClosureType($scope, $expr, $storage))); } $useScope = $scope; @@ -228,7 +437,7 @@ private function processClosureNodeInternal( } $bodyNodeCallback = $byRefMode === 'local' ? new NoopNodeCallback() : $nodeCallback; - $closureScope = $scope->enterAnonymousFunction($expr, $callableParameters, $nativeCallableParameters); + $closureScope = self::enterWhereInvoked($scope->enterAnonymousFunction($expr, $callableParameters, $nativeCallableParameters), $expr); $closureScope = $closureScope->processClosureScope($byRefEntrySource, null, $byRefUses); $closureType = $closureScope->getAnonymousFunctionReflection(); if (!$closureType instanceof ClosureType) { @@ -359,7 +568,7 @@ private function processClosureNodeInternal( break; } - $closureScope = $scope->enterAnonymousFunction($expr, $callableParameters, $nativeCallableParameters); + $closureScope = self::enterWhereInvoked($scope->enterAnonymousFunction($expr, $callableParameters, $nativeCallableParameters), $expr); $closureScope = $closureScope->processClosureScope($intermediaryClosureScope, $prevScope, $byRefUses); if ($closureScope->equals($prevScope)) { @@ -605,7 +814,7 @@ public function processDeferredByRefClosureBody( $type = $byRefEntryTypes[$use->var->name]; $byRefSource = $byRefSource->assignVariable($use->var->name, $type, $type, TrinaryLogic::createYes()); } - $closureScope = $scope->enterAnonymousFunction($expr, $parameterTypes->parameters, $parameterTypes->nativeParameters)->processClosureScope($byRefSource, null, $byRefUses); + $closureScope = self::enterWhereInvoked($scope->enterAnonymousFunction($expr, $parameterTypes->parameters, $parameterTypes->nativeParameters), $expr)->processClosureScope($byRefSource, null, $byRefUses); $closureType = $closureScope->getAnonymousFunctionReflection(); if (!$closureType instanceof ClosureType) { throw new ShouldNotHappenException(); @@ -718,7 +927,7 @@ private function resolveAssignedClosureType(Expr $rightSideExpr, Expr\Closure $e $returnType = new NeverType(); for ($iteration = 0; $iteration < NodeScopeResolver::LOOP_SCOPE_ITERATIONS; $iteration++) { $seed = new ClosureType($type->getParameters(), $returnType, $type->isVariadic()); - $iterationType = $this->closureTypeResolver->getClosureType($scope, $expr, false, $scope->getCurrentExpressionResultStorage(), null, [$variableName => $seed]); + $iterationType = $this->getClosureType($scope, $expr, $scope->getCurrentExpressionResultStorage(), null, [$variableName => $seed]); $nextReturnType = TypeCombinator::union($returnType, $iterationType->getReturnType()); if ($nextReturnType->equals($returnType)) { return $iterationType; @@ -770,7 +979,7 @@ private function assignByRefUses(MutatingScope $scope, MutatingScope $source, ar /** * The closure scope was entered with a shallow reflection (parameters + - * declared return, no body walk - see ClosureTypeResolver::getClosureType() + * declared return, no body walk - see ClosureTypeResolver::getShallowClosureType() * with $shallow). Now that the single body walk has gathered the returns, * build the refined ClosureType from them (no second walk) and swap it onto * the scope the ClosureReturnStatementsNode fires with, so the return-type @@ -870,13 +1079,13 @@ public function processArrowFunctionNode( $callableParameters = $parameterTypes->parameters; $nativeCallableParameters = $parameterTypes->nativeParameters; [$expectedReturnType, $nativeExpectedReturnType] = $this->contextualClosureParameterResolver->resolveExpectedReturnTypes($scope, $expr, $passedToType, $nativePassedToType); - $arrowFunctionScope = $scope->enterArrowFunction($expr, $callableParameters, $nativeCallableParameters); + $arrowFunctionScope = self::enterWhereInvoked($scope->enterArrowFunction($expr, $callableParameters, $nativeCallableParameters), $expr); if ($arrowFunctionScope->getAnonymousFunctionReflection() === null) { throw new ShouldNotHappenException(); } // Gather the property-assign impure points and invalidate expressions the - // arrow function type needs (mirroring ClosureTypeResolver::getClosureType()), + // arrow function type needs (mirroring getClosureType()), // on top of the regular rule node callback, so the single body walk here // feeds ClosureTypeResolver::buildClosureTypeForArrowFunction(). $arrowFunctionImpurePoints = []; diff --git a/src/Analyser/ExprHandler/FuncCallHandler.php b/src/Analyser/ExprHandler/FuncCallHandler.php index 44e6f034454..2bf2633209c 100644 --- a/src/Analyser/ExprHandler/FuncCallHandler.php +++ b/src/Analyser/ExprHandler/FuncCallHandler.php @@ -1023,7 +1023,7 @@ private function resolveInvokedClosureType(NodeScopeResolver $nodeScopeResolver, } } - return $this->closureTypeResolver->getClosureType($creationResult->getBeforeScope(), $closure, false, $storage, new CallableType($callableParameters, new MixedType(), false)); + return $this->closureProcessor->getClosureType($creationResult->getBeforeScope(), $closure, $storage, new CallableType($callableParameters, new MixedType(), false)); } return null; diff --git a/src/Analyser/ExprHandler/Helper/ClosureParameterResolver.php b/src/Analyser/ExprHandler/Helper/ClosureParameterResolver.php index 67db5e96beb..8ecafb95c47 100644 --- a/src/Analyser/ExprHandler/Helper/ClosureParameterResolver.php +++ b/src/Analyser/ExprHandler/Helper/ClosureParameterResolver.php @@ -6,10 +6,12 @@ use PhpParser\Node; use PhpParser\Node\Expr; use PHPStan\Analyser\ClosureParameterTypes; +use PHPStan\Analyser\ClosureProcessor; use PHPStan\Analyser\ExpressionResultStorage; use PHPStan\Analyser\MutatingScope; use PHPStan\Analyser\NodeScopeResolver; use PHPStan\DependencyInjection\AutowiredService; +use PHPStan\DependencyInjection\Container; use PHPStan\Reflection\Native\NativeParameterReflection; use PHPStan\Reflection\ParameterReflection; use PHPStan\Turbo\ShadowedByTurboExtension; @@ -29,9 +31,13 @@ final class ClosureParameterResolver { + /** + * The ClosureProcessor is looked up: it resolves the parameters of the + * closures it walks through this class. + */ public function __construct( + private Container $container, private NodeScopeResolver $nodeScopeResolver, - private ClosureTypeResolver $closureTypeResolver, private ContextualClosureParameterResolver $contextualClosureParameterResolver, ) { @@ -61,7 +67,7 @@ public function resolve( * Resolves the type of an expression a callable parameter is derived from - * either the closure/arrow function whose acceptors describe the parameters, * or a call argument refining them. A closure/arrow function is resolved - * directly through ClosureTypeResolver (as Scope::getType() would), not by + * directly through ClosureProcessor::getClosureType() (as Scope::getType() would), not by * processing it on demand: createCallArgsParameters() runs while that very * closure is being processed, so on-demand processing would re-enter * ClosureProcessor::processClosureNodeInternal() endlessly. @@ -69,7 +75,7 @@ public function resolve( public function resolveCallableTypeForScope(Expr $expr, MutatingScope $scope): Type { if ($expr instanceof Expr\Closure || $expr instanceof Expr\ArrowFunction) { - return $this->closureTypeResolver->getClosureType($scope, $expr, false, $scope->getCurrentExpressionResultStorage()); + return $this->container->getByType(ClosureProcessor::class)->getClosureType($scope, $expr, $scope->getCurrentExpressionResultStorage()); } return $this->nodeScopeResolver->readTypeOfMaybeStored($expr, $scope); diff --git a/src/Analyser/ExprHandler/Helper/ClosureTypeResolver.php b/src/Analyser/ExprHandler/Helper/ClosureTypeResolver.php index bfab89236c8..830f6e863c3 100644 --- a/src/Analyser/ExprHandler/Helper/ClosureTypeResolver.php +++ b/src/Analyser/ExprHandler/Helper/ClosureTypeResolver.php @@ -9,22 +9,17 @@ use PhpParser\Node\Expr\Yield_; use PhpParser\Node\Expr\YieldFrom; use PhpParser\NodeFinder; -use PHPStan\Analyser\ExpressionContext; use PHPStan\Analyser\ExpressionResultStorage; use PHPStan\Analyser\Generics\ClosureSignatureInference; -use PHPStan\Analyser\Generics\TemplateArgumentStats; use PHPStan\Analyser\ImpurePoint; use PHPStan\Analyser\InternalThrowPoint; use PHPStan\Analyser\MutatingScope; -use PHPStan\Analyser\NodeScopeResolver; use PHPStan\Analyser\PerFileAnalysisResettable; use PHPStan\Analyser\Scope; -use PHPStan\Analyser\StatementContext; use PHPStan\Analyser\ThrowPoint; use PHPStan\DependencyInjection\AutowiredService; use PHPStan\Node\ExecutionEndNode; use PHPStan\Node\InvalidateExprNode; -use PHPStan\Node\PropertyAssignNode; use PHPStan\Reflection\Callables\SimpleImpurePoint; use PHPStan\Reflection\Callables\SimpleThrowPoint; use PHPStan\Reflection\ExtendedParameterReflection; @@ -51,7 +46,6 @@ use function array_key_exists; use function array_keys; use function array_map; -use function array_merge; use function count; use function implode; use function in_array; @@ -65,16 +59,6 @@ final class ClosureTypeResolver implements PerFileAnalysisResettable private const PHPSTAN_FREE_VARIABLE_ROOTS_ATTRIBUTE = 'phpstanFreeVariableRoots'; - private static int $resolveClosureTypeDepth = 0; - - /** - * Counts the closure types the $resolveClosureTypeDepth guard answered - * without a walk. A body walk that sees it change stored the types of - * nested closures it could not walk, so its return types are priced again - * on the scope once the guard is lower. See readableWalkStorage(). - */ - private static int $cappedClosureTypeWalks = 0; - /** * Per-context resolved closure types, keyed by the closure node. Node * attributes would persist on the parser cache's retained ASTs after the @@ -93,7 +77,6 @@ final class ClosureTypeResolver implements PerFileAnalysisResettable private array $cachedTypes = []; public function __construct( - private NodeScopeResolver $nodeScopeResolver, private InitializerExprTypeResolver $initializerExprTypeResolver, private ContextualClosureParameterResolver $contextualClosureParameterResolver, private ClosureSignatureInference $closureSignatureInference, @@ -120,217 +103,95 @@ private function findCachedTypes(Node\Expr\Closure|ArrowFunction $expr): array } /** - * Resolves a closure/arrow function type by walking its body itself. Used by - * the paths that have NO prior walk to read return/yield types from - a - * closure asking its own type before its result is stored, and - * resolveCallableTypeForScope(). A self-by-ref closure legitimately re-walks - * here (the $resolveClosureTypeDepth guard answers that ask). - * - * Callers that have already walked the body (the closure/arrow handlers and - * the closure-as-call-arg store sites) feed the gathered returns/yields to - * buildClosureType() instead, which constructs the same ClosureType without - * a second walk. - * - * $passedToType types the parameters like a callable parameter the closure - * is passed to does - FuncCallHandler passes the arguments of an invocation. - * $byRefUseTypes types variables the closure uses by reference, which the - * walk otherwise enters as mixed - ClosureProcessor's fixed point of a - * closure calling itself through one. - * - * @param array $byRefUseTypes + * The closure's signature without walking its body: the parameters, typed + * like the callable parameter it is passed to, plus the DECLARED return + * type. Used at scope ENTRY (enterAnonymousFunction()/enterArrowFunction()) + * so entering a closure/arrow scope never walks the body - the refined + * return type is built afterwards from the body walk's gathered returns + * (see ClosureProcessor). */ - public function getClosureType( + public function getShallowClosureType( MutatingScope $scope, Node\Expr\Closure|ArrowFunction $expr, - bool $shallow = false, ?ExpressionResultStorage $storage = null, ?Type $passedToType = null, - array $byRefUseTypes = [], ): ClosureType { - $templateSuffix = '@' . spl_object_id($expr); - [$parameters, $isVariadic, $callableParameters, $nativeCallableParameters, $contextFree] = $this->buildParametersAndAcceptors($scope, $expr, $storage, $passedToType, null, $shallow ? null : $templateSuffix); - - // A shallow reflection is the closure/arrow function's signature without - // walking its body: parameters plus the DECLARED return type. Used at scope - // ENTRY (enterAnonymousFunction()/enterArrowFunction()) so entering a - // closure/arrow scope never re-walks the body - the refined return type is - // built afterwards from the single body walk's gathered returns and carried - // on the node/rule scope (see ClosureProcessor::processClosureNodeInternal() - // and processArrowFunctionNode()). - if ($shallow) { - return new ClosureType( - $parameters, - $scope->getFunctionType($expr->returnType, false, false), - $isVariadic, - isStatic: TrinaryLogic::createFromBoolean($expr->static), - ); - } - - $cachedTypes = $this->findCachedTypes($expr); - $cacheKey = $this->closureContextCacheKey($scope, $expr, $callableParameters, $parameters); - foreach ($byRefUseTypes as $name => $byRefUseType) { - $cacheKey .= '/&$' . $name . '=' . $byRefUseType->describe(VerbosityLevel::cache()); - } - if (array_key_exists($cacheKey, $cachedTypes)) { - return ClosureWalkTemplateTypes::restore($this->createClosureTypeFromCache($scope, $expr, $parameters, $isVariadic, $cachedTypes[$cacheKey], $contextFree), $templateSuffix); - } - if (self::$resolveClosureTypeDepth >= 2) { - self::$cappedClosureTypeWalks++; - return new ClosureType( - $parameters, - $scope->getFunctionType($expr->returnType, false, false), - $isVariadic, - isStatic: TrinaryLogic::createFromBoolean($expr->static), - ); - } - - if (TemplateArgumentStats::$enabled) { - TemplateArgumentStats::increment('closureTypeBodyWalks'); - } - if ($expr instanceof ArrowFunction) { - $arrowScope = $scope->enterArrowFunctionWithoutReflection($expr, $callableParameters, $nativeCallableParameters); - - $arrowFunctionImpurePoints = []; - $invalidateExpressions = []; - self::$resolveClosureTypeDepth++; - $cappedBefore = self::$cappedClosureTypeWalks; - $walkStorage = new ExpressionResultStorage(); - $arrowScope->pushExpressionResultStorage($walkStorage); - try { - $arrowFunctionExprResult = $this->nodeScopeResolver->processExprNode( - new Node\Stmt\Expression($expr->expr), - $expr->expr, - $arrowScope, - $walkStorage, - static function (Node $node, Scope $scope) use ($arrowScope, &$arrowFunctionImpurePoints, &$invalidateExpressions): void { - if ($scope->getAnonymousFunctionReflection() !== $arrowScope->getAnonymousFunctionReflection()) { - return; - } - - if ($node instanceof InvalidateExprNode) { - $invalidateExpressions[] = $node; - return; - } - - if (!$node instanceof PropertyAssignNode) { - return; - } - - $arrowFunctionImpurePoints[] = new ImpurePoint( - $scope, - $node, - 'propertyAssign', - 'property assignment', - true, - ); - $invalidateExpressions[] = new InvalidateExprNode($node->getPropertyFetch()); - }, - ExpressionContext::createDeep(), - ); - } finally { - $arrowScope->popExpressionResultStorage(); - self::$resolveClosureTypeDepth--; - } - $throwPoints = array_map(static fn ($throwPoint) => $throwPoint->toPublic(), $arrowFunctionExprResult->getThrowPoints()); - $impurePoints = array_merge($arrowFunctionImpurePoints, $arrowFunctionExprResult->getImpurePoints()); + [$parameters, $isVariadic] = $this->buildParametersAndAcceptors($scope, $expr, $storage, $passedToType); - // the body was processed just above; resolve the return type from its stored - // result rather than reading the still-unprocessed body expression - $returnType = $this->resolveArrowFunctionReturnType($scope, $arrowScope, $expr, false, self::readableWalkStorage($walkStorage, $cappedBefore)); + return new ClosureType( + $parameters, + $scope->getFunctionType($expr->returnType, false, false), + $isVariadic, + isStatic: TrinaryLogic::createFromBoolean($expr->static), + ); + } - return ClosureWalkTemplateTypes::restore($this->assembleClosureType($scope, $expr, $parameters, $isVariadic, $returnType, $throwPoints, $impurePoints, $invalidateExpressions, [], $cacheKey, $contextFree), $templateSuffix); + /** + * The type a body walk in the same context already built, see + * ClosureProcessor::getClosureType(). $passedToType is the one the walk + * types the parameters with, its templates renamed by $templateSuffix. + * + * @param array $byRefUseTypes + */ + public function findCachedClosureType( + MutatingScope $scope, + Node\Expr\Closure|ArrowFunction $expr, + ?ExpressionResultStorage $storage, + ?Type $passedToType, + ?Type $nativePassedToType, + array $byRefUseTypes, + string $templateSuffix, + ): ?ClosureType + { + [$parameters, $isVariadic, $callableParameters, , $contextFree] = $this->buildParametersAndAcceptors($scope, $expr, $storage, $passedToType, $nativePassedToType); + $cachedTypes = $this->findCachedTypes($expr); + $cacheKey = $this->closureContextCacheKey($scope, $expr, $callableParameters, $parameters) . self::byRefUseTypesCacheKeySuffix($byRefUseTypes); + if (!array_key_exists($cacheKey, $cachedTypes)) { + return null; } - self::$resolveClosureTypeDepth++; - $cappedBefore = self::$cappedClosureTypeWalks; + return ClosureWalkTemplateTypes::restore($this->createClosureTypeFromCache($scope, $expr, $parameters, $isVariadic, $cachedTypes[$cacheKey], $contextFree), $templateSuffix); + } - $closureScope = $scope->enterAnonymousFunctionWithoutReflection($expr, $callableParameters, $nativeCallableParameters); - foreach ($byRefUseTypes as $name => $byRefUseType) { - $closureScope = $closureScope->assignVariable($name, $byRefUseType, $byRefUseType, TrinaryLogic::createYes()); + /** + * The callable parameter type a body walk types the closure's parameters + * with: the one given, else the one of the call argument being walked - + * with the callee's templates renamed by $templateSuffix (see + * ClosureWalkTemplateTypes). + * + * @return array{?Type, ?Type} + */ + public function getWalkPassedToTypes(MutatingScope $scope, ?Type $passedToType, string $templateSuffix): array + { + $nativePassedToType = null; + $inFunctionCallsStackCount = count($scope->inFunctionCallsStack); + if ($passedToType === null && $inFunctionCallsStackCount > 0) { + [, $inParameter] = $scope->inFunctionCallsStack[$inFunctionCallsStackCount - 1]; + if ($inParameter !== null) { + $passedToType = $inParameter->getType(); + $nativePassedToType = $inParameter instanceof ExtendedParameterReflection ? $inParameter->getNativeType() : $inParameter->getType(); + } } - $closureReturnStatements = []; - $closureYieldStatements = []; - $closureExecutionEnds = []; - $closureImpurePoints = []; - $invalidateExpressions = []; - - try { - $walkStorage = new ExpressionResultStorage(); - $closureScope->pushExpressionResultStorage($walkStorage); - $closureStatementResult = $this->nodeScopeResolver->processStmtNodesInternal($expr, $expr->stmts, $closureScope, $walkStorage, static function (Node $node, Scope $scope) use ($closureScope, &$closureReturnStatements, &$closureYieldStatements, &$closureExecutionEnds, &$closureImpurePoints, &$invalidateExpressions): void { - if ($scope->getAnonymousFunctionReflection() !== $closureScope->getAnonymousFunctionReflection()) { - return; - } - - if ($node instanceof InvalidateExprNode) { - $invalidateExpressions[] = $node; - return; - } - - if ($node instanceof PropertyAssignNode) { - $closureImpurePoints[] = new ImpurePoint( - $scope, - $node, - 'propertyAssign', - 'property assignment', - true, - ); - $invalidateExpressions[] = new InvalidateExprNode($node->getPropertyFetch()); - return; - } - - if ($node instanceof ExecutionEndNode) { - $closureExecutionEnds[] = $node; - return; - } - - if ($node instanceof Node\Stmt\Return_) { - $closureReturnStatements[] = [$node, $scope]; - } - - if (!$node instanceof Yield_ && !$node instanceof YieldFrom) { - return; - } - - $closureYieldStatements[] = [$node, $scope]; - }, StatementContext::createTopLevel())->toPublic(); - } finally { - $closureScope->popExpressionResultStorage(); - self::$resolveClosureTypeDepth--; + if ($passedToType === null) { + return [null, null]; } - $throwPoints = $closureStatementResult->getThrowPoints(); - $impurePoints = array_merge($closureImpurePoints, $closureStatementResult->getImpurePoints()); - - return ClosureWalkTemplateTypes::restore($this->buildClosureTypeFromClosureWalk( - $scope, - $expr, - $parameters, - $isVariadic, - $closureReturnStatements, - $closureYieldStatements, - $closureExecutionEnds, - $throwPoints, - $impurePoints, - $invalidateExpressions, - $cacheKey, - false, - self::readableWalkStorage($walkStorage, $cappedBefore), - $contextFree, - ), $templateSuffix); + return [ + ClosureWalkTemplateTypes::rename($passedToType, $templateSuffix), + $nativePassedToType !== null ? ClosureWalkTemplateTypes::rename($nativePassedToType, $templateSuffix) : null, + ]; } - /** - * The walk's storage, or null when the depth guard answered a nested - * closure type during the walk. The stored types then hold the declared - * return types of the closures the walk could not reach, and reading - * the returns on the scope after the walk prices those closures with - * the guard one level lower. - */ - private static function readableWalkStorage(ExpressionResultStorage $walkStorage, int $cappedBefore): ?ExpressionResultStorage + /** @param array $byRefUseTypes */ + private static function byRefUseTypesCacheKeySuffix(array $byRefUseTypes): string { - return self::$cappedClosureTypeWalks === $cappedBefore ? $walkStorage : null; + $suffix = ''; + foreach ($byRefUseTypes as $name => $byRefUseType) { + $suffix .= '/&$' . $name . '=' . $byRefUseType->describe(VerbosityLevel::cache()); + } + + return $suffix; } /** @@ -345,6 +206,7 @@ private static function readableWalkStorage(ExpressionResultStorage $walkStorage * @param InternalThrowPoint[] $throwPoints the single body walk's internal throw points * @param ImpurePoint[] $impurePoints already merged (property-assign impure points + statement result impure points) * @param InvalidateExprNode[] $invalidateExpressions + * @param array $byRefUseTypes the types the walk entered the by-ref uses with, see ClosureProcessor::getClosureType() */ public function buildClosureTypeForClosure( MutatingScope $scope, @@ -359,6 +221,7 @@ public function buildClosureTypeForClosure( ?ExpressionResultStorage $storage = null, ?Type $passedToType = null, ?Type $nativePassedToType = null, + array $byRefUseTypes = [], ): ClosureType { [$parameters, $isVariadic, $callableParameters, $nativeCallableParameters, $contextFree] = $this->buildParametersAndAcceptors($scope, $expr, $storage, $passedToType, $nativePassedToType); @@ -382,7 +245,7 @@ public function buildClosureTypeForClosure( $expr, $native ? $nativeCallableParameters : $callableParameters, $parameters, - ), + ) . self::byRefUseTypesCacheKeySuffix($byRefUseTypes), $native, $storage, $contextFree, @@ -398,6 +261,7 @@ public function buildClosureTypeForClosure( * @param ThrowPoint[] $throwPoints * @param ImpurePoint[] $impurePoints already merged (property-assign impure points + expression result impure points) * @param InvalidateExprNode[] $invalidateExpressions + * @param array $byRefUseTypes */ public function buildClosureTypeForArrowFunction( MutatingScope $scope, @@ -410,6 +274,7 @@ public function buildClosureTypeForArrowFunction( ?ExpressionResultStorage $storage = null, ?Type $passedToType = null, ?Type $nativePassedToType = null, + array $byRefUseTypes = [], ): ClosureType { [$parameters, $isVariadic, $callableParameters, $nativeCallableParameters, $contextFree] = $this->buildParametersAndAcceptors($scope, $expr, $storage, $passedToType, $nativePassedToType); @@ -424,7 +289,7 @@ public function buildClosureTypeForArrowFunction( $expr, $native ? $nativeCallableParameters : $callableParameters, $parameters, - ), $contextFree); + ) . self::byRefUseTypesCacheKeySuffix($byRefUseTypes), $contextFree); } /** @@ -837,9 +702,6 @@ public function getDeclaredClosureType(MutatingScope $scope, Node\Expr\Closure|A * written - its signature is then inferred from its usages (see * ClosureSignatureInference) and the parameters reflect that. * - * A $templateSuffix renames the templates of the callable the closure is - * passed to for a body walk (see ClosureWalkTemplateTypes). - * * @return array{list, bool, ParameterReflection[]|null, ParameterReflection[]|null, bool} */ private function buildParametersAndAcceptors( @@ -848,7 +710,6 @@ private function buildParametersAndAcceptors( ?ExpressionResultStorage $storage = null, ?Type $passedToType = null, ?Type $nativePassedToType = null, - ?string $templateSuffix = null, ): array { [$parameters, $isVariadic] = $this->buildDeclaredParameters($scope, $expr); @@ -860,12 +721,6 @@ private function buildParametersAndAcceptors( $nativePassedToType = $inParameter instanceof ExtendedParameterReflection ? $inParameter->getNativeType() : $inParameter->getType(); } } - if ($templateSuffix !== null && $passedToType !== null) { - $passedToType = ClosureWalkTemplateTypes::rename($passedToType, $templateSuffix); - if ($nativePassedToType !== null) { - $nativePassedToType = ClosureWalkTemplateTypes::rename($nativePassedToType, $templateSuffix); - } - } $parameterTypes = $this->contextualClosureParameterResolver->resolve($scope, $expr, $storage, $passedToType, $nativePassedToType); $contextFree = $passedToType === null && !$this->contextualClosureParameterResolver->hasOwnContext($expr); if ($contextFree) { diff --git a/src/Analyser/ExprHandler/Helper/ClosureWalkTemplateTypes.php b/src/Analyser/ExprHandler/Helper/ClosureWalkTemplateTypes.php index 281f824d1d8..e2f19c034d1 100644 --- a/src/Analyser/ExprHandler/Helper/ClosureWalkTemplateTypes.php +++ b/src/Analyser/ExprHandler/Helper/ClosureWalkTemplateTypes.php @@ -16,7 +16,7 @@ /** * Gives the templates of the callable a closure is passed to a name of the - * closure's own while ClosureTypeResolver::getClosureType() walks the body. + * closure's own while ClosureProcessor::getClosureType() walks the body. * * The walk of a closure argument sees the callee's unresolved templates (the * `T` of `callable(T): U`), and the callee resolves them in the closure's diff --git a/src/Analyser/Generics/TemplateArgumentFrame.php b/src/Analyser/Generics/TemplateArgumentFrame.php index 1dd4743fc04..270f3d95a7d 100644 --- a/src/Analyser/Generics/TemplateArgumentFrame.php +++ b/src/Analyser/Generics/TemplateArgumentFrame.php @@ -80,10 +80,23 @@ public function __construct( private readonly array $byRefSites = [], private readonly array $staticVariableTypes = [], private readonly array $staticVariableConditionalExpressions = [], + private readonly bool $resolvesTemplateArguments = true, ) { } + /** + * Whether the body's template arguments are inferred from their usages + * (bidirectional type narrowing, the unresolvedTemplateArguments toggle). + * Every body is walked in two passes; without the toggle its frame is not + * visible as a template argument frame - see + * MutatingScope::getCurrentTemplateArgumentFrame(). + */ + public function resolvesTemplateArguments(): bool + { + return $this->resolvesTemplateArguments; + } + /** * @return array{Type, Type}|null */ @@ -131,6 +144,7 @@ public function withStaticVariableTypes(array $staticVariableTypes, array $state $this->byRefSites, $staticVariableTypes, $conditionalExpressions, + $this->resolvesTemplateArguments, ); } @@ -190,6 +204,7 @@ public function withObservedClosures(array $closureResolutions, array $closureSi byRefSites: $byRefSites, staticVariableTypes: $this->staticVariableTypes, staticVariableConditionalExpressions: $this->staticVariableConditionalExpressions, + resolvesTemplateArguments: $this->resolvesTemplateArguments, ); } diff --git a/src/Analyser/MutatingScope.php b/src/Analyser/MutatingScope.php index 2795e686908..7dc63fbc9df 100644 --- a/src/Analyser/MutatingScope.php +++ b/src/Analyser/MutatingScope.php @@ -46,8 +46,6 @@ use PHPStan\Node\IssetExpr; use PHPStan\Node\Printer\ExprPrinter; use PHPStan\Node\VirtualNode; -use PHPStan\Parser\CallbackArgVisitor; -use PHPStan\Parser\ImmediatelyInvokedClosureVisitor; use PHPStan\Php\PhpVersionFactory; use PHPStan\Php\PhpVersions; use PHPStan\PhpDoc\ResolvedPhpDocBlock; @@ -57,7 +55,6 @@ use PHPStan\Reflection\ClassMemberReflection; use PHPStan\Reflection\ClassReflection; use PHPStan\Reflection\ExtendedMethodReflection; -use PHPStan\Reflection\ExtendedParameterReflection; use PHPStan\Reflection\ExtendedParametersAcceptor; use PHPStan\Reflection\ExtendedPropertyReflection; use PHPStan\Reflection\FunctionReflection; @@ -1092,9 +1089,9 @@ private function resolveTypeOfNewWorldHandlerNode(Expr $node): Type // body walk asks for its type, and a callable parameter is derived from // it while it is being processed) and a closure passed as a call argument, // whose result NodeScopeResolver stores without an eager type. - // getClosureType()'s own depth guard answers the self-by-ref ask. + // ClosureProcessor::getClosureType()'s depth guard answers the self-by-ref ask. if ($node instanceof Expr\Closure || $node instanceof Expr\ArrowFunction) { - return $this->services->container->getByType(ClosureTypeResolver::class)->getClosureType($scope, $node, false, $storage); + return $this->services->container->getByType(ClosureProcessor::class)->getClosureType($scope, $node, $storage); } if (!$counterfactualAsk && $storage !== null && $storage->findExpressionResult($node) !== null) { @@ -1298,7 +1295,22 @@ public function withTemplateArgumentFrame(?TemplateArgumentFrame $frame): self return $scope; } + /** + * The frame of the body being walked when its template arguments are + * inferred from their usages - null without the unresolvedTemplateArguments + * toggle, whose bodies are still walked in two passes. + */ public function getCurrentTemplateArgumentFrame(): ?TemplateArgumentFrame + { + if ($this->templateArgumentFrame === null || !$this->templateArgumentFrame->resolvesTemplateArguments()) { + return null; + } + + return $this->templateArgumentFrame; + } + + /** The frame of the body being walked in two passes. */ + public function getCurrentBodyFrame(): ?TemplateArgumentFrame { return $this->templateArgumentFrame; } @@ -2504,7 +2516,7 @@ public function enterAnonymousFunction( ?array $nativeCallableParameters = null, ): self { - $anonymousFunctionReflection = $this->services->container->getByType(ClosureTypeResolver::class)->getClosureType($this, $closure, true, $this->getCurrentExpressionResultStorage()); + $anonymousFunctionReflection = $this->services->container->getByType(ClosureTypeResolver::class)->getShallowClosureType($this, $closure, $this->getCurrentExpressionResultStorage()); $scope = $this->enterAnonymousFunctionWithoutReflection($closure, $callableParameters, $nativeCallableParameters); @@ -2589,7 +2601,6 @@ public function enterAnonymousFunctionWithoutReflection( $nativeTypes[$paramExprString] = ExpressionTypeHolder::createYes($use->var, $variableNativeType); } - $isInvokedWhereCreated = $this->isInvokedWhereCreated($closure); $nonStaticExpressions = $this->invalidateStaticExpressions($this->expressionTypes); foreach ($nonStaticExpressions as $exprString => $typeHolder) { $expr = $typeHolder->getExpr(); @@ -2612,10 +2623,6 @@ public function enterAnonymousFunctionWithoutReflection( } } - if (!$isInvokedWhereCreated && $this->containsMutablePropertyFetch($expr)) { - continue; - } - $expressionTypes[$exprString] = $typeHolder; } @@ -2631,7 +2638,13 @@ public function enterAnonymousFunctionWithoutReflection( continue; } - if (!$this->isReadonlyPropertyFetch($expr, true)) { + // properties of $this, readonly or not; ClosureProcessor forgets + // the mutable ones when the closure may run later + $fetchedOn = $expr; + while ($fetchedOn instanceof PropertyFetch && $fetchedOn->name instanceof Node\Identifier) { + $fetchedOn = $fetchedOn->var; + } + if (!$fetchedOn instanceof Variable || $fetchedOn->name !== 'this') { continue; } @@ -2683,34 +2696,32 @@ public function enterAnonymousFunctionWithoutReflection( } /** - * A captured object is shared with the closure, so its properties can be - * reassigned between the closure's creation and its invocation - unless - * it runs right where it is written: immediately invoked, or passed to a - * parameter that calls it during the call (as ArgumentsHandler decides). + * Forgets what is known about properties that can be reassigned (not + * readonly), and the conditional narrowings involving them - see + * ClosureProcessor::enterWhereInvoked(). */ - private function isInvokedWhereCreated(Expr\Closure|Expr\ArrowFunction $function): bool + public function forgetMutablePropertyFetches(): self { - if ($function->getAttribute(ImmediatelyInvokedClosureVisitor::ATTRIBUTE_NAME) === true) { - return true; - } - - if ($function->getAttribute(CallbackArgVisitor::ATTRIBUTE_NAME) !== true || $this->inFunctionCallsStack === []) { - return false; - } - - [$calleeReflection, $parameter] = $this->inFunctionCallsStack[count($this->inFunctionCallsStack) - 1]; - if ($parameter === null) { - return false; - } - - if ($parameter instanceof ExtendedParameterReflection) { - $isImmediatelyInvoked = $parameter->isImmediatelyInvokedCallable(); - if (!$isImmediatelyInvoked->maybe()) { - return $isImmediatelyInvoked->yes(); - } - } - - return $calleeReflection instanceof FunctionReflection && TypeUtils::findCallableType($parameter->getType()) !== null; + return $this->scopeFactory->create( + $this->context, + $this->isDeclareStrictTypes(), + $this->getFunction(), + $this->getNamespace(), + $this->invalidateMutablePropertyFetches($this->expressionTypes), + $this->invalidateMutablePropertyFetches($this->nativeExpressionTypes), + $this->invalidateMutablePropertyFetchConditionalExpressions($this->conditionalExpressions), + $this->inClosureBindScopeClasses, + $this->anonymousFunctionReflection, + $this->isInFirstLevelStatement(), + $this->currentlyAssignedExpressions, + $this->currentlyAllowedUndefinedExpressions, + $this->inFunctionCallsStack, + $this->afterExtractCall, + $this->parentScope, + $this->nativeTypesPromoted, + $this->templateArgumentFrame, + $this->templateArgumentConstraints, + ); } private function containsMutablePropertyFetch(Expr $expr): bool @@ -2819,7 +2830,7 @@ private function invalidateStaticExpressions(array $expressionTypes): array */ public function enterArrowFunction(Expr\ArrowFunction $arrowFunction, ?array $callableParameters, ?array $nativeCallableParameters = null): self { - $anonymousFunctionReflection = $this->services->container->getByType(ClosureTypeResolver::class)->getClosureType($this, $arrowFunction, true, $this->getCurrentExpressionResultStorage()); + $anonymousFunctionReflection = $this->services->container->getByType(ClosureTypeResolver::class)->getShallowClosureType($this, $arrowFunction, $this->getCurrentExpressionResultStorage()); $scope = $this->enterArrowFunctionWithoutReflection($arrowFunction, $callableParameters, $nativeCallableParameters); @@ -2872,23 +2883,14 @@ public function enterArrowFunctionWithoutReflection(Expr\ArrowFunction $arrowFun $arrowFunctionScope = $arrowFunctionScope->invalidateExpression(new Variable('this')); } - $expressionTypes = $this->invalidateStaticExpressions($arrowFunctionScope->expressionTypes); - $nativeExpressionTypes = $arrowFunctionScope->nativeExpressionTypes; - $conditionalExpressions = $arrowFunctionScope->conditionalExpressions; - if (!$this->isInvokedWhereCreated($arrowFunction)) { - $expressionTypes = $this->invalidateMutablePropertyFetches($expressionTypes); - $nativeExpressionTypes = $this->invalidateMutablePropertyFetches($nativeExpressionTypes); - $conditionalExpressions = $this->invalidateMutablePropertyFetchConditionalExpressions($conditionalExpressions); - } - return $this->scopeFactory->create( $arrowFunctionScope->context, $this->isDeclareStrictTypes(), $arrowFunctionScope->getFunction(), $arrowFunctionScope->getNamespace(), - $expressionTypes, - $nativeExpressionTypes, - $conditionalExpressions, + $this->invalidateStaticExpressions($arrowFunctionScope->expressionTypes), + $arrowFunctionScope->nativeExpressionTypes, + $arrowFunctionScope->conditionalExpressions, $arrowFunctionScope->inClosureBindScopeClasses, new ClosureType(), true, diff --git a/src/Analyser/StatementsHandler.php b/src/Analyser/StatementsHandler.php index ba21bf67abc..6769a0a17ad 100644 --- a/src/Analyser/StatementsHandler.php +++ b/src/Analyser/StatementsHandler.php @@ -408,7 +408,6 @@ public function doProcessStmtNodes( if ( $shouldCheckLastStatement && $stmtCount > 0 - && $this->unresolvedTemplateArguments && $context->shouldResolveTemplateArguments() ) { return $this->processBodyStmtNodesTwoPass($nodeScopeResolver, $parentNode, $stmts, $scope, $storage, $nodeCallback, $context); @@ -803,14 +802,15 @@ private function readEndStatementExprResult(Node\Stmt $stmt, ExpressionResultSto } /** - * A function-like body under the unresolvedTemplateArguments toggle is - * walked in two passes. The observation pass walks every statement + * A function-like body is walked in two passes. The observation pass walks every statement * recording rule-facing emissions and threading immutable constraints * through the scopes returned by expressions and statements. A body that * created no unresolved template argument simply replays the recording. * Otherwise TemplateArgumentResolver builds a new resolved frame for the * second pass, which re-walks only the statements the resolutions can * influence. Recorded scopes retain their original collection context. + * Without the unresolvedTemplateArguments toggle, the body's frame only + * collects what the second pass needs besides the template arguments. * * The outer gatherer frames (the method's return statements, execution * ends, impure points) are suspended during the observation pass and fed @@ -833,9 +833,9 @@ private function processBodyStmtNodesTwoPass( foreach ($stmts as $stmt) { $statementStartTokenPositions[] = $stmt->getStartTokenPos(); } - $parentFrame = $scope->getCurrentTemplateArgumentFrame(); + $parentFrame = $scope->getCurrentBodyFrame(); $parentConstraints = $scope->getTemplateArgumentConstraints(); - $frame = new TemplateArgumentFrame($parentFrame, closureSignatureBody: $parentNode, closureSignatureStmts: $stmts); + $frame = new TemplateArgumentFrame($parentFrame, closureSignatureBody: $parentNode, closureSignatureStmts: $stmts, resolvesTemplateArguments: $this->unresolvedTemplateArguments); if (TemplateArgumentStats::$enabled) { TemplateArgumentStats::increment('bodiesWalked'); TemplateArgumentStats::increment('statementsTotal', count($stmts)); @@ -863,7 +863,7 @@ private function processBodyStmtNodesTwoPass( $stmtCount = count($stmts); $entries[$stmtCount] = [clone $state, $recording->count()]; $constraints = $state->scope->getTemplateArgumentConstraints() ?? TemplateArgumentConstraints::createEmpty(); - $staticSites = $this->staticVariableInference->getSites($parentNode, $stmts); + $staticSites = $this->unresolvedTemplateArguments ? $this->staticVariableInference->getSites($parentNode, $stmts) : []; $staticVariableTypes = []; $staticVariableConditionalExpressions = []; $staticStatementIndexes = []; @@ -874,7 +874,9 @@ private function processBodyStmtNodesTwoPass( } [$staticVariableTypes, $staticVariableConditionalExpressions, $constraints, $staticWalk] = $this->inferStaticVariableTypes($nodeScopeResolver, $parentNode, $stmts, $staticSites, $staticStatementIndexes, $parentFrame, $entries, $recording, $storage, $observationContext); } - $frame = $this->templateArgumentResolver->resolve($constraints, $parentFrame, $statementStartTokenPositions, $parentNode, $stmts); + $frame = $this->unresolvedTemplateArguments + ? $this->templateArgumentResolver->resolve($constraints, $parentFrame, $statementStartTokenPositions, $parentNode, $stmts) + : new TemplateArgumentFrame($parentFrame, [], closureSignatureBody: $parentNode, closureSignatureStmts: $stmts, resolvesTemplateArguments: false); if ($staticVariableTypes !== []) { $frame = $frame->withStaticVariableTypes($staticVariableTypes, $staticStatementIndexes, $staticVariableConditionalExpressions); } diff --git a/src/Parser/CallbackArgVisitor.php b/src/Parser/CallbackArgVisitor.php deleted file mode 100644 index fc001cda2d6..00000000000 --- a/src/Parser/CallbackArgVisitor.php +++ /dev/null @@ -1,40 +0,0 @@ -isPartialFunctionApplication()) { - return null; - } - - foreach ($node->getArgs() as $arg) { - if (!$arg->value instanceof Node\Expr\Closure && !$arg->value instanceof Node\Expr\ArrowFunction) { - continue; - } - - $arg->value->setAttribute(self::ATTRIBUTE_NAME, true); - } - - return null; - } - -} diff --git a/tests/PHPStan/Analyser/nsrt/bug-12912.php b/tests/PHPStan/Analyser/nsrt/bug-12912.php index f517fe170ae..284448b81ab 100644 --- a/tests/PHPStan/Analyser/nsrt/bug-12912.php +++ b/tests/PHPStan/Analyser/nsrt/bug-12912.php @@ -29,6 +29,37 @@ public function wrap(callable $callback): void } } +class ImmediatelyInvoked +{ + protected Bar $foo = Bar::Yes; + + public function foo(): void + { + if($this->foo === Bar::No) { + return; + } + + assertType('Bug12912\Bar::Yes', $this->foo); + + Wrapper::wrap(fn() => assertType('Bug12912\Bar::Yes', $this->foo)); + + Wrapper::wrap(function() { assertType('Bug12912\Bar::Yes', $this->foo); }); + + assertType('Bug12912\Bar::Yes', $this->foo); + } +} + +class Wrapper +{ + /** + * @param-immediately-invoked-callable $callback + */ + public static function wrap(callable $callback): void + { + $callback(); + } +} + enum Bar: string { case Yes = 'yes'; diff --git a/tests/PHPStan/Analyser/nsrt/bug-13321.php b/tests/PHPStan/Analyser/nsrt/bug-13321.php index 66a1f724d5a..491dcdf0c0d 100644 --- a/tests/PHPStan/Analyser/nsrt/bug-13321.php +++ b/tests/PHPStan/Analyser/nsrt/bug-13321.php @@ -38,7 +38,7 @@ public function bar(): void (function () { assertType(Foo::class, $this->foo); - assertType(Foo::class.'|null', $this->writableFoo); + assertType(Foo::class, $this->writableFoo); echo $this->foo->value; })(); diff --git a/turbo-ext/src/ArgumentsHandler.cpp b/turbo-ext/src/ArgumentsHandler.cpp index 8b756cf4512..0d61f48f49c 100644 --- a/turbo-ext/src/ArgumentsHandler.cpp +++ b/turbo-ext/src/ArgumentsHandler.cpp @@ -420,10 +420,16 @@ inline zv::Val nsrReadTypeOfMaybeStored(zval *nodeScopeResolver, zval *expr, zva /* ClosureTypeResolver / ClosureParameterResolver (direct entries) */ -/* $closureTypeResolver->getClosureType($scope, $expr, $shallow, $storage) */ -inline zv::Val closureTypeResolverGetClosureType(zval *closureTypeResolver, zval *scope, zval *expr, bool shallow, zval *storage) +/* $closureTypeResolver->getShallowClosureType($scope, $expr, $storage) */ +inline zv::Val closureTypeResolverGetShallowClosureType(zval *closureTypeResolver, zval *scope, zval *expr, zval *storage) { - return pt_closure_type_resolver_get_closure_type(closureTypeResolver, scope, expr, shallow, storage); + return pt_closure_type_resolver_get_shallow_closure_type(closureTypeResolver, scope, expr, storage); +} + +/* $closureProcessor->getClosureType($scope, $expr, $storage) */ +inline zv::Val closureProcessorGetClosureType(zval *closureProcessor, zval *scope, zval *expr, zval *storage) +{ + return pt_closure_processor_get_closure_type(closureProcessor, scope, expr, storage); } /* $closureTypeResolver->buildClosureTypeForClosure(...) with its ten arguments */ @@ -1984,8 +1990,8 @@ class ArgumentsHandler failed = false; return stored; } - zval *closureTypeResolver = slot(slots::closureTypeResolver); - zv::Val type = closureTypeResolverGetClosureType(closureTypeResolver, scopeToPass, value, false, w.storage); + zval *closureProcessor = slot(slots::closureProcessor); + zv::Val type = closureProcessorGetClosureType(closureProcessor, scopeToPass, value, w.storage); if (UNEXPECTED(type.isUndef())) return zv::Val(); if (UNEXPECTED(Z_TYPE_P(scopeToPass) != IS_OBJECT)) { zend_throw_error(NULL, "Call to a member function doNotTreatPhpDocTypesAsCertain() on %s", zend_zval_value_name(scopeToPass)); @@ -1993,7 +1999,7 @@ class ArgumentsHandler } zv::Val nativeScope = pt_mutating_scope_do_not_treat_phpdoc_types_as_certain(Z_OBJ_P(scopeToPass)); if (UNEXPECTED(nativeScope.isUndef())) return zv::Val(); - zv::Val nativeType = closureTypeResolverGetClosureType(closureTypeResolver, nativeScope.raw(), value, false, w.storage); + zv::Val nativeType = closureProcessorGetClosureType(closureProcessor, nativeScope.raw(), value, w.storage); if (UNEXPECTED(nativeType.isUndef())) return zv::Val(); zv::Val specifyTypesCallback = pt_specified_types_empty_specify_callback(); if (UNEXPECTED(specifyTypesCallback.isUndef())) return zv::Val(); @@ -2782,7 +2788,7 @@ class ArgumentsHandler ? zv::Val::copyOf(zv::Ref(solved)) : gatherClosureArgType(Z_ARRVAL_P(w.parametersAcceptors), record.key, value, w.scope.raw(), w.gatheredTypes.raw(), NULL); } else { - gathered = closureTypeResolverGetClosureType(slot(slots::closureTypeResolver), w.scope.raw(), value, true, w.storage); + gathered = closureTypeResolverGetShallowClosureType(slot(slots::closureTypeResolver), w.scope.raw(), value, w.storage); } if (UNEXPECTED(gathered.isUndef())) return false; zval_ptr_dtor(&record.gathered); @@ -2957,6 +2963,12 @@ class ArgumentsHandler if (UNEXPECTED(!prepareArg(w, record, value, isClosure || isArrowFunction, a, a.originalScope))) return false; + if (isClosure || isArrowFunction) { + bool invokedDuringCall; + if (UNEXPECTED(!callCallbackImmediately(a.parameter, a.parameterType.isUndef() ? NULL : a.parameterType.raw(), w.calleeReflection, invokedDuringCall))) return false; + pt_closure_processor_mark_callback_argument(value, invokedDuringCall); + } + if (isClosure) { if (UNEXPECTED(!processClosureArg(w, value, a))) return false; } else if (isArrowFunction) { diff --git a/turbo-ext/src/CallbackArgVisitor.cpp b/turbo-ext/src/CallbackArgVisitor.cpp deleted file mode 100644 index 36b1af6f94c..00000000000 --- a/turbo-ext/src/CallbackArgVisitor.cpp +++ /dev/null @@ -1,96 +0,0 @@ -/* - * PHPStanTurbo\CallbackArgVisitor — native twin of - * PHPStan\Parser\CallbackArgVisitor, declared under that name at activation - * (final, extending PhpParser\NodeVisitorAbstract like the original). - * - * Marks a closure/arrow function written directly as an argument of a call. - * - * enterNode() always returns null, so the visitor is also registered with - * pt_native_visitor_register(): the native NodeTraverser then runs it - * directly per node instead of calling into the engine (ParserVisitors.h). - */ - -#include "ParserVisitors.h" -#include "generated/CallbackArgVisitor.h" - -namespace sigs = ptdecl::CallbackArgVisitor::sig; - -static zend_class_entry *pt_ce_callback_arg_visitor = nullptr; - -static const char pt_callback_arg_attribute[] = "isCallbackArg"; -static zend_string *pt_callback_arg_attribute_str = nullptr; - -namespace phpstanturbo { - -using visitors::NodeProp; - -/* Mirrors PHPStan\Parser\CallbackArgVisitor. */ -class CallbackArgVisitor -{ -public: - /* enterNode(); the twin always returns null, false = pending exception */ - [[nodiscard]] static bool enterNode(zend_object *visitor, zend_object *node) - { - static NodeProp argValueProp = PT_NODE_PROP(PT_CLASS_ARG, "value"); - - if (!visitors::isInstanceOf(node, PT_CLASS_CALL_LIKE)) return !EG(exception); - bool isPartial; - if (UNEXPECTED(!pt_call_like_is_partial_function_application(node, isPartial))) return false; - if (isPartial) return true; - - zv::Val hold; - zval *args = pt_call_like_args(node, hold); - if (UNEXPECTED(args == NULL)) return false; - if (Z_TYPE_P(args) != IS_ARRAY) return true; - for (auto entry : zv::ArrRef(args)) { - zv::Ref arg = entry.value().deref(); - if (!arg.isObject()) continue; - zend_object *value = argValueProp.objectOf(arg.asObject(), PT_CLASS_CLOSURE_EXPR); - if (value == NULL) { - value = argValueProp.objectOf(arg.asObject(), PT_CLASS_ARROW_FUNCTION); - } - if (value == NULL) { - if (UNEXPECTED(EG(exception))) return false; - continue; - } - - visitors::setAttributeTrue(value, pt_callback_arg_attribute_str); - } - return !EG(exception); - } -}; - -} // namespace phpstanturbo - -using phpstanturbo::CallbackArgVisitor; - -/* {{{ engine ABI glue: parameter parsing + registration */ - -static const pt_native_visitor pt_callback_arg_entry = { - &pt_ce_callback_arg_visitor, - CallbackArgVisitor::enterNode, - NULL, - NULL, -}; - -PT_MINIT_REGISTRATION(pt_register_callback_arg_visitor) -{ - pt_callback_arg_attribute_str = zend_string_init_interned(pt_callback_arg_attribute, sizeof(pt_callback_arg_attribute) - 1, 1); - - reg::Class cls("PHPStan\\Parser\\CallbackArgVisitor"); - ptdecl::CallbackArgVisitor::declareClass(cls); - ptdecl::CallbackArgVisitor::declareProperties(cls); - cls.publicClassConstantString("ATTRIBUTE_NAME", pt_callback_arg_attribute); - - cls.method(sigs::enterNode, [](INTERNAL_FUNCTION_PARAMETERS) { - zval *node; - if (!zp::parse(execute_data, node)) RETURN_THROWS(); - if (UNEXPECTED(!CallbackArgVisitor::enterNode(Z_OBJ_P(ZEND_THIS), Z_OBJ_P(node)))) RETURN_THROWS(); - RETURN_NULL(); - }); - - cls.shadow(&pt_ce_callback_arg_visitor); - pt_native_visitor_register(&pt_callback_arg_entry); -} - -/* }}} */ diff --git a/turbo-ext/src/ClosureParameterResolver.cpp b/turbo-ext/src/ClosureParameterResolver.cpp index d6d9618f6c8..71eee83c00d 100644 --- a/turbo-ext/src/ClosureParameterResolver.cpp +++ b/turbo-ext/src/ClosureParameterResolver.cpp @@ -10,7 +10,7 @@ * ClosureParameterTypes object the public method returns. The twin's two * private `fn (MutatingScope $s, Expr $e): Type` type getters are the * `native` flag of createCallArgsParameters(). ContextualClosureParameterResolver, - * ClosureTypeResolver, NodeScopeResolver, MutatingScope and + * ClosureProcessor (looked up), NodeScopeResolver, MutatingScope and * NativeParameterReflection are called through their direct entries. */ @@ -28,6 +28,10 @@ namespace { } // namespace +/* $this->container->getByType(ClosureProcessor::class) */ +static zend_string *pt_cpr_closure_processor_class = nullptr; +static pt_method_site pt_cpr_get_by_type_site; + namespace phpstanturbo { /* Mirrors PHPStan\Analyser\ExprHandler\Helper\ClosureParameterResolver; @@ -38,10 +42,10 @@ class ClosureParameterResolver explicit ClosureParameterResolver(zend_object *self) : self(self) {} /* the constructor body: the promoted properties */ - void construct(zval *nodeScopeResolver, zval *closureTypeResolver, zval *contextualClosureParameterResolver) + void construct(zval *container, zval *nodeScopeResolver, zval *contextualClosureParameterResolver) { writeSlot(slots::nodeScopeResolver, nodeScopeResolver); - writeSlot(slots::closureTypeResolver, closureTypeResolver); + writeSlot(slots::container, container); writeSlot(slots::contextualClosureParameterResolver, contextualClosureParameterResolver); } @@ -78,7 +82,12 @@ class ClosureParameterResolver if (isClosure) { zv::Val storage = pt_mutating_scope_get_current_expression_result_storage(Z_OBJ_P(scope)); if (UNEXPECTED(storage.isUndef())) return zv::Val(); - return pt_closure_type_resolver_get_closure_type(OBJ_PROP_NUM(self, slots::closureTypeResolver), scope, expr, false, storage.raw()); + zval className; + ZVAL_INTERNED_STR(&className, pt_cpr_closure_processor_class); + zval *container = OBJ_PROP_NUM(self, slots::container); + zv::Val closureProcessor = pt_call_method_cached(pt_cpr_get_by_type_site, Z_OBJ_P(container), PT_LC("getbytype"), 1, &className); + if (UNEXPECTED(closureProcessor.isUndef())) return zv::Val(); + return pt_closure_processor_get_closure_type(closureProcessor.raw(), scope, expr, storage.raw()); } return pt_node_scope_resolver_read_type_of_maybe_stored(OBJ_PROP_NUM(self, slots::nodeScopeResolver), expr, scope); @@ -251,6 +260,8 @@ zv::Val pt_closure_parameter_resolver_resolve_callable_type_for_scope(zval *reso PT_MINIT_REGISTRATION(pt_register_closure_parameter_resolver) { + pt_cpr_closure_processor_class = zend_string_init_interned(PT_LC("PHPStan\\Analyser\\ClosureProcessor"), 1); + reg::Class cls("PHPStan\\Analyser\\ExprHandler\\Helper\\ClosureParameterResolver"); ptdecl::ClosureParameterResolver::declareClass(cls); ptdecl::ClosureParameterResolver::declareProperties(cls); @@ -258,9 +269,9 @@ PT_MINIT_REGISTRATION(pt_register_closure_parameter_resolver) /* the DI service's constructor: the generated arginfo names the twin's * parameter classes exactly */ cls.method(sigs::__construct, [](INTERNAL_FUNCTION_PARAMETERS) { - zval *nodeScopeResolver, *closureTypeResolver, *contextualClosureParameterResolver; - if (!zp::parse(execute_data, nodeScopeResolver, closureTypeResolver, contextualClosureParameterResolver)) RETURN_THROWS(); - ClosureParameterResolver(Z_OBJ_P(ZEND_THIS)).construct(nodeScopeResolver, closureTypeResolver, contextualClosureParameterResolver); + zval *container, *nodeScopeResolver, *contextualClosureParameterResolver; + if (!zp::parse(execute_data, container, nodeScopeResolver, contextualClosureParameterResolver)) RETURN_THROWS(); + ClosureParameterResolver(Z_OBJ_P(ZEND_THIS)).construct(container, nodeScopeResolver, contextualClosureParameterResolver); }); cls.method(sigs::resolve, [](INTERNAL_FUNCTION_PARAMETERS) { diff --git a/turbo-ext/src/ClosureProcessor.cpp b/turbo-ext/src/ClosureProcessor.cpp index eb853072974..3a2d4b66c09 100644 --- a/turbo-ext/src/ClosureProcessor.cpp +++ b/turbo-ext/src/ClosureProcessor.cpp @@ -249,6 +249,122 @@ zv::Val throwPointsToPublic(zval *throwPoints) return zv::Val(std::move(mapped)); } + +/* the attribute ArgumentsHandler sets through markCallbackArgument() */ +zend_string *pt_cp_invoked_during_call = nullptr; + +/* the private statics $closureTypeWalkDepth / $cappedClosureTypeWalks */ +int pt_cp_closure_type_walk_depth = 0; +int pt_cp_capped_closure_type_walks = 0; + +pt_method_site pt_cp_stats_increment_site; +pt_method_site pt_cp_walk_template_types_restore_site; +zend_string *pt_cp_node_scope_resolver_class = nullptr; + +/* TemplateArgumentStats::$enabled && TemplateArgumentStats::increment('closureTypeBodyWalks'); false = pending exception */ +[[nodiscard]] bool countClosureTypeBodyWalk() +{ + zend_class_entry *ce = pt_class(PT_CLASS_TEMPLATE_ARGUMENT_STATS); + if (UNEXPECTED(ce == NULL)) return false; + zval *enabled = zend_read_static_property(ce, PT_LC("enabled"), 0); + if (UNEXPECTED(enabled == NULL)) return false; + ZVAL_DEREF(enabled); + if (EXPECTED(Z_TYPE_P(enabled) != IS_TRUE)) return true; + zval counter; + ZVAL_STRINGL(&counter, "closureTypeBodyWalks", sizeof("closureTypeBodyWalks") - 1); + zv::Val result = pt_call_static_cached(pt_cp_stats_increment_site, PT_CLASS_TEMPLATE_ARGUMENT_STATS, PT_LC("increment"), 1, &counter); + zval_ptr_dtor(&counter); + return !result.isUndef(); +} + +/* ClosureWalkTemplateTypes::restore($type, $suffix) */ +zv::Val walkTemplateTypesRestore(zv::Val type, zend_string *suffix) +{ + if (UNEXPECTED(type.isUndef())) return type; + zv::Args argv{type.raw(), suffix}; + return pt_call_static_cached(pt_cp_walk_template_types_restore_site, PT_CLASS_CLOSURE_WALK_TEMPLATE_TYPES, PT_LC("restore"), 2, argv); +} + +/* $this->container->getByType(NodeScopeResolver::class) */ +zv::Val nodeScopeResolverFromContainer(zval *container) +{ + if (UNEXPECTED(Z_TYPE_P(container) != IS_OBJECT)) { + zend_throw_error(NULL, "Call to a member function getByType() on %s", zend_zval_value_name(container)); + return zv::Val(); + } + zval className; + ZVAL_INTERNED_STR(&className, pt_cp_node_scope_resolver_class); + return pt_call_method_cached(pt_cp_get_by_type_site, Z_OBJ_P(container), PT_LC("getbytype"), 1, &className); +} + +/* the node callback createClosureTypeGatherer() returns: static function + * (Node $node, Scope $scope) use ($functionScope, &$impurePoints, + * &$invalidateExpressions, &$returnStatements, &$yieldStatements, + * &$executionEnds): void — captures in that order */ +void closureTypeGathererBody(zval *captures, uint32_t argc, zval *argv, zval *return_value) +{ + (void) return_value; + if (UNEXPECTED(!ptcall::requireArguments(argc, 2, "PHPStan\\Analyser\\ClosureProcessor::{closure}"))) return; + zval *node = &argv[0]; + zval *scope = &argv[1]; + if (ptclosure::differentAnonymousFunction(scope, &captures[0]) != 0) return; + + int is = ptclosure::instanceOf(node, PT_CLASS_INVALIDATE_EXPR_NODE); + if (UNEXPECTED(is < 0)) return; + if (is) { + ptsh::appendToReference(&captures[2], node); + return; + } + is = ptclosure::instanceOf(node, PT_CLASS_PROPERTY_ASSIGN_NODE); + if (UNEXPECTED(is < 0)) return; + if (is) { + (void) ptclosure::gatherPropertyAssign(node, scope, &captures[1], &captures[2]); + return; + } + is = ptclosure::instanceOf(node, PT_CLASS_EXECUTION_END_NODE); + if (UNEXPECTED(is < 0)) return; + if (is) { + ptsh::appendToReference(&captures[5], node); + return; + } + is = ptclosure::instanceOf(node, PT_CLASS_RETURN_STMT); + if (UNEXPECTED(is < 0)) return; + if (is) { + zv::Val pair = ptclosure::pairOf(node, scope); + ptsh::appendToReference(&captures[3], pair.raw()); + return; + } + is = ptclosure::instanceOf(node, PT_CLASS_YIELD); + if (UNEXPECTED(is < 0)) return; + if (!is) { + is = ptclosure::instanceOf(node, PT_CLASS_YIELD_FROM); + if (UNEXPECTED(is < 0) || !is) return; + } + zv::Val pair = ptclosure::pairOf(node, scope); + ptsh::appendToReference(&captures[4], pair.raw()); +} + +/* the attribute flag $expr->getAttribute($name) === true */ +bool attributeIsTrue(zval *expr, zend_string *name) +{ + zval *value = ptclosure::attribute(expr, name); + if (value == NULL) return false; + ZVAL_DEREF(value); + return Z_TYPE_P(value) == IS_TRUE; +} + +/* Mirrors enterWhereInvoked() (the entered scope owned; UNDEF passes through) */ +zv::Val enterWhereInvoked(zv::Val functionScope, zval *expr) +{ + if (UNEXPECTED(functionScope.isUndef())) return functionScope; + if (attributeIsTrue(expr, pt_cp_immediately_invoked_closure) || attributeIsTrue(expr, pt_cp_invoked_during_call)) return functionScope; + if (UNEXPECTED(!functionScope.ref().isObject())) { + zend_throw_error(NULL, "Call to a member function forgetMutablePropertyFetches() on %s", zend_zval_value_name(functionScope.raw())); + return zv::Val(); + } + return pt_mutating_scope_forget_mutable_property_fetches(Z_OBJ_P(functionScope.raw())); +} + /* an owned `$x = []` captured by reference */ inline zv::Val newListReference() { @@ -277,6 +393,126 @@ class ClosureProcessor writeSlot(slots::closureSignatureInference, closureSignatureInference); } + /* Mirrors getClosureType() ($storage, $passedToType NULL for null, + * $byRefUseTypes NULL for []) */ + zv::Val getClosureType(zval *scope, zval *expr, zval *storage, zval *passedToTypeArg, zval *byRefUseTypes) const + { + zv::Str templateSuffix = zv::Str::adopt(zend_strpprintf(0, "@%u", Z_OBJ_HANDLE_P(expr))); + zval *closureTypeResolver = slot(slots::closureTypeResolver); + zv::Val passedToTypes = pt_closure_type_resolver_get_walk_passed_to_types(closureTypeResolver, scope, passedToTypeArg, templateSuffix.get()); + if (UNEXPECTED(passedToTypes.isUndef())) return zv::Val(); + zval *passedToType = zend_hash_index_find(Z_ARRVAL_P(passedToTypes.raw()), 0); + zval *nativePassedToType = zend_hash_index_find(Z_ARRVAL_P(passedToTypes.raw()), 1); + if (passedToType != NULL && Z_TYPE_P(passedToType) == IS_NULL) passedToType = NULL; + if (nativePassedToType != NULL && Z_TYPE_P(nativePassedToType) == IS_NULL) nativePassedToType = NULL; + zv::Val cached = pt_closure_type_resolver_find_cached_closure_type(closureTypeResolver, scope, expr, storage, passedToType, nativePassedToType, byRefUseTypes, templateSuffix.get()); + if (UNEXPECTED(cached.isUndef())) return zv::Val(); + if (!cached.isNull()) return cached; + if (pt_cp_closure_type_walk_depth >= 2) { + pt_cp_capped_closure_type_walks++; + return pt_closure_type_resolver_get_shallow_closure_type(closureTypeResolver, scope, expr, storage, passedToType); + } + if (UNEXPECTED(!countClosureTypeBodyWalk())) return zv::Val(); + + zv::Val nodeScopeResolver = nodeScopeResolverFromContainer(slot(slots::container)); + if (UNEXPECTED(nodeScopeResolver.isUndef())) return zv::Val(); + zv::Val parameters, nativeParameters; + if (UNEXPECTED(!pt_contextual_closure_parameter_resolver_resolve(slot(slots::contextualClosureParameterResolver), scope, expr, storage, passedToType, nativePassedToType, parameters, nativeParameters))) return zv::Val(); + int isArrowFunction = ptclosure::instanceOf(expr, PT_CLASS_ARROW_FUNCTION); + if (UNEXPECTED(isArrowFunction < 0)) return zv::Val(); + zv::Val impurePoints = ptsh::newArrayReference(); + zv::Val invalidateExpressions = ptsh::newArrayReference(); + zv::Val returnStatements = ptsh::newArrayReference(); + zv::Val yieldStatements = ptsh::newArrayReference(); + zv::Val executionEnds = ptsh::newArrayReference(); + zv::Val walkStorage = pt_expression_result_storage_new(); + if (UNEXPECTED(walkStorage.isUndef())) return zv::Val(); + + zv::Val functionScope = isArrowFunction + ? pt_mutating_scope_enter_arrow_function_without_reflection(Z_OBJ_P(scope), expr, parameters.raw(), nativeParameters.raw()) + : pt_mutating_scope_enter_anonymous_function_without_reflection(Z_OBJ_P(scope), expr, parameters.raw(), nativeParameters.raw()); + functionScope = enterWhereInvoked(std::move(functionScope), expr); + if (UNEXPECTED(functionScope.isUndef())) return zv::Val(); + if (UNEXPECTED(!functionScope.ref().isObject())) { + zend_throw_error(NULL, "Call to a member function pushExpressionResultStorage() on %s", zend_zval_value_name(functionScope.raw())); + return zv::Val(); + } + if (!isArrowFunction && byRefUseTypes != NULL) { + for (zv::ArrayEntry entry : zv::ArrRef(byRefUseTypes)) { + zend_string *name = entry.stringKeyOrNull(); + zv::Str nameHold = name != NULL ? zv::Str::copyOf(name) : zv::Str::adopt(zend_ulong_to_str(entry.indexKey())); + zval *byRefUseType = entry.value().deref().raw(); + zv::Val assigned = pt_mutating_scope_assign_variable(Z_OBJ_P(functionScope.raw()), nameHold.get(), byRefUseType, byRefUseType, pt_trinary_singleton(PT_TRI_YES)); + if (UNEXPECTED(assigned.isUndef())) return zv::Val(); + functionScope = std::move(assigned); + } + } + + pt_cp_closure_type_walk_depth++; + int cappedBefore = pt_cp_capped_closure_type_walks; + zv::Val walkResult; + if (EXPECTED(pt_mutating_scope_push_expression_result_storage(Z_OBJ_P(functionScope.raw()), walkStorage.raw()))) { + zval captures[6]; + ZVAL_COPY_VALUE(&captures[0], functionScope.raw()); + ZVAL_COPY_VALUE(&captures[1], impurePoints.raw()); + ZVAL_COPY_VALUE(&captures[2], invalidateExpressions.raw()); + ZVAL_COPY_VALUE(&captures[3], returnStatements.raw()); + ZVAL_COPY_VALUE(&captures[4], yieldStatements.raw()); + ZVAL_COPY_VALUE(&captures[5], executionEnds.raw()); + zv::Val callback = pt_native_closure_new(&closureTypeGathererBody, 6, captures, 0b111110); + if (isArrowFunction) { + zval *body = ptclosure::prop(ptclosure::arrowExprSite, expr, PT_LC("expr")); + if (EXPECTED(body != NULL)) { + zv::Val bodyHold = zv::Val::copyOf(zv::Ref(body)); + zv::Val stmt = pt_type_new(PT_CLASS_EXPRESSION_STMT, 1, bodyHold.raw()); + zv::Val context = pt_expression_context_create_deep(); + if (EXPECTED(!stmt.isUndef() && !context.isUndef())) { + walkResult = pt_node_scope_resolver_process_expr_node(nodeScopeResolver.raw(), stmt.raw(), bodyHold.raw(), functionScope.raw(), walkStorage.raw(), callback.raw(), context.raw()); + } + } + } else { + zval *stmts = ptclosure::prop(ptclosure::stmtsSite, expr, PT_LC("stmts")); + if (EXPECTED(stmts != NULL)) { + zv::Val stmtsHold = zv::Val::copyOf(zv::Ref(stmts)); + zv::Val context = pt_statement_context_create_top_level(); + if (EXPECTED(!context.isUndef())) { + walkResult = pt_node_scope_resolver_process_stmt_nodes_internal(nodeScopeResolver.raw(), expr, stmtsHold.raw(), functionScope.raw(), walkStorage.raw(), callback.raw(), context.raw()); + } + } + } + pt_finally([&]() { + (void) pt_mutating_scope_pop_expression_result_storage(Z_OBJ_P(functionScope.raw())); + pt_cp_closure_type_walk_depth--; + }); + } else { + pt_cp_closure_type_walk_depth--; + } + if (UNEXPECTED(walkResult.isUndef() || EG(exception) != NULL)) return zv::Val(); + zval *readableStorage = pt_cp_capped_closure_type_walks == cappedBefore ? walkStorage.raw() : NULL; + + zv::Val throwPointsHold, impurePointsHold; + if (isArrowFunction) { + zval *resultThrowPoints = pt_expression_result_throw_points(walkResult.raw(), throwPointsHold); + if (UNEXPECTED(resultThrowPoints == NULL)) return zv::Val(); + zv::Val throwPoints = throwPointsToPublic(resultThrowPoints); + if (UNEXPECTED(throwPoints.isUndef())) return zv::Val(); + zval *resultImpurePoints = pt_expression_result_impure_points(walkResult.raw(), impurePointsHold); + if (UNEXPECTED(resultImpurePoints == NULL)) return zv::Val(); + zv::Val allImpurePoints = mergeLists(Z_REFVAL_P(impurePoints.raw()), resultImpurePoints); + if (UNEXPECTED(allImpurePoints.isUndef())) return zv::Val(); + return walkTemplateTypesRestore(pt_closure_type_resolver_build_closure_type_for_arrow_function(closureTypeResolver, scope, expr, functionScope.raw(), throwPoints.raw(), allImpurePoints.raw(), Z_REFVAL_P(invalidateExpressions.raw()), false, readableStorage, passedToType, nativePassedToType, byRefUseTypes), templateSuffix.get()); + } + + zval *resultThrowPoints = pt_internal_statement_result_throw_points(walkResult.raw(), throwPointsHold); + if (UNEXPECTED(resultThrowPoints == NULL)) return zv::Val(); + zv::Val throwPoints = zv::Val::copyOf(zv::Ref(resultThrowPoints)); + zval *resultImpurePoints = pt_internal_statement_result_impure_points(walkResult.raw(), impurePointsHold); + if (UNEXPECTED(resultImpurePoints == NULL)) return zv::Val(); + zv::Val allImpurePoints = mergeLists(Z_REFVAL_P(impurePoints.raw()), resultImpurePoints); + if (UNEXPECTED(allImpurePoints.isUndef())) return zv::Val(); + return walkTemplateTypesRestore(pt_closure_type_resolver_build_closure_type_for_closure(closureTypeResolver, scope, expr, Z_REFVAL_P(returnStatements.raw()), Z_REFVAL_P(yieldStatements.raw()), Z_REFVAL_P(executionEnds.raw()), throwPoints.raw(), allImpurePoints.raw(), Z_REFVAL_P(invalidateExpressions.raw()), false, readableStorage, passedToType, nativePassedToType, byRefUseTypes), templateSuffix.get()); + } + /* Mirrors processClosureNode() over processClosureNodeInternal() * ($passedToType / $nativePassedToType NULL for null) */ zv::Val processClosureNode(zval *nodeScopeResolver, zval *stmt, zval *expr, zval *scope, zval *storage, zval *nodeCallback, zval *context, zval *passedToType, zval *nativePassedToType) const @@ -571,7 +807,7 @@ class ClosureProcessor byRefSource = std::move(assigned); } } - zv::Val closureScope = pt_mutating_scope_enter_anonymous_function(Z_OBJ_P(scope), expr, w.callableParameters.raw(), w.nativeCallableParameters.raw()); + zv::Val closureScope = enterWhereInvoked(pt_mutating_scope_enter_anonymous_function(Z_OBJ_P(scope), expr, w.callableParameters.raw(), w.nativeCallableParameters.raw()), expr); if (UNEXPECTED(closureScope.isUndef())) return zv::Val(); zval null; ZVAL_NULL(&null); @@ -687,7 +923,7 @@ class ClosureProcessor if (UNEXPECTED(!pt_closure_parameter_resolver_resolve(slot(slots::closureParameterResolver), scopeArg, expr, storage, callArgsHold.raw(), passedToType, nativePassedToType, callableParameters, nativeCallableParameters))) return zv::Val(); zv::Val expectedReturnType, nativeExpectedReturnType; if (UNEXPECTED(!pt_contextual_closure_parameter_resolver_resolve_expected_return_types(slot(slots::contextualClosureParameterResolver), scopeArg, expr, passedToType, nativePassedToType, expectedReturnType, nativeExpectedReturnType))) return zv::Val(); - zv::Val arrowFunctionScope = pt_mutating_scope_enter_arrow_function(Z_OBJ_P(scopeArg), expr, callableParameters.raw(), nativeCallableParameters.raw()); + zv::Val arrowFunctionScope = enterWhereInvoked(pt_mutating_scope_enter_arrow_function(Z_OBJ_P(scopeArg), expr, callableParameters.raw(), nativeCallableParameters.raw()), expr); if (UNEXPECTED(arrowFunctionScope.isUndef())) return zv::Val(); if (UNEXPECTED(!arrowFunctionScope.ref().isObject())) { zend_throw_error(NULL, "Call to a member function getAnonymousFunctionReflection() on %s", zend_zval_value_name(arrowFunctionScope.raw())); @@ -1014,7 +1250,7 @@ class ClosureProcessor if (observing) { // the closure's own body may invoke it (use (&$self)): its sites must // exist before the body is observed - zv::Val shallowType = pt_closure_type_resolver_get_closure_type(slot(slots::closureTypeResolver), w.scope.raw(), w.expr, true, w.storage); + zv::Val shallowType = pt_closure_type_resolver_get_shallow_closure_type(slot(slots::closureTypeResolver), w.scope.raw(), w.expr, w.storage); if (UNEXPECTED(shallowType.isUndef())) return false; zv::Val sites = ptclosure::inferenceCollectSites(slot(slots::closureSignatureInference), w.scope.raw(), shallowType.raw()); if (UNEXPECTED(sites.isUndef())) return false; @@ -1095,7 +1331,7 @@ class ClosureProcessor if (UNEXPECTED(w.bodyNodeCallback.isUndef())) return false; } - zv::Val closureScope = pt_mutating_scope_enter_anonymous_function(Z_OBJ_P(w.scope.raw()), w.expr, w.callableParameters.raw(), w.nativeCallableParameters.raw()); + zv::Val closureScope = enterWhereInvoked(pt_mutating_scope_enter_anonymous_function(Z_OBJ_P(w.scope.raw()), w.expr, w.callableParameters.raw(), w.nativeCallableParameters.raw()), w.expr); if (UNEXPECTED(closureScope.isUndef())) return false; if (UNEXPECTED(!closureScope.ref().isObject())) { zend_throw_error(NULL, "Call to a member function processClosureScope() on %s", zend_zval_value_name(closureScope.raw())); @@ -1248,7 +1484,7 @@ class ClosureProcessor zend_symtable_update(byRefUseTypes.table(), variableName, seed.raw()); zv::Val storage = pt_mutating_scope_get_current_expression_result_storage(Z_OBJ_P(scope)); if (UNEXPECTED(storage.isUndef())) return zv::Val(); - zv::Val iterationType = pt_closure_type_resolver_get_closure_type(slot(slots::closureTypeResolver), scope, expr, false, storage.raw(), NULL, byRefUseTypes.raw()); + zv::Val iterationType = getClosureType(scope, expr, storage.raw(), NULL, byRefUseTypes.raw()); if (UNEXPECTED(iterationType.isUndef())) return zv::Val(); zv::Val iterationReturnType = pt_type_call(Z_OBJ_P(iterationType.raw()), PT_LC("getreturntype"), 0, NULL); if (UNEXPECTED(iterationReturnType.isUndef())) return zv::Val(); @@ -1383,7 +1619,7 @@ class ClosureProcessor break; } - zv::Val entered = pt_mutating_scope_enter_anonymous_function(Z_OBJ_P(w.scope.raw()), w.expr, w.callableParameters.raw(), w.nativeCallableParameters.raw()); + zv::Val entered = enterWhereInvoked(pt_mutating_scope_enter_anonymous_function(Z_OBJ_P(w.scope.raw()), w.expr, w.callableParameters.raw(), w.nativeCallableParameters.raw()), w.expr); if (UNEXPECTED(entered.isUndef())) return false; w.setClosureScope(std::move(entered)); if (UNEXPECTED(Z_TYPE_P(w.closureScope()) != IS_OBJECT)) { @@ -1555,6 +1791,30 @@ using phpstanturbo::ClosureProcessor; /* {{{ direct entries (support.h) */ +zv::Val pt_closure_processor_get_closure_type(zval *processor, zval *scope, zval *expr, zval *storage, zval *passedToType, zval *byRefUseTypes) +{ + if (storage != NULL && Z_TYPE_P(storage) == IS_NULL) storage = NULL; + if (passedToType != NULL && Z_TYPE_P(passedToType) == IS_NULL) passedToType = NULL; + if (byRefUseTypes != NULL && zend_hash_num_elements(Z_ARRVAL_P(byRefUseTypes)) == 0) byRefUseTypes = NULL; + if (EXPECTED(Z_TYPE_P(processor) == IS_OBJECT && Z_OBJCE_P(processor) == pt_ce_closure_processor)) return ClosureProcessor(Z_OBJ_P(processor)).getClosureType(scope, expr, storage, passedToType, byRefUseTypes); + if (UNEXPECTED(Z_TYPE_P(processor) != IS_OBJECT)) { + zend_throw_error(NULL, "Call to a member function getClosureType() on %s", zend_zval_value_name(processor)); + return zv::Val(); + } + zval null, empty; + ZVAL_NULL(&null); + ZVAL_EMPTY_ARRAY(&empty); + zv::Args argv{scope, expr, storage != NULL ? storage : &null, passedToType != NULL ? passedToType : &null, byRefUseTypes != NULL ? byRefUseTypes : &empty}; + return pt_type_call(Z_OBJ_P(processor), PT_LC("getclosuretype"), 5, argv); +} + +void pt_closure_processor_mark_callback_argument(zval *expr, bool invokedDuringCall) +{ + zval value; + ZVAL_BOOL(&value, invokedDuringCall); + (void) pt_node_set_attribute(Z_OBJ_P(expr), pt_cp_invoked_during_call, &value); +} + zv::Val pt_closure_processor_process_closure_node(zval *processor, zval *nodeScopeResolver, zval *stmt, zval *expr, zval *scope, zval *storage, zval *nodeCallback, zval *context, zval *passedToType, zval *nativePassedToType) { if (passedToType != NULL && Z_TYPE_P(passedToType) == IS_NULL) passedToType = NULL; @@ -1625,11 +1885,14 @@ PT_MINIT_REGISTRATION(pt_register_closure_processor) pt_cp_closure_call_args = zend_string_init_interned(PT_LC("closureCallArgs"), 1); pt_cp_arrow_function_call_args = zend_string_init_interned(PT_LC("arrowFunctionCallArgs"), 1); pt_cp_immediately_invoked_closure = zend_string_init_interned(PT_LC("isImmediatelyInvokedClosure"), 1); + pt_cp_invoked_during_call = zend_string_init_interned(PT_LC("phpstanInvokedDuringCall"), 1); + pt_cp_node_scope_resolver_class = zend_string_init_interned(PT_LC("PHPStan\\Analyser\\NodeScopeResolver"), 1); pt_cp_this = zend_string_init_interned(PT_LC("this"), 1); reg::Class cls("PHPStan\\Analyser\\ClosureProcessor"); ptdecl::ClosureProcessor::declareClass(cls); ptdecl::ClosureProcessor::declareProperties(cls); + cls.privateClassConstantString("INVOKED_DURING_CALL_ATTRIBUTE", "phpstanInvokedDuringCall"); /* the DI service's constructor: the generated arginfo names the twin's * parameter classes exactly */ @@ -1639,6 +1902,29 @@ PT_MINIT_REGISTRATION(pt_register_closure_processor) ClosureProcessor(Z_OBJ_P(ZEND_THIS)).construct(container, expressionResultFactory, closureParameterResolver, closureTypeResolver, contextualClosureParameterResolver, closureSignatureInference); }); + cls.method(sigs::markCallbackArgument, [](INTERNAL_FUNCTION_PARAMETERS) { + zval *expr; + bool invokedDuringCall; + ZEND_PARSE_PARAMETERS_START(2, 2) + Z_PARAM_OBJECT(expr) + Z_PARAM_BOOL(invokedDuringCall) + ZEND_PARSE_PARAMETERS_END(); + pt_closure_processor_mark_callback_argument(expr, invokedDuringCall); + }); + + cls.method(sigs::getClosureType, [](INTERNAL_FUNCTION_PARAMETERS) { + zval *scope, *expr, *storage = NULL, *passedToType = NULL, *byRefUseTypes = NULL; + ZEND_PARSE_PARAMETERS_START(2, 5) + Z_PARAM_OBJECT_OF_CLASS(scope, pt_ce_mutating_scope) + Z_PARAM_OBJECT(expr) + Z_PARAM_OPTIONAL + Z_PARAM_OBJECT_OR_NULL(storage) + Z_PARAM_OBJECT_OR_NULL(passedToType) + Z_PARAM_ARRAY(byRefUseTypes) + ZEND_PARSE_PARAMETERS_END(); + PT_RETURN_VAL(pt_closure_processor_get_closure_type(ZEND_THIS, scope, expr, storage, passedToType, byRefUseTypes)); + }); + cls.method(sigs::processClosureNode, [](INTERNAL_FUNCTION_PARAMETERS) { zval *nodeScopeResolver, *stmt, *expr, *scope, *storage, *nodeCallback, *context, *passedToType, *nativePassedToType = NULL; ZEND_PARSE_PARAMETERS_START(8, 9) diff --git a/turbo-ext/src/ClosureTypeResolver.cpp b/turbo-ext/src/ClosureTypeResolver.cpp index bb25e823005..41186c83fe5 100644 --- a/turbo-ext/src/ClosureTypeResolver.cpp +++ b/turbo-ext/src/ClosureTypeResolver.cpp @@ -6,26 +6,21 @@ * constructor keeps the twin's arginfo so Nette autowires it, the per-file * cache lives in the twin's $cachedTypes slot with the twin's shape * (spl_object_id => ['expr' => ..., 'types' => [cacheKey => [...]]]) and is - * updated in place. The private static $resolveClosureTypeDepth guard and - * $cappedClosureTypeWalks are C++ counters (the declared statics stay for - * reflection parity). + * updated in place. * - * getClosureType(), buildClosureTypeForClosure(), - * buildClosureTypeForArrowFunction() and getDeclaredClosureType() are exported - * as pt_closure_type_resolver_*() (Engine.h conventions); MutatingScope, - * ArgumentsHandler and ClosureParameterResolver call them directly. The body - * walks of getClosureType() recurse through NodeScopeResolver's direct entries - * (which keep the fresh-stack guard on the path); their node callbacks are - * native closures capturing what the PHP closures capture (the entered scope - * by value, the gathered lists by reference). The array_map() callbacks and - * the ImpurePoints the twin builds only to map them to SimpleImpurePoints are - * spelled out inline. + * getShallowClosureType(), findCachedClosureType(), getWalkPassedToTypes(), + * buildClosureTypeForClosure(), buildClosureTypeForArrowFunction() and + * getDeclaredClosureType() are exported as pt_closure_type_resolver_*() + * (Engine.h conventions); MutatingScope, ArgumentsHandler and ClosureProcessor + * call them directly. The body walks are ClosureProcessor's. The array_map() + * callbacks and the ImpurePoints the twin builds only to map them to + * SimpleImpurePoints are spelled out inline. * - * ContextualClosureParameterResolver, MutatingScope, NodeScopeResolver, the + * ContextualClosureParameterResolver, MutatingScope, the * statement / expression results and throw / impure points, ClosureType, * NativeParameterReflection, InitializerExprTypeResolver and the Type kernel - * are called through their direct entries; InitializerExprContext, - * SimpleThrowPoint and TemplateArgumentStats stay PHP (cached sites below). + * are called through their direct entries; InitializerExprContext and + * SimpleThrowPoint stay PHP (cached sites below). */ #include "support.h" @@ -58,18 +53,11 @@ zend_string *pt_ctr_impure_points = nullptr; zend_string *pt_ctr_invalidate_expressions = nullptr; zend_string *pt_ctr_used_variables = nullptr; -/* the private static $resolveClosureTypeDepth */ -int pt_ctr_resolve_closure_type_depth = 0; - -/* the private static $cappedClosureTypeWalks */ -int pt_ctr_capped_closure_type_walks = 0; - /* {{{ the PHP collaborators (one site each; switch to their direct entries * once they are ported) */ pt_method_site pt_ctr_simple_throw_point_explicit_site; pt_method_site pt_ctr_simple_throw_point_implicit_site; -pt_method_site pt_ctr_stats_increment_site; pt_method_site pt_ctr_walk_template_types_rename_site; pt_method_site pt_ctr_walk_template_types_restore_site; @@ -107,22 +95,6 @@ zv::Val walkTemplateTypesRestore(zv::Val type, zend_string *suffix) return pt_call_static_cached(pt_ctr_walk_template_types_restore_site, PT_CLASS_CLOSURE_WALK_TEMPLATE_TYPES, PT_LC("restore"), 2, argv); } -/* TemplateArgumentStats::$enabled && TemplateArgumentStats::increment('closureTypeBodyWalks'); false = pending exception */ -[[nodiscard]] bool countClosureTypeBodyWalk() -{ - zend_class_entry *ce = pt_class(PT_CLASS_TEMPLATE_ARGUMENT_STATS); - if (UNEXPECTED(ce == NULL)) return false; - zval *enabled = zend_read_static_property(ce, PT_LC("enabled"), 0); - if (UNEXPECTED(enabled == NULL)) return false; - ZVAL_DEREF(enabled); - if (EXPECTED(Z_TYPE_P(enabled) != IS_TRUE)) return true; - zval counter; - ZVAL_STRINGL(&counter, "closureTypeBodyWalks", sizeof("closureTypeBodyWalks") - 1); - zv::Val result = pt_call_static_cached(pt_ctr_stats_increment_site, PT_CLASS_TEMPLATE_ARGUMENT_STATS, PT_LC("increment"), 1, &counter); - zval_ptr_dtor(&counter); - return !result.isUndef(); -} - /* }}} */ /* {{{ node reads */ @@ -206,69 +178,6 @@ zv::Val throwPointsToPublic(zval *throwPoints) return zv::Val(std::move(mapped)); } -/* array_merge($a, $b) of two lists the walk built */ -zv::Val mergeLists(zval *a, zval *b) -{ - zv::Arr merged = zv::Arr::empty(); - if (UNEXPECTED(!pt_callable_array_merge_into(merged, a) || !pt_callable_array_merge_into(merged, b))) return zv::Val(); - return zv::Val(std::move(merged)); -} - -/* static function (Node $node, Scope $scope) use ($arrowScope, - * &$arrowFunctionImpurePoints, &$invalidateExpressions): void — captures in - * that order */ -void arrowFunctionWalkCallbackBody(zval *captures, uint32_t argc, zval *argv, zval *return_value) -{ - (void) return_value; - ptclosure::arrowFunctionGatherer(captures, argc, argv, "PHPStan\\Analyser\\ExprHandler\\Helper\\ClosureTypeResolver::{closure}"); -} - -/* static function (Node $node, Scope $scope) use ($closureScope, - * &$closureReturnStatements, &$closureYieldStatements, &$closureExecutionEnds, - * &$closureImpurePoints, &$invalidateExpressions): void — captures in that - * order */ -void closureWalkCallbackBody(zval *captures, uint32_t argc, zval *argv, zval *return_value) -{ - (void) return_value; - if (UNEXPECTED(!ptcall::requireArguments(argc, 2, "PHPStan\\Analyser\\ExprHandler\\Helper\\ClosureTypeResolver::{closure}"))) return; - zval *node = &argv[0]; - zval *scope = &argv[1]; - if (ptclosure::differentAnonymousFunction(scope, &captures[0]) != 0) return; - - int is = ptclosure::instanceOf(node, PT_CLASS_INVALIDATE_EXPR_NODE); - if (UNEXPECTED(is < 0)) return; - if (is) { - ptsh::appendToReference(&captures[5], node); - return; - } - is = ptclosure::instanceOf(node, PT_CLASS_PROPERTY_ASSIGN_NODE); - if (UNEXPECTED(is < 0)) return; - if (is) { - (void) ptclosure::gatherPropertyAssign(node, scope, &captures[4], &captures[5]); - return; - } - is = ptclosure::instanceOf(node, PT_CLASS_EXECUTION_END_NODE); - if (UNEXPECTED(is < 0)) return; - if (is) { - ptsh::appendToReference(&captures[3], node); - return; - } - is = ptclosure::instanceOf(node, PT_CLASS_RETURN_STMT); - if (UNEXPECTED(is < 0)) return; - if (is) { - zv::Val pair = ptclosure::pairOf(node, scope); - ptsh::appendToReference(&captures[1], pair.raw()); - } - is = ptclosure::instanceOf(node, PT_CLASS_YIELD); - if (UNEXPECTED(is < 0)) return; - if (!is) { - is = ptclosure::instanceOf(node, PT_CLASS_YIELD_FROM); - if (UNEXPECTED(is < 0) || !is) return; - } - zv::Val pair = ptclosure::pairOf(node, scope); - ptsh::appendToReference(&captures[2], pair.raw()); -} - /* the collected state of freeVariableRoots()'s NodeFinder walks over an * arrow function body */ struct FreeVariableFindCtx : pt_find_ctx @@ -345,9 +254,8 @@ class ClosureTypeResolver explicit ClosureTypeResolver(zend_object *self) : self(self) {} /* the constructor body: the promoted properties */ - void construct(zval *nodeScopeResolver, zval *initializerExprTypeResolver, zval *contextualClosureParameterResolver, zval *closureSignatureInference) + void construct(zval *initializerExprTypeResolver, zval *contextualClosureParameterResolver, zval *closureSignatureInference) { - writeSlot(slots::nodeScopeResolver, zv::Val::copyOf(zv::Ref(nodeScopeResolver))); writeSlot(slots::initializerExprTypeResolver, zv::Val::copyOf(zv::Ref(initializerExprTypeResolver))); writeSlot(slots::contextualClosureParameterResolver, zv::Val::copyOf(zv::Ref(contextualClosureParameterResolver))); writeSlot(slots::closureSignatureInference, zv::Val::copyOf(zv::Ref(closureSignatureInference))); @@ -359,41 +267,88 @@ class ClosureTypeResolver writeSlot(slots::cachedTypes, zv::Val(zv::Arr::empty())); } - /* Mirrors getClosureType() ($storage, $passedToType NULL for null, - * $byRefUseTypes NULL for the default []) */ - zv::Val getClosureType(zval *scope, zval *expr, bool shallow, zval *storage, zval *passedToType = NULL, zval *byRefUseTypes = NULL) + /* Mirrors getShallowClosureType() ($storage, $passedToType NULL for null) */ + zv::Val getShallowClosureType(zval *scope, zval *expr, zval *storage, zval *passedToType) { - zv::Str templateSuffix = zv::Str::adopt(zend_strpprintf(0, "@%u", Z_OBJ_HANDLE_P(expr))); Parameters p; - if (UNEXPECTED(!buildParametersAndAcceptors(scope, expr, storage, passedToType, NULL, p, shallow ? NULL : templateSuffix.get()))) return zv::Val(); - - // A shallow reflection is the closure/arrow function's signature without - // walking its body: parameters plus the DECLARED return type. - if (shallow) return signatureClosureType(scope, expr, p.parameters.raw(), p.isVariadic); + if (UNEXPECTED(!buildParametersAndAcceptors(scope, expr, storage, passedToType, NULL, p))) return zv::Val(); + return signatureClosureType(scope, expr, p.parameters.raw(), p.isVariadic); + } + /* Mirrors findCachedClosureType() (the nullable ones NULL for null, + * $byRefUseTypes NULL for []) */ + zv::Val findCachedClosureType(zval *scope, zval *expr, zval *storage, zval *passedToType, zval *nativePassedToType, zval *byRefUseTypes, zend_string *templateSuffix) + { + Parameters p; + if (UNEXPECTED(!buildParametersAndAcceptors(scope, expr, storage, passedToType, nativePassedToType, p))) return zv::Val(); zv::Val cachedTypes = findCachedTypes(expr); zv::Str cacheKey = closureContextCacheKey(scope, expr, p.callableParameters.isNull() ? NULL : p.callableParameters.raw(), p.parameters.raw()); if (UNEXPECTED(cacheKey.isNull())) return zv::Val(); - if (byRefUseTypes != NULL && zend_hash_num_elements(Z_ARRVAL_P(byRefUseTypes)) == 0) byRefUseTypes = NULL; if (byRefUseTypes != NULL) { cacheKey = byRefUseCacheKey(cacheKey.get(), byRefUseTypes); if (UNEXPECTED(cacheKey.isNull())) return zv::Val(); } zval *cached = zend_symtable_find(Z_ARRVAL_P(cachedTypes.raw()), cacheKey.get()); - if (cached != NULL) { - ZVAL_DEREF(cached); - return walkTemplateTypesRestore(createClosureTypeFromCache(scope, expr, p.parameters.raw(), p.isVariadic, cached, p.contextFree), templateSuffix.get()); + if (cached == NULL) return zv::Val::null(); + ZVAL_DEREF(cached); + return walkTemplateTypesRestore(createClosureTypeFromCache(scope, expr, p.parameters.raw(), p.isVariadic, cached, p.contextFree), templateSuffix); + } + + /* Mirrors getWalkPassedToTypes() ($passedToType NULL for null): the + * [phpdoc, native] pair, each null or a type */ + static zv::Val getWalkPassedToTypes(zval *scope, zval *passedToType, zend_string *templateSuffix) + { + zv::Val passedToTypeHold, nativePassedToTypeHold; + zval *nativePassedToType = NULL; + if (UNEXPECTED(!passedToTypesFromStack(scope, passedToType, nativePassedToType, passedToTypeHold, nativePassedToTypeHold))) return zv::Val(); + zv::Arr pair = zv::Arr::create(2); + if (passedToType == NULL) { + pair.push(zv::Val::null()); + pair.push(zv::Val::null()); + return zv::Val(std::move(pair)); } - if (pt_ctr_resolve_closure_type_depth >= 2) { - pt_ctr_capped_closure_type_walks++; - return signatureClosureType(scope, expr, p.parameters.raw(), p.isVariadic); + zv::Val renamed = walkTemplateTypesRename(passedToType, templateSuffix); + if (UNEXPECTED(renamed.isUndef())) return zv::Val(); + zv::Val nativeRenamed = zv::Val::null(); + if (nativePassedToType != NULL) { + nativeRenamed = walkTemplateTypesRename(nativePassedToType, templateSuffix); + if (UNEXPECTED(nativeRenamed.isUndef())) return zv::Val(); } + pair.push(std::move(renamed)); + pair.push(std::move(nativeRenamed)); + return zv::Val(std::move(pair)); + } - if (UNEXPECTED(!countClosureTypeBodyWalk())) return zv::Val(); - int isArrowFunction = ptclosure::instanceOf(expr, PT_CLASS_ARROW_FUNCTION); - if (UNEXPECTED(isArrowFunction < 0)) return zv::Val(); - if (isArrowFunction) return walkTemplateTypesRestore(walkArrowFunction(scope, expr, p, cacheKey.get()), templateSuffix.get()); - return walkTemplateTypesRestore(walkClosure(scope, expr, p, cacheKey.get(), byRefUseTypes), templateSuffix.get()); + /* the parameter of the call argument being walked when $passedToType is + * null: its type and native type, held in the two holds; false = pending + * exception */ + [[nodiscard]] static bool passedToTypesFromStack(zval *scope, zval *&passedToType, zval *&nativePassedToType, zv::Val &passedToTypeHold, zv::Val &nativePassedToTypeHold) + { + if (passedToType != NULL) return true; + zval *stack = pt_mutating_scope_in_function_calls_stack(Z_OBJ_P(scope)); + if (UNEXPECTED(stack == NULL)) return false; + uint32_t count = Z_TYPE_P(stack) == IS_ARRAY ? zend_hash_num_elements(Z_ARRVAL_P(stack)) : 0; + if (count == 0) return true; + zval *top = zend_hash_index_find(Z_ARRVAL_P(stack), count - 1); + zval *inParameter = NULL; + if (EXPECTED(top != NULL)) { + ZVAL_DEREF(top); + inParameter = Z_TYPE_P(top) == IS_ARRAY ? zend_hash_index_find(Z_ARRVAL_P(top), 1) : NULL; + } + if (inParameter != NULL) { + ZVAL_DEREF(inParameter); + } + if (inParameter == NULL || Z_TYPE_P(inParameter) == IS_NULL) return true; + zv::Val inParameterHold = zv::Val::copyOf(zv::Ref(inParameter)); + passedToTypeHold = ptclosure::parameterGetType(inParameterHold.raw()); + if (UNEXPECTED(passedToTypeHold.isUndef())) return false; + int isExtended = ptclosure::instanceOf(inParameterHold.raw(), PT_CLASS_EXTENDED_PARAMETER_REFLECTION); + if (UNEXPECTED(isExtended < 0)) return false; + nativePassedToTypeHold = isExtended ? ptclosure::parameterGetNativeType(inParameterHold.raw()) : ptclosure::parameterGetType(inParameterHold.raw()); + if (UNEXPECTED(nativePassedToTypeHold.isUndef())) return false; + passedToType = passedToTypeHold.raw(); + nativePassedToType = nativePassedToTypeHold.raw(); + return true; } /* $cacheKey . '/&$' . $name . '=' . $type->describe(VerbosityLevel::cache()) @@ -424,7 +379,7 @@ class ClosureTypeResolver } /* Mirrors buildClosureTypeForClosure() (the nullable ones NULL for null) */ - zv::Val buildClosureTypeForClosure(zval *scope, zval *expr, zval *returnStatements, zval *yieldStatements, zval *executionEnds, zval *throwPoints, zval *impurePoints, zval *invalidateExpressions, bool native, zval *storage, zval *passedToType, zval *nativePassedToType) + zv::Val buildClosureTypeForClosure(zval *scope, zval *expr, zval *returnStatements, zval *yieldStatements, zval *executionEnds, zval *throwPoints, zval *impurePoints, zval *invalidateExpressions, bool native, zval *storage, zval *passedToType, zval *nativePassedToType, zval *byRefUseTypes = NULL) { Parameters p; if (UNEXPECTED(!buildParametersAndAcceptors(scope, expr, storage, passedToType, nativePassedToType, p))) return zv::Val(); @@ -433,19 +388,19 @@ class ClosureTypeResolver // the flavour-correct key both keeps the native build from clobbering // the phpdoc cache slot and lets a later getClosureType() ask on the // promoted scope answer from this build instead of re-walking - zv::Str cacheKey = flavourCacheKey(scope, expr, p, native); + zv::Str cacheKey = flavourCacheKey(scope, expr, p, native, byRefUseTypes); if (UNEXPECTED(cacheKey.isNull())) return zv::Val(); return buildClosureTypeFromClosureWalk(scope, expr, p.parameters.raw(), p.isVariadic, returnStatements, yieldStatements, executionEnds, publicThrowPoints.raw(), impurePoints, invalidateExpressions, cacheKey.get(), native, storage, p.contextFree); } /* Mirrors buildClosureTypeForArrowFunction() (the nullable ones NULL for null) */ - zv::Val buildClosureTypeForArrowFunction(zval *scope, zval *expr, zval *arrowScope, zval *throwPoints, zval *impurePoints, zval *invalidateExpressions, bool native, zval *storage, zval *passedToType, zval *nativePassedToType) + zv::Val buildClosureTypeForArrowFunction(zval *scope, zval *expr, zval *arrowScope, zval *throwPoints, zval *impurePoints, zval *invalidateExpressions, bool native, zval *storage, zval *passedToType, zval *nativePassedToType, zval *byRefUseTypes = NULL) { Parameters p; if (UNEXPECTED(!buildParametersAndAcceptors(scope, expr, storage, passedToType, nativePassedToType, p))) return zv::Val(); zv::Val returnType = resolveArrowFunctionReturnType(scope, arrowScope, expr, native, storage); if (UNEXPECTED(returnType.isUndef())) return zv::Val(); - zv::Str cacheKey = flavourCacheKey(scope, expr, p, native); + zv::Str cacheKey = flavourCacheKey(scope, expr, p, native, byRefUseTypes); if (UNEXPECTED(cacheKey.isNull())) return zv::Val(); zv::Arr usedVariables = zv::Arr::empty(); return assembleClosureType(scope, expr, p.parameters.raw(), p.isVariadic, returnType.raw(), throwPoints, impurePoints, false, invalidateExpressions, usedVariables.raw(), cacheKey.get(), p.contextFree); @@ -516,7 +471,7 @@ class ClosureTypeResolver /* the cache key of a flavour build: closureContextCacheKey($native ? * $scope->doNotTreatPhpDocTypesAsCertain() : $scope, $expr, $native ? * $nativeCallableParameters : $callableParameters, $parameters) */ - zv::Str flavourCacheKey(zval *scope, zval *expr, Parameters &p, bool native) + zv::Str flavourCacheKey(zval *scope, zval *expr, Parameters &p, bool native, zval *byRefUseTypes = NULL) { zv::Val nativeScope; zval *keyScope = scope; @@ -526,7 +481,9 @@ class ClosureTypeResolver keyScope = nativeScope.raw(); } zv::Val &callable = native ? p.nativeCallableParameters : p.callableParameters; - return closureContextCacheKey(keyScope, expr, callable.isNull() ? NULL : callable.raw(), p.parameters.raw()); + zv::Str cacheKey = closureContextCacheKey(keyScope, expr, callable.isNull() ? NULL : callable.raw(), p.parameters.raw()); + if (byRefUseTypes == NULL || cacheKey.isNull()) return cacheKey; + return byRefUseCacheKey(cacheKey.get(), byRefUseTypes); } /* Mirrors closureContextCacheKey() ($callableParameters NULL for null) */ @@ -1125,48 +1082,11 @@ class ClosureTypeResolver } /* Mirrors buildParametersAndAcceptors() (the nullable ones NULL for null) */ - [[nodiscard]] bool buildParametersAndAcceptors(zval *scope, zval *expr, zval *storage, zval *passedToType, zval *nativePassedToType, Parameters &p, zend_string *templateSuffix = NULL) + [[nodiscard]] bool buildParametersAndAcceptors(zval *scope, zval *expr, zval *storage, zval *passedToType, zval *nativePassedToType, Parameters &p) { if (UNEXPECTED(!buildDeclaredParameters(scope, expr, p.parameters, p.isVariadic))) return false; zv::Val passedToTypeHold, nativePassedToTypeHold; - if (passedToType == NULL) { - zval *stack = pt_mutating_scope_in_function_calls_stack(Z_OBJ_P(scope)); - if (UNEXPECTED(stack == NULL)) return false; - uint32_t count = Z_TYPE_P(stack) == IS_ARRAY ? zend_hash_num_elements(Z_ARRVAL_P(stack)) : 0; - if (count > 0) { - zval *top = zend_hash_index_find(Z_ARRVAL_P(stack), count - 1); - zval *inParameter = NULL; - if (EXPECTED(top != NULL)) { - ZVAL_DEREF(top); - inParameter = Z_TYPE_P(top) == IS_ARRAY ? zend_hash_index_find(Z_ARRVAL_P(top), 1) : NULL; - } - if (inParameter != NULL) { - ZVAL_DEREF(inParameter); - } - if (inParameter != NULL && Z_TYPE_P(inParameter) != IS_NULL) { - zv::Val inParameterHold = zv::Val::copyOf(zv::Ref(inParameter)); - passedToTypeHold = ptclosure::parameterGetType(inParameterHold.raw()); - if (UNEXPECTED(passedToTypeHold.isUndef())) return false; - int isExtended = ptclosure::instanceOf(inParameterHold.raw(), PT_CLASS_EXTENDED_PARAMETER_REFLECTION); - if (UNEXPECTED(isExtended < 0)) return false; - nativePassedToTypeHold = isExtended ? ptclosure::parameterGetNativeType(inParameterHold.raw()) : ptclosure::parameterGetType(inParameterHold.raw()); - if (UNEXPECTED(nativePassedToTypeHold.isUndef())) return false; - passedToType = passedToTypeHold.raw(); - nativePassedToType = nativePassedToTypeHold.raw(); - } - } - } - zv::Val renamedPassedToType, renamedNativePassedToType; - if (templateSuffix != NULL && passedToType != NULL) { - renamedPassedToType = walkTemplateTypesRename(passedToType, templateSuffix); - if (UNEXPECTED(renamedPassedToType.isUndef())) return false; - passedToType = renamedPassedToType.raw(); - if (nativePassedToType != NULL) { - renamedNativePassedToType = walkTemplateTypesRename(nativePassedToType, templateSuffix); - if (UNEXPECTED(renamedNativePassedToType.isUndef())) return false; - nativePassedToType = renamedNativePassedToType.raw(); - } - } + if (UNEXPECTED(!passedToTypesFromStack(scope, passedToType, nativePassedToType, passedToTypeHold, nativePassedToTypeHold))) return false; zval *contextualResolver = OBJ_PROP_NUM(self, slots::contextualClosureParameterResolver); if (UNEXPECTED(!pt_contextual_closure_parameter_resolver_resolve(contextualResolver, scope, expr, storage, passedToType, nativePassedToType, p.callableParameters, p.nativeCallableParameters))) return false; bool hasOwnContext = false; @@ -1405,152 +1325,6 @@ class ClosureTypeResolver zval value = newEntry.take(); zend_hash_index_update(Z_ARRVAL_P(cachedTypes), id, &value); } - - /* Mirrors readableWalkStorage() (NULL for null) */ - static zval *readableWalkStorage(zval *walkStorage, int cappedBefore) - { - return pt_ctr_capped_closure_type_walks == cappedBefore ? walkStorage : NULL; - } - - /* the arrow-function body walk of getClosureType() */ - zv::Val walkArrowFunction(zval *scope, zval *expr, Parameters &p, zend_string *cacheKey) - { - zval *body = ptclosure::prop(ptclosure::arrowExprSite, expr, PT_LC("expr")); - if (UNEXPECTED(body == NULL)) return zv::Val(); - zv::Val bodyHold = zv::Val::copyOf(zv::Ref(body)); - zval null; - ZVAL_NULL(&null); - zv::Val arrowScope = pt_mutating_scope_enter_arrow_function_without_reflection(Z_OBJ_P(scope), expr, p.callableParameters.isNull() ? &null : p.callableParameters.raw(), p.nativeCallableParameters.isNull() ? &null : p.nativeCallableParameters.raw()); - if (UNEXPECTED(arrowScope.isUndef())) return zv::Val(); - if (UNEXPECTED(!arrowScope.ref().isObject())) { - zend_throw_error(NULL, "Call to a member function pushExpressionResultStorage() on %s", zend_zval_value_name(arrowScope.raw())); - return zv::Val(); - } - - zv::Val arrowFunctionImpurePoints = ptsh::newArrayReference(); - zv::Val invalidateExpressions = ptsh::newArrayReference(); - pt_ctr_resolve_closure_type_depth++; - int cappedBefore = pt_ctr_capped_closure_type_walks; - zv::Val walkStorage = pt_expression_result_storage_new(); - if (UNEXPECTED(walkStorage.isUndef())) return zv::Val(); - if (UNEXPECTED(!pt_mutating_scope_push_expression_result_storage(Z_OBJ_P(arrowScope.raw()), walkStorage.raw()))) return zv::Val(); - zv::Val exprResult; - { - zv::Val stmt = pt_type_new(PT_CLASS_EXPRESSION_STMT, 1, bodyHold.raw()); - if (EXPECTED(!stmt.isUndef())) { - zval captures[3]; - ZVAL_COPY_VALUE(&captures[0], arrowScope.raw()); - ZVAL_COPY_VALUE(&captures[1], arrowFunctionImpurePoints.raw()); - ZVAL_COPY_VALUE(&captures[2], invalidateExpressions.raw()); - zv::Val callback = pt_native_closure_new(&arrowFunctionWalkCallbackBody, 3, captures, 0b110); - zv::Val context = pt_expression_context_create_deep(); - if (EXPECTED(!context.isUndef())) { - exprResult = pt_node_scope_resolver_process_expr_node(OBJ_PROP_NUM(self, slots::nodeScopeResolver), stmt.raw(), bodyHold.raw(), arrowScope.raw(), walkStorage.raw(), callback.raw(), context.raw()); - } - } - } - pt_finally([&]() { - (void) pt_mutating_scope_pop_expression_result_storage(Z_OBJ_P(arrowScope.raw())); - pt_ctr_resolve_closure_type_depth--; - }); - if (UNEXPECTED(exprResult.isUndef() || EG(exception) != NULL)) return zv::Val(); - - zv::Val throwPointsHold, impurePointsHold; - zval *resultThrowPoints = pt_expression_result_throw_points(exprResult.raw(), throwPointsHold); - if (UNEXPECTED(resultThrowPoints == NULL)) return zv::Val(); - zv::Val throwPoints = throwPointsToPublic(resultThrowPoints); - if (UNEXPECTED(throwPoints.isUndef())) return zv::Val(); - zval *resultImpurePoints = pt_expression_result_impure_points(exprResult.raw(), impurePointsHold); - if (UNEXPECTED(resultImpurePoints == NULL)) return zv::Val(); - zv::Val impurePoints = mergeLists(Z_REFVAL_P(arrowFunctionImpurePoints.raw()), resultImpurePoints); - if (UNEXPECTED(impurePoints.isUndef())) return zv::Val(); - - // the body was processed just above; resolve the return type from its stored - // result rather than reading the still-unprocessed body expression - zv::Val returnType = resolveArrowFunctionReturnType(scope, arrowScope.raw(), expr, false, readableWalkStorage(walkStorage.raw(), cappedBefore)); - if (UNEXPECTED(returnType.isUndef())) return zv::Val(); - - zv::Arr usedVariables = zv::Arr::empty(); - return assembleClosureType(scope, expr, p.parameters.raw(), p.isVariadic, returnType.raw(), throwPoints.raw(), impurePoints.raw(), false, Z_REFVAL_P(invalidateExpressions.raw()), usedVariables.raw(), cacheKey, p.contextFree); - } - - /* the closure body walk of getClosureType() */ - zv::Val walkClosure(zval *scope, zval *expr, Parameters &p, zend_string *cacheKey, zval *byRefUseTypes) - { - pt_ctr_resolve_closure_type_depth++; - int cappedBefore = pt_ctr_capped_closure_type_walks; - - zval null; - ZVAL_NULL(&null); - zv::Val closureScope = pt_mutating_scope_enter_anonymous_function_without_reflection(Z_OBJ_P(scope), expr, p.callableParameters.isNull() ? &null : p.callableParameters.raw(), p.nativeCallableParameters.isNull() ? &null : p.nativeCallableParameters.raw()); - if (UNEXPECTED(closureScope.isUndef())) return zv::Val(); - if (UNEXPECTED(!closureScope.ref().isObject())) { - zend_throw_error(NULL, "Call to a member function pushExpressionResultStorage() on %s", zend_zval_value_name(closureScope.raw())); - return zv::Val(); - } - if (byRefUseTypes != NULL) { - for (zv::ArrayEntry entry : zv::ArrRef(byRefUseTypes)) { - zend_string *name = entry.stringKeyOrNull(); - zv::Str nameHold = name != NULL ? zv::Str::copyOf(name) : zv::Str::adopt(zend_ulong_to_str(entry.indexKey())); - zval *byRefUseType = entry.value().deref().raw(); - zv::Val assigned = pt_mutating_scope_assign_variable(Z_OBJ_P(closureScope.raw()), nameHold.get(), byRefUseType, byRefUseType, pt_trinary_singleton(PT_TRI_YES)); - if (UNEXPECTED(assigned.isUndef())) return zv::Val(); - closureScope = std::move(assigned); - } - } - zv::Val closureReturnStatements = ptsh::newArrayReference(); - zv::Val closureYieldStatements = ptsh::newArrayReference(); - zv::Val closureExecutionEnds = ptsh::newArrayReference(); - zv::Val closureImpurePoints = ptsh::newArrayReference(); - zv::Val invalidateExpressions = ptsh::newArrayReference(); - - zv::Val walkStorage; - zv::Val closureStatementResult; - { - walkStorage = pt_expression_result_storage_new(); - if (EXPECTED(!walkStorage.isUndef()) && EXPECTED(pt_mutating_scope_push_expression_result_storage(Z_OBJ_P(closureScope.raw()), walkStorage.raw()))) { - zval *stmts = ptclosure::prop(ptclosure::stmtsSite, expr, PT_LC("stmts")); - if (EXPECTED(stmts != NULL)) { - zv::Val stmtsHold = zv::Val::copyOf(zv::Ref(stmts)); - zval captures[6]; - ZVAL_COPY_VALUE(&captures[0], closureScope.raw()); - ZVAL_COPY_VALUE(&captures[1], closureReturnStatements.raw()); - ZVAL_COPY_VALUE(&captures[2], closureYieldStatements.raw()); - ZVAL_COPY_VALUE(&captures[3], closureExecutionEnds.raw()); - ZVAL_COPY_VALUE(&captures[4], closureImpurePoints.raw()); - ZVAL_COPY_VALUE(&captures[5], invalidateExpressions.raw()); - zv::Val callback = pt_native_closure_new(&closureWalkCallbackBody, 6, captures, 0b111110); - zv::Val context = pt_statement_context_create_top_level(); - if (EXPECTED(!context.isUndef())) { - zv::Val internalResult = pt_node_scope_resolver_process_stmt_nodes_internal(OBJ_PROP_NUM(self, slots::nodeScopeResolver), expr, stmtsHold.raw(), closureScope.raw(), walkStorage.raw(), callback.raw(), context.raw()); - if (EXPECTED(!internalResult.isUndef())) { - if (UNEXPECTED(!internalResult.ref().isObject())) { - zend_throw_error(NULL, "Call to a member function toPublic() on %s", zend_zval_value_name(internalResult.raw())); - } else { - closureStatementResult = pt_internal_statement_result_to_public(internalResult.raw()); - } - } - } - } - } - } - pt_finally([&]() { - (void) pt_mutating_scope_pop_expression_result_storage(Z_OBJ_P(closureScope.raw())); - pt_ctr_resolve_closure_type_depth--; - }); - if (UNEXPECTED(closureStatementResult.isUndef() || EG(exception) != NULL)) return zv::Val(); - - zv::Val throwPointsHold, impurePointsHold; - zval *throwPoints = pt_statement_result_throw_points(closureStatementResult.raw(), throwPointsHold); - if (UNEXPECTED(throwPoints == NULL)) return zv::Val(); - zv::Val throwPointsOwned = zv::Val::copyOf(zv::Ref(throwPoints)); - zval *resultImpurePoints = pt_statement_result_impure_points(closureStatementResult.raw(), impurePointsHold); - if (UNEXPECTED(resultImpurePoints == NULL)) return zv::Val(); - zv::Val impurePoints = mergeLists(Z_REFVAL_P(closureImpurePoints.raw()), resultImpurePoints); - if (UNEXPECTED(impurePoints.isUndef())) return zv::Val(); - - return buildClosureTypeFromClosureWalk(scope, expr, p.parameters.raw(), p.isVariadic, Z_REFVAL_P(closureReturnStatements.raw()), Z_REFVAL_P(closureYieldStatements.raw()), Z_REFVAL_P(closureExecutionEnds.raw()), throwPointsOwned.raw(), impurePoints.raw(), Z_REFVAL_P(invalidateExpressions.raw()), cacheKey, false, readableWalkStorage(walkStorage.raw(), cappedBefore), p.contextFree); - } }; } // namespace phpstanturbo @@ -1559,51 +1333,77 @@ using phpstanturbo::ClosureTypeResolver; /* {{{ direct entries (support.h) */ -zv::Val pt_closure_type_resolver_get_closure_type(zval *resolver, zval *scope, zval *expr, bool shallow, zval *storage, zval *passedToType, zval *byRefUseTypes) +zv::Val pt_closure_type_resolver_get_shallow_closure_type(zval *resolver, zval *scope, zval *expr, zval *storage, zval *passedToType) { if (storage != NULL && Z_TYPE_P(storage) == IS_NULL) storage = NULL; if (passedToType != NULL && Z_TYPE_P(passedToType) == IS_NULL) passedToType = NULL; - if (EXPECTED(Z_TYPE_P(resolver) == IS_OBJECT && Z_OBJCE_P(resolver) == pt_ce_closure_type_resolver)) return ClosureTypeResolver(Z_OBJ_P(resolver)).getClosureType(scope, expr, shallow, storage, passedToType, byRefUseTypes); + if (EXPECTED(Z_TYPE_P(resolver) == IS_OBJECT && Z_OBJCE_P(resolver) == pt_ce_closure_type_resolver)) return ClosureTypeResolver(Z_OBJ_P(resolver)).getShallowClosureType(scope, expr, storage, passedToType); if (UNEXPECTED(Z_TYPE_P(resolver) != IS_OBJECT)) { - zend_throw_error(NULL, "Call to a member function getClosureType() on %s", zend_zval_value_name(resolver)); + zend_throw_error(NULL, "Call to a member function getShallowClosureType() on %s", zend_zval_value_name(resolver)); return zv::Val(); } zval null; ZVAL_NULL(&null); - if (byRefUseTypes != NULL) { - zv::Args argv{scope, expr, shallow, storage != NULL ? storage : &null, passedToType != NULL ? passedToType : &null, byRefUseTypes}; - return pt_type_call(Z_OBJ_P(resolver), PT_LC("getclosuretype"), 6, argv); - } - zv::Args argv{scope, expr, shallow, storage != NULL ? storage : &null, passedToType != NULL ? passedToType : &null}; - return pt_type_call(Z_OBJ_P(resolver), PT_LC("getclosuretype"), 5, argv); + zv::Args argv{scope, expr, storage != NULL ? storage : &null, passedToType != NULL ? passedToType : &null}; + return pt_type_call(Z_OBJ_P(resolver), PT_LC("getshallowclosuretype"), 4, argv); } -zv::Val pt_closure_type_resolver_build_closure_type_for_closure(zval *resolver, zval *scope, zval *expr, zval *returnStatements, zval *yieldStatements, zval *executionEnds, zval *throwPoints, zval *impurePoints, zval *invalidateExpressions, bool native, zval *storage, zval *passedToType, zval *nativePassedToType) +zv::Val pt_closure_type_resolver_find_cached_closure_type(zval *resolver, zval *scope, zval *expr, zval *storage, zval *passedToType, zval *nativePassedToType, zval *byRefUseTypes, zend_string *templateSuffix) { + if (storage != NULL && Z_TYPE_P(storage) == IS_NULL) storage = NULL; + if (passedToType != NULL && Z_TYPE_P(passedToType) == IS_NULL) passedToType = NULL; + if (nativePassedToType != NULL && Z_TYPE_P(nativePassedToType) == IS_NULL) nativePassedToType = NULL; + if (byRefUseTypes != NULL && zend_hash_num_elements(Z_ARRVAL_P(byRefUseTypes)) == 0) byRefUseTypes = NULL; + if (EXPECTED(Z_OBJCE_P(resolver) == pt_ce_closure_type_resolver)) return ClosureTypeResolver(Z_OBJ_P(resolver)).findCachedClosureType(scope, expr, storage, passedToType, nativePassedToType, byRefUseTypes, templateSuffix); + zval null, empty, suffix; + ZVAL_NULL(&null); + ZVAL_EMPTY_ARRAY(&empty); + ZVAL_STR(&suffix, templateSuffix); + zv::Args argv{scope, expr, storage != NULL ? storage : &null, passedToType != NULL ? passedToType : &null, nativePassedToType != NULL ? nativePassedToType : &null, byRefUseTypes != NULL ? byRefUseTypes : &empty, &suffix}; + return pt_type_call(Z_OBJ_P(resolver), PT_LC("findcachedclosuretype"), 7, argv); +} + +zv::Val pt_closure_type_resolver_get_walk_passed_to_types(zval *resolver, zval *scope, zval *passedToType, zend_string *templateSuffix) +{ + if (passedToType != NULL && Z_TYPE_P(passedToType) == IS_NULL) passedToType = NULL; + if (EXPECTED(Z_OBJCE_P(resolver) == pt_ce_closure_type_resolver)) return ClosureTypeResolver::getWalkPassedToTypes(scope, passedToType, templateSuffix); + zval null, suffix; + ZVAL_NULL(&null); + ZVAL_STR(&suffix, templateSuffix); + zv::Args argv{scope, passedToType != NULL ? passedToType : &null, &suffix}; + return pt_type_call(Z_OBJ_P(resolver), PT_LC("getwalkpassedtotypes"), 3, argv); +} + +zv::Val pt_closure_type_resolver_build_closure_type_for_closure(zval *resolver, zval *scope, zval *expr, zval *returnStatements, zval *yieldStatements, zval *executionEnds, zval *throwPoints, zval *impurePoints, zval *invalidateExpressions, bool native, zval *storage, zval *passedToType, zval *nativePassedToType, zval *byRefUseTypes) +{ + if (byRefUseTypes != NULL && zend_hash_num_elements(Z_ARRVAL_P(byRefUseTypes)) == 0) byRefUseTypes = NULL; if (storage != NULL && Z_TYPE_P(storage) == IS_NULL) storage = NULL; if (passedToType != NULL && Z_TYPE_P(passedToType) == IS_NULL) passedToType = NULL; if (nativePassedToType != NULL && Z_TYPE_P(nativePassedToType) == IS_NULL) nativePassedToType = NULL; if (EXPECTED(Z_OBJCE_P(resolver) == pt_ce_closure_type_resolver && Z_TYPE_P(returnStatements) == IS_ARRAY && Z_TYPE_P(yieldStatements) == IS_ARRAY && Z_TYPE_P(executionEnds) == IS_ARRAY && Z_TYPE_P(throwPoints) == IS_ARRAY && Z_TYPE_P(impurePoints) == IS_ARRAY && Z_TYPE_P(invalidateExpressions) == IS_ARRAY)) { - return ClosureTypeResolver(Z_OBJ_P(resolver)).buildClosureTypeForClosure(scope, expr, returnStatements, yieldStatements, executionEnds, throwPoints, impurePoints, invalidateExpressions, native, storage, passedToType, nativePassedToType); + return ClosureTypeResolver(Z_OBJ_P(resolver)).buildClosureTypeForClosure(scope, expr, returnStatements, yieldStatements, executionEnds, throwPoints, impurePoints, invalidateExpressions, native, storage, passedToType, nativePassedToType, byRefUseTypes); } - zval null; + zval null, empty; ZVAL_NULL(&null); - zv::Args argv{scope, expr, returnStatements, yieldStatements, executionEnds, throwPoints, impurePoints, invalidateExpressions, native, storage != NULL ? storage : &null, passedToType != NULL ? passedToType : &null, nativePassedToType != NULL ? nativePassedToType : &null}; - return pt_type_call(Z_OBJ_P(resolver), PT_LC("buildclosuretypeforclosure"), 12, argv); + ZVAL_EMPTY_ARRAY(&empty); + zv::Args argv{scope, expr, returnStatements, yieldStatements, executionEnds, throwPoints, impurePoints, invalidateExpressions, native, storage != NULL ? storage : &null, passedToType != NULL ? passedToType : &null, nativePassedToType != NULL ? nativePassedToType : &null, byRefUseTypes != NULL ? byRefUseTypes : &empty}; + return pt_type_call(Z_OBJ_P(resolver), PT_LC("buildclosuretypeforclosure"), 13, argv); } -zv::Val pt_closure_type_resolver_build_closure_type_for_arrow_function(zval *resolver, zval *scope, zval *expr, zval *arrowScope, zval *throwPoints, zval *impurePoints, zval *invalidateExpressions, bool native, zval *storage, zval *passedToType, zval *nativePassedToType) +zv::Val pt_closure_type_resolver_build_closure_type_for_arrow_function(zval *resolver, zval *scope, zval *expr, zval *arrowScope, zval *throwPoints, zval *impurePoints, zval *invalidateExpressions, bool native, zval *storage, zval *passedToType, zval *nativePassedToType, zval *byRefUseTypes) { + if (byRefUseTypes != NULL && zend_hash_num_elements(Z_ARRVAL_P(byRefUseTypes)) == 0) byRefUseTypes = NULL; if (storage != NULL && Z_TYPE_P(storage) == IS_NULL) storage = NULL; if (passedToType != NULL && Z_TYPE_P(passedToType) == IS_NULL) passedToType = NULL; if (nativePassedToType != NULL && Z_TYPE_P(nativePassedToType) == IS_NULL) nativePassedToType = NULL; if (EXPECTED(Z_OBJCE_P(resolver) == pt_ce_closure_type_resolver && Z_TYPE_P(throwPoints) == IS_ARRAY && Z_TYPE_P(impurePoints) == IS_ARRAY && Z_TYPE_P(invalidateExpressions) == IS_ARRAY)) { - return ClosureTypeResolver(Z_OBJ_P(resolver)).buildClosureTypeForArrowFunction(scope, expr, arrowScope, throwPoints, impurePoints, invalidateExpressions, native, storage, passedToType, nativePassedToType); + return ClosureTypeResolver(Z_OBJ_P(resolver)).buildClosureTypeForArrowFunction(scope, expr, arrowScope, throwPoints, impurePoints, invalidateExpressions, native, storage, passedToType, nativePassedToType, byRefUseTypes); } - zval null; + zval null, empty; ZVAL_NULL(&null); - zv::Args argv{scope, expr, arrowScope, throwPoints, impurePoints, invalidateExpressions, native, storage != NULL ? storage : &null, passedToType != NULL ? passedToType : &null, nativePassedToType != NULL ? nativePassedToType : &null}; - return pt_type_call(Z_OBJ_P(resolver), PT_LC("buildclosuretypeforarrowfunction"), 10, argv); + ZVAL_EMPTY_ARRAY(&empty); + zv::Args argv{scope, expr, arrowScope, throwPoints, impurePoints, invalidateExpressions, native, storage != NULL ? storage : &null, passedToType != NULL ? passedToType : &null, nativePassedToType != NULL ? nativePassedToType : &null, byRefUseTypes != NULL ? byRefUseTypes : &empty}; + return pt_type_call(Z_OBJ_P(resolver), PT_LC("buildclosuretypeforarrowfunction"), 11, argv); } zv::Val pt_closure_type_resolver_get_declared_closure_type(zval *resolver, zval *scope, zval *expr) @@ -1662,9 +1462,9 @@ PT_MINIT_REGISTRATION(pt_register_closure_type_resolver) /* the DI service's constructor: the generated arginfo names the twin's * parameter classes exactly */ cls.method(sigs::__construct, [](INTERNAL_FUNCTION_PARAMETERS) { - zval *nodeScopeResolver, *initializerExprTypeResolver, *contextualClosureParameterResolver, *closureSignatureInference; - if (!zp::parse(execute_data, nodeScopeResolver, initializerExprTypeResolver, contextualClosureParameterResolver, closureSignatureInference)) RETURN_THROWS(); - ClosureTypeResolver(Z_OBJ_P(ZEND_THIS)).construct(nodeScopeResolver, initializerExprTypeResolver, contextualClosureParameterResolver, closureSignatureInference); + zval *initializerExprTypeResolver, *contextualClosureParameterResolver, *closureSignatureInference; + if (!zp::parse(execute_data, initializerExprTypeResolver, contextualClosureParameterResolver, closureSignatureInference)) RETURN_THROWS(); + ClosureTypeResolver(Z_OBJ_P(ZEND_THIS)).construct(initializerExprTypeResolver, contextualClosureParameterResolver, closureSignatureInference); }); cls.method(sigs::resetFileAnalysisState, [](INTERNAL_FUNCTION_PARAMETERS) { @@ -1672,26 +1472,51 @@ PT_MINIT_REGISTRATION(pt_register_closure_type_resolver) ClosureTypeResolver(Z_OBJ_P(ZEND_THIS)).resetFileAnalysisState(); }); - cls.method(sigs::getClosureType, [](INTERNAL_FUNCTION_PARAMETERS) { - zval *scope, *expr, *storage = NULL, *passedToType = NULL, *byRefUseTypes = NULL; - bool shallow = false; - ZEND_PARSE_PARAMETERS_START(2, 6) + cls.method(sigs::getShallowClosureType, [](INTERNAL_FUNCTION_PARAMETERS) { + zval *scope, *expr, *storage = NULL, *passedToType = NULL; + ZEND_PARSE_PARAMETERS_START(2, 4) Z_PARAM_OBJECT_OF_CLASS(scope, pt_ce_mutating_scope) Z_PARAM_OBJECT(expr) Z_PARAM_OPTIONAL - Z_PARAM_BOOL(shallow) Z_PARAM_OBJECT_OR_NULL(storage) Z_PARAM_OBJECT_OR_NULL(passedToType) + ZEND_PARSE_PARAMETERS_END(); + if (UNEXPECTED(!isClosureLike(expr, false, false))) RETURN_THROWS(); + PT_RETURN_VAL(ClosureTypeResolver(Z_OBJ_P(ZEND_THIS)).getShallowClosureType(scope, expr, storage, passedToType)); + }); + + cls.method(sigs::findCachedClosureType, [](INTERNAL_FUNCTION_PARAMETERS) { + zval *scope, *expr, *storage, *passedToType, *nativePassedToType, *byRefUseTypes; + zend_string *templateSuffix; + ZEND_PARSE_PARAMETERS_START(7, 7) + Z_PARAM_OBJECT_OF_CLASS(scope, pt_ce_mutating_scope) + Z_PARAM_OBJECT(expr) + Z_PARAM_OBJECT_OR_NULL(storage) + Z_PARAM_OBJECT_OR_NULL(passedToType) + Z_PARAM_OBJECT_OR_NULL(nativePassedToType) Z_PARAM_ARRAY(byRefUseTypes) + Z_PARAM_STR(templateSuffix) ZEND_PARSE_PARAMETERS_END(); if (UNEXPECTED(!isClosureLike(expr, false, false))) RETURN_THROWS(); - PT_RETURN_VAL(ClosureTypeResolver(Z_OBJ_P(ZEND_THIS)).getClosureType(scope, expr, shallow, storage, passedToType, byRefUseTypes)); + if (zend_hash_num_elements(Z_ARRVAL_P(byRefUseTypes)) == 0) byRefUseTypes = NULL; + PT_RETURN_VAL(ClosureTypeResolver(Z_OBJ_P(ZEND_THIS)).findCachedClosureType(scope, expr, storage, passedToType, nativePassedToType, byRefUseTypes, templateSuffix)); + }); + + cls.method(sigs::getWalkPassedToTypes, [](INTERNAL_FUNCTION_PARAMETERS) { + zval *scope, *passedToType; + zend_string *templateSuffix; + ZEND_PARSE_PARAMETERS_START(3, 3) + Z_PARAM_OBJECT_OF_CLASS(scope, pt_ce_mutating_scope) + Z_PARAM_OBJECT_OR_NULL(passedToType) + Z_PARAM_STR(templateSuffix) + ZEND_PARSE_PARAMETERS_END(); + PT_RETURN_VAL(ClosureTypeResolver::getWalkPassedToTypes(scope, passedToType, templateSuffix)); }); cls.method(sigs::buildClosureTypeForClosure, [](INTERNAL_FUNCTION_PARAMETERS) { - zval *scope, *expr, *returnStatements, *yieldStatements, *executionEnds, *throwPoints, *impurePoints, *invalidateExpressions, *storage = NULL, *passedToType = NULL, *nativePassedToType = NULL; + zval *scope, *expr, *returnStatements, *yieldStatements, *executionEnds, *throwPoints, *impurePoints, *invalidateExpressions, *storage = NULL, *passedToType = NULL, *nativePassedToType = NULL, *byRefUseTypes = NULL; bool native = false; - ZEND_PARSE_PARAMETERS_START(8, 12) + ZEND_PARSE_PARAMETERS_START(8, 13) Z_PARAM_OBJECT_OF_CLASS(scope, pt_ce_mutating_scope) Z_PARAM_OBJECT(expr) Z_PARAM_ARRAY(returnStatements) @@ -1705,15 +1530,17 @@ PT_MINIT_REGISTRATION(pt_register_closure_type_resolver) Z_PARAM_OBJECT_OR_NULL(storage) Z_PARAM_OBJECT_OR_NULL(passedToType) Z_PARAM_OBJECT_OR_NULL(nativePassedToType) + Z_PARAM_ARRAY(byRefUseTypes) ZEND_PARSE_PARAMETERS_END(); if (UNEXPECTED(!isClosureLike(expr, false, true))) RETURN_THROWS(); - PT_RETURN_VAL(ClosureTypeResolver(Z_OBJ_P(ZEND_THIS)).buildClosureTypeForClosure(scope, expr, returnStatements, yieldStatements, executionEnds, throwPoints, impurePoints, invalidateExpressions, native, storage, passedToType, nativePassedToType)); + if (byRefUseTypes != NULL && zend_hash_num_elements(Z_ARRVAL_P(byRefUseTypes)) == 0) byRefUseTypes = NULL; + PT_RETURN_VAL(ClosureTypeResolver(Z_OBJ_P(ZEND_THIS)).buildClosureTypeForClosure(scope, expr, returnStatements, yieldStatements, executionEnds, throwPoints, impurePoints, invalidateExpressions, native, storage, passedToType, nativePassedToType, byRefUseTypes)); }); cls.method(sigs::buildClosureTypeForArrowFunction, [](INTERNAL_FUNCTION_PARAMETERS) { - zval *scope, *expr, *arrowScope, *throwPoints, *impurePoints, *invalidateExpressions, *storage = NULL, *passedToType = NULL, *nativePassedToType = NULL; + zval *scope, *expr, *arrowScope, *throwPoints, *impurePoints, *invalidateExpressions, *storage = NULL, *passedToType = NULL, *nativePassedToType = NULL, *byRefUseTypes = NULL; bool native = false; - ZEND_PARSE_PARAMETERS_START(6, 10) + ZEND_PARSE_PARAMETERS_START(6, 11) Z_PARAM_OBJECT_OF_CLASS(scope, pt_ce_mutating_scope) Z_PARAM_OBJECT(expr) Z_PARAM_OBJECT_OF_CLASS(arrowScope, pt_ce_mutating_scope) @@ -1725,9 +1552,11 @@ PT_MINIT_REGISTRATION(pt_register_closure_type_resolver) Z_PARAM_OBJECT_OR_NULL(storage) Z_PARAM_OBJECT_OR_NULL(passedToType) Z_PARAM_OBJECT_OR_NULL(nativePassedToType) + Z_PARAM_ARRAY(byRefUseTypes) ZEND_PARSE_PARAMETERS_END(); if (UNEXPECTED(!isClosureLike(expr, true, false))) RETURN_THROWS(); - PT_RETURN_VAL(ClosureTypeResolver(Z_OBJ_P(ZEND_THIS)).buildClosureTypeForArrowFunction(scope, expr, arrowScope, throwPoints, impurePoints, invalidateExpressions, native, storage, passedToType, nativePassedToType)); + if (byRefUseTypes != NULL && zend_hash_num_elements(Z_ARRVAL_P(byRefUseTypes)) == 0) byRefUseTypes = NULL; + PT_RETURN_VAL(ClosureTypeResolver(Z_OBJ_P(ZEND_THIS)).buildClosureTypeForArrowFunction(scope, expr, arrowScope, throwPoints, impurePoints, invalidateExpressions, native, storage, passedToType, nativePassedToType, byRefUseTypes)); }); cls.method(sigs::getDeclaredClosureType, [](INTERNAL_FUNCTION_PARAMETERS) { diff --git a/turbo-ext/src/FuncCallHandler.cpp b/turbo-ext/src/FuncCallHandler.cpp index 1ab57f227c8..50164ed7ffe 100644 --- a/turbo-ext/src/FuncCallHandler.cpp +++ b/turbo-ext/src/FuncCallHandler.cpp @@ -1426,7 +1426,7 @@ class FuncCallHandler zval closureHold; ZVAL_COPY(&closureHold, closure); zv::Val closureHeld = zv::Val::adopt(closureHold); - return pt_closure_type_resolver_get_closure_type(slot(slots::closureTypeResolver), beforeScopeHeld.raw(), closureHeld.raw(), false, storage, passedToTypeHold.raw()); + return pt_closure_processor_get_closure_type(slot(slots::closureProcessor), beforeScopeHeld.raw(), closureHeld.raw(), storage, passedToTypeHold.raw()); } return zv::Val::null(); } diff --git a/turbo-ext/src/MutatingScope.cpp b/turbo-ext/src/MutatingScope.cpp index f546608225a..1900500981c 100644 --- a/turbo-ext/src/MutatingScope.cpp +++ b/turbo-ext/src/MutatingScope.cpp @@ -540,11 +540,6 @@ static const InternalScopeFactorySlots *internalScopeFactorySlots(zend_object *f /* }}} */ -/* ImmediatelyInvokedClosureVisitor::ATTRIBUTE_NAME and - * CallbackArgVisitor::ATTRIBUTE_NAME, read by isInvokedWhereCreated() */ -static zend_string *pt_ms_immediately_invoked_closure_attribute_str = nullptr; -static zend_string *pt_ms_callback_arg_attribute_str = nullptr; - namespace phpstanturbo { /* the 18 arguments of InternalScopeFactory::create(), in its parameter @@ -1391,6 +1386,35 @@ class MutatingScope } /** @internal called by ScopeOps; false = pending exception */ + /* Mirrors the $fetchedOn loop of enterAnonymousFunctionWithoutReflection(): + * a chain of property fetches with identifier names rooted at $this. */ + [[nodiscard]] bool isPropertyFetchOnThis(zend_object *exprObject, bool &out) + { + zend_class_entry *propertyFetchCe = pt_class(PT_CLASS_PROPERTY_FETCH); + zend_class_entry *variableCe = pt_class(PT_CLASS_VARIABLE); + zend_class_entry *identifierCe = pt_class(PT_CLASS_IDENTIFIER); + if (UNEXPECTED(propertyFetchCe == NULL || variableCe == NULL || identifierCe == NULL)) return false; + zval exprZv; + ZVAL_OBJ_COPY(&exprZv, exprObject); + zv::Val fetchedOn = zv::Val::adopt(exprZv); + while (Z_TYPE_P(fetchedOn.raw()) == IS_OBJECT && instanceof_function(Z_OBJCE_P(fetchedOn.raw()), propertyFetchCe)) { + zend_object *fetch = Z_OBJ_P(fetchedOn.raw()); + zv::Ref name = nodeProp(fetch, PT_LC("name")); + if (UNEXPECTED(name.raw() == NULL)) return false; + if (!name.deref().instanceOf(identifierCe)) break; + zv::Ref var = nodeProp(fetch, PT_LC("var")); + if (UNEXPECTED(var.raw() == NULL)) return false; + fetchedOn = zv::Val::copyOf(var.deref()); + } + out = false; + if (Z_TYPE_P(fetchedOn.raw()) != IS_OBJECT || !instanceof_function(Z_OBJCE_P(fetchedOn.raw()), variableCe)) return true; + zv::Ref varName = nodeProp(Z_OBJ_P(fetchedOn.raw()), PT_LC("name")); + if (UNEXPECTED(varName.raw() == NULL)) return false; + varName = varName.deref(); + out = varName.isString() && varName.stringEquals("this"); + return true; + } + [[nodiscard]] bool isReadonlyPropertyFetch(zend_object *exprObject, bool allowOnlyOnThis, bool &out) { zend_class_entry *propertyFetchCe = pt_class(PT_CLASS_PROPERTY_FETCH); @@ -2585,13 +2609,13 @@ class MutatingScope if (UNEXPECTED(!isInstance(zv::Ref(&nodeZv), PT_CLASS_ARROW_FUNCTION, isClosure))) return zv::Val(); } if (isClosure) { - zv::Val closureTypeResolver = containerGetByType(PT_LC("PHPStan\\Analyser\\ExprHandler\\Helper\\ClosureTypeResolver")); - if (UNEXPECTED(closureTypeResolver.isUndef())) return zv::Val(); - zend_object *resolverObject = requireObject(closureTypeResolver, "getClosureType"); - if (UNEXPECTED(resolverObject == NULL)) return zv::Val(); + zv::Val closureProcessor = containerGetByType(PT_LC("PHPStan\\Analyser\\ClosureProcessor")); + if (UNEXPECTED(closureProcessor.isUndef())) return zv::Val(); + zend_object *processorObject = requireObject(closureProcessor, "getClosureType"); + if (UNEXPECTED(processorObject == NULL)) return zv::Val(); zval nodeArg; ZVAL_OBJ(&nodeArg, node); - return pt_closure_type_resolver_get_closure_type(closureTypeResolver.raw(), scope.raw(), &nodeArg, false, storage.raw()); + return pt_closure_processor_get_closure_type(closureProcessor.raw(), scope.raw(), &nodeArg, storage.raw()); } if (!counterfactualAsk && !storage.isNull()) { @@ -2813,7 +2837,19 @@ class MutatingScope return scope; } - zv::Val getCurrentTemplateArgumentFrame() const { return copyOfSlot(PT_MS_PROP_TEMPLATE_ARGUMENT_FRAME); } + /* Mirrors getCurrentTemplateArgumentFrame(): null for a frame that does + * not resolve template arguments */ + zv::Val getCurrentTemplateArgumentFrame() const + { + zv::Val frame = copyOfSlot(PT_MS_PROP_TEMPLATE_ARGUMENT_FRAME); + if (frame.isUndef() || frame.isNull()) return frame; + bool resolves; + if (UNEXPECTED(!pt_template_argument_frame_resolves_template_arguments(frame.raw(), resolves))) return zv::Val(); + return resolves ? std::move(frame) : zv::Val::null(); + } + + /* Mirrors getCurrentBodyFrame() */ + zv::Val getCurrentBodyFrame() const { return copyOfSlot(PT_MS_PROP_TEMPLATE_ARGUMENT_FRAME); } zv::Val getTemplateArgumentConstraints() const { return copyOfSlot(PT_MS_PROP_TEMPLATE_ARGUMENT_CONSTRAINTS); } @@ -5266,13 +5302,13 @@ class MutatingScope { zv::Val closureTypeResolver = containerGetByType(PT_LC("PHPStan\\Analyser\\ExprHandler\\Helper\\ClosureTypeResolver")); if (UNEXPECTED(closureTypeResolver.isUndef())) return zv::Val(); - zend_object *resolverObject = requireObject(closureTypeResolver, "getClosureType"); + zend_object *resolverObject = requireObject(closureTypeResolver, "getShallowClosureType"); if (UNEXPECTED(resolverObject == NULL)) return zv::Val(); zv::Val storage = thisGetCurrentExpressionResultStorage(); if (UNEXPECTED(storage.isUndef())) return zv::Val(); zval closureArg; ZVAL_OBJ(&closureArg, closure); - zv::Val anonymousFunctionReflection = pt_closure_type_resolver_get_closure_type(closureTypeResolver.raw(), thisZval(), &closureArg, true, storage.raw()); + zv::Val anonymousFunctionReflection = pt_closure_type_resolver_get_shallow_closure_type(closureTypeResolver.raw(), thisZval(), &closureArg, storage.raw()); if (UNEXPECTED(anonymousFunctionReflection.isUndef())) return zv::Val(); zv::Val scope = thisEnterAnonymousFunctionWithoutReflection(closure, callableParameters, nativeCallableParameters); @@ -5485,8 +5521,6 @@ class MutatingScope setHolder(nativeTypes, key.get(), var.deref().raw(), variableNativeType.raw(), PT_TRI_YES); } - bool invokedWhereCreated; - if (UNEXPECTED(!isInvokedWhereCreated(closure, invokedWhereCreated))) return zv::Val(); if (UNEXPECTED(!requireSlot(PT_MS_PROP_EXPRESSION_TYPES, "expressionTypes"))) return zv::Val(); zv::Val nonStaticExpressions = invalidateStaticExpressions(Z_ARRVAL_P(slot(PT_MS_PROP_EXPRESSION_TYPES).raw())); if (UNEXPECTED(nonStaticExpressions.isUndef())) return zv::Val(); @@ -5519,11 +5553,6 @@ class MutatingScope } } if (skip) continue; - if (!invokedWhereCreated) { - bool mutable_; - if (UNEXPECTED(!containsMutablePropertyFetch(expr.ref().asObject(), mutable_))) return zv::Val(); - if (mutable_) continue; - } if (exprString == NULL) continue; expressionTypes.set(exprString, zv::Val::copyOf(entry.value().deref())); } @@ -5555,9 +5584,11 @@ class MutatingScope bool isPropertyFetch; if (UNEXPECTED(!isInstance(expr.ref(), PT_CLASS_PROPERTY_FETCH, isPropertyFetch))) return zv::Val(); if (!isPropertyFetch) continue; - bool readonly; - if (UNEXPECTED(!thisIsReadonlyPropertyFetch(expr.raw(), true, readonly))) return zv::Val(); - if (!readonly) continue; + /* properties of $this, readonly or not; ClosureProcessor forgets + * the mutable ones when the closure may run later */ + bool onThis; + if (UNEXPECTED(!isPropertyFetchOnThis(Z_OBJ_P(expr.raw()), onThis))) return zv::Val(); + if (!onThis) continue; expressionTypes.set(exprString, zv::Val::copyOf(entry.value().deref())); } } @@ -5614,65 +5645,16 @@ class MutatingScope return scopeFactoryCreate(a); } - /* private isInvokedWhereCreated(); false = pending exception */ - [[nodiscard]] bool isInvokedWhereCreated(zend_object *function, bool &out) + /* Mirrors forgetMutablePropertyFetches() */ + zv::Val forgetMutablePropertyFetches() { - out = false; - zval *immediatelyInvoked = pt_node_attribute(function, pt_ms_immediately_invoked_closure_attribute_str); - if (immediatelyInvoked != NULL) { - ZVAL_DEREF(immediatelyInvoked); - if (Z_TYPE_P(immediatelyInvoked) == IS_TRUE) { - out = true; - return true; - } - } - - zval *callbackArg = pt_node_attribute(function, pt_ms_callback_arg_attribute_str); - if (callbackArg != NULL) { - ZVAL_DEREF(callbackArg); - } - if (callbackArg == NULL || Z_TYPE_P(callbackArg) != IS_TRUE) return true; - if (UNEXPECTED(!requireSlot(PT_MS_PROP_IN_FUNCTION_CALLS_STACK, "inFunctionCallsStack"))) return false; - zval *top = arrayLast(Z_ARRVAL_P(slot(PT_MS_PROP_IN_FUNCTION_CALLS_STACK).raw())); - if (top == NULL) return true; - if (UNEXPECTED(Z_TYPE_P(top) != IS_ARRAY)) { - zend_throw_error(NULL, "phpstan_turbo: an inFunctionCallsStack entry must be an array"); - return false; - } - zval *calleeReflection = zend_hash_index_find(Z_ARRVAL_P(top), 0); - zval *parameter = zend_hash_index_find(Z_ARRVAL_P(top), 1); - if (parameter != NULL) ZVAL_DEREF(parameter); - if (parameter == NULL || Z_TYPE_P(parameter) == IS_NULL) return true; - if (UNEXPECTED(Z_TYPE_P(parameter) != IS_OBJECT)) { - zend_throw_error(NULL, "phpstan_turbo: an inFunctionCallsStack parameter must be an object"); - return false; - } - - bool isExtended; - if (UNEXPECTED(!isInstance(zv::Ref(parameter), PT_CLASS_EXTENDED_PARAMETER_REFLECTION, isExtended))) return false; - if (isExtended) { - zv::Val isImmediatelyInvoked = pt_type_call(Z_OBJ_P(parameter), PT_LC("isimmediatelyinvokedcallable"), 0, NULL); - if (UNEXPECTED(isImmediatelyInvoked.isUndef())) return false; - zend_long value = pt_type_trinary_value(isImmediatelyInvoked.raw()); - if (UNEXPECTED(value < 0)) return false; - if (value != PT_TRI_MAYBE) { - out = value == PT_TRI_YES; - return true; - } - } - - bool isFunction = false; - if (calleeReflection != NULL) { - ZVAL_DEREF(calleeReflection); - if (UNEXPECTED(!isInstance(zv::Ref(calleeReflection), PT_CLASS_FUNCTION_REFLECTION, isFunction))) return false; - } - if (!isFunction) return true; - zv::Val parameterType = pt_type_call(Z_OBJ_P(parameter), PT_LC("gettype"), 0, NULL); - if (UNEXPECTED(parameterType.isUndef())) return false; - zv::Val callableType = pt_type_utils_find_callable_type(parameterType.raw()); - if (UNEXPECTED(callableType.isUndef())) return false; - out = !callableType.isNull(); - return true; + CreateArgs a; + if (UNEXPECTED(!fillFromSlots(a))) return zv::Val(); + if (UNEXPECTED(!fillDispatched(a, true, true))) return zv::Val(); + PT_MS_ARG_CREATE(a, CreateArgs::EXPRESSION_TYPES, invalidateMutablePropertyFetches(Z_ARRVAL_P(slot(PT_MS_PROP_EXPRESSION_TYPES).raw()))); + PT_MS_ARG_CREATE(a, CreateArgs::NATIVE_EXPRESSION_TYPES, invalidateMutablePropertyFetches(Z_ARRVAL_P(slot(PT_MS_PROP_NATIVE_EXPRESSION_TYPES).raw()))); + PT_MS_ARG_CREATE(a, CreateArgs::CONDITIONAL_EXPRESSIONS, invalidateMutablePropertyFetchConditionalExpressions(Z_ARRVAL_P(slot(PT_MS_PROP_CONDITIONAL_EXPRESSIONS).raw()))); + return scopeFactoryCreate(a); } struct MutablePropertyFetchCtx @@ -5888,13 +5870,13 @@ class MutatingScope { zv::Val closureTypeResolver = containerGetByType(PT_LC("PHPStan\\Analyser\\ExprHandler\\Helper\\ClosureTypeResolver")); if (UNEXPECTED(closureTypeResolver.isUndef())) return zv::Val(); - zend_object *resolverObject = requireObject(closureTypeResolver, "getClosureType"); + zend_object *resolverObject = requireObject(closureTypeResolver, "getShallowClosureType"); if (UNEXPECTED(resolverObject == NULL)) return zv::Val(); zv::Val storage = thisGetCurrentExpressionResultStorage(); if (UNEXPECTED(storage.isUndef())) return zv::Val(); zval arrowFunctionArg; ZVAL_OBJ(&arrowFunctionArg, arrowFunction); - zv::Val anonymousFunctionReflection = pt_closure_type_resolver_get_closure_type(closureTypeResolver.raw(), thisZval(), &arrowFunctionArg, true, storage.raw()); + zv::Val anonymousFunctionReflection = pt_closure_type_resolver_get_shallow_closure_type(closureTypeResolver.raw(), thisZval(), &arrowFunctionArg, storage.raw()); if (UNEXPECTED(anonymousFunctionReflection.isUndef())) return zv::Val(); zv::Val scope = thisEnterArrowFunctionWithoutReflection(arrowFunction, callableParameters, nativeCallableParameters); @@ -5969,17 +5951,9 @@ class MutatingScope PT_MS_ARG_CREATE(a, CreateArgs::NAMESPACE_, pt_type_call(scopeObject, PT_LC("getnamespace"), 0, NULL)); zv::Val expressionTypes = invalidateStaticExpressions(Z_ARRVAL_P(scopeExpressionTypes)); if (UNEXPECTED(expressionTypes.isUndef())) return zv::Val(); - bool invokedWhereCreated; - if (UNEXPECTED(!isInvokedWhereCreated(arrowFunction, invokedWhereCreated))) return zv::Val(); - if (invokedWhereCreated) { - a.setOwned(CreateArgs::EXPRESSION_TYPES, std::move(expressionTypes)); - a.set(CreateArgs::NATIVE_EXPRESSION_TYPES, zv::Ref(scopeNativeExpressionTypes)); - a.set(CreateArgs::CONDITIONAL_EXPRESSIONS, zv::Ref(scopeConditionalExpressions)); - } else { - PT_MS_ARG_CREATE(a, CreateArgs::EXPRESSION_TYPES, invalidateMutablePropertyFetches(Z_ARRVAL_P(expressionTypes.raw()))); - PT_MS_ARG_CREATE(a, CreateArgs::NATIVE_EXPRESSION_TYPES, invalidateMutablePropertyFetches(Z_ARRVAL_P(scopeNativeExpressionTypes))); - PT_MS_ARG_CREATE(a, CreateArgs::CONDITIONAL_EXPRESSIONS, invalidateMutablePropertyFetchConditionalExpressions(Z_ARRVAL_P(scopeConditionalExpressions))); - } + a.setOwned(CreateArgs::EXPRESSION_TYPES, std::move(expressionTypes)); + a.set(CreateArgs::NATIVE_EXPRESSION_TYPES, zv::Ref(scopeNativeExpressionTypes)); + a.set(CreateArgs::CONDITIONAL_EXPRESSIONS, zv::Ref(scopeConditionalExpressions)); a.set(CreateArgs::IN_CLOSURE_BIND_SCOPE_CLASSES, zv::Ref(scopeInClosureBindScopeClasses)); zval closureTypeZv; if (UNEXPECTED(!pt_closure_type_new(&closureTypeZv))) return zv::Val(); @@ -14188,6 +14162,16 @@ zv::Val pt_mutating_scope_get_current_template_argument_frame(zend_object *scope return pt_this_call(scope, scope->ce == pt_ce_mutating_scope, PT_LC("getcurrenttemplateargumentframe"), ®::detail::Bound<&MutatingScope::getCurrentTemplateArgumentFrame>::handle, 0, NULL, [&]() { return MutatingScope(scope).getCurrentTemplateArgumentFrame(); }); } +zv::Val pt_mutating_scope_get_current_body_frame(zend_object *scope) +{ + return pt_this_call(scope, scope->ce == pt_ce_mutating_scope, PT_LC("getcurrentbodyframe"), ®::detail::Bound<&MutatingScope::getCurrentBodyFrame>::handle, 0, NULL, [&]() { return MutatingScope(scope).getCurrentBodyFrame(); }); +} + +zv::Val pt_mutating_scope_forget_mutable_property_fetches(zend_object *scope) +{ + return pt_this_call(scope, scope->ce == pt_ce_mutating_scope, PT_LC("forgetmutablepropertyfetches"), ®::detail::Bound<&MutatingScope::forgetMutablePropertyFetches>::handle, 0, NULL, [&]() { return MutatingScope(scope).forgetMutablePropertyFetches(); }); +} + zend_long pt_mutating_scope_php_versions_trinary(zend_object *scope, const char *lcMethod, size_t lcMethodLength) { if (EXPECTED(scope->ce == pt_ce_mutating_scope)) return MutatingScope(scope).phpVersionsTrinary(lcMethod, lcMethodLength); @@ -14817,8 +14801,6 @@ PT_MINIT_REGISTRATION(pt_register_mutating_scope) { using namespace pt_ms; - pt_ms_immediately_invoked_closure_attribute_str = zend_string_init_interned(PT_LC("isImmediatelyInvokedClosure"), 1); - pt_ms_callback_arg_attribute_str = zend_string_init_interned(PT_LC("isCallbackArg"), 1); reg::Class cls("PHPStan\\Analyser\\MutatingScope"); /* not final: NodeCallbackScope extends it in PHP (and a third party @@ -15095,6 +15077,8 @@ PT_MINIT_REGISTRATION(pt_register_mutating_scope) }); cls.method<&MutatingScope::getCurrentTemplateArgumentFrame>(sigs::getCurrentTemplateArgumentFrame); + cls.method<&MutatingScope::getCurrentBodyFrame>(sigs::getCurrentBodyFrame); + cls.method<&MutatingScope::forgetMutablePropertyFetches>(sigs::forgetMutablePropertyFetches); cls.method<&MutatingScope::getTemplateArgumentConstraints>(sigs::getTemplateArgumentConstraints); diff --git a/turbo-ext/src/StatementsHandler.cpp b/turbo-ext/src/StatementsHandler.cpp index c7653e25785..32311296aa9 100644 --- a/turbo-ext/src/StatementsHandler.cpp +++ b/turbo-ext/src/StatementsHandler.cpp @@ -641,7 +641,7 @@ class StatementsHandler bool shouldCheckLastStatement; if (UNEXPECTED(!isBodyParent(parentNode, shouldCheckLastStatement))) return zv::Val(); - if (shouldCheckLastStatement && stmtCount > 0 && Z_TYPE_P(OBJ_PROP_NUM(self, slots::unresolvedTemplateArguments)) == IS_TRUE) { + if (shouldCheckLastStatement && stmtCount > 0) { bool resolve; if (UNEXPECTED(!pt_statement_context_should_resolve_template_arguments(context, resolve))) return zv::Val(); if (resolve) return processBodyStmtNodesTwoPass(nodeScopeResolver, parentNode, stmts, scope, storage, nodeCallback, context); @@ -1764,11 +1764,12 @@ class StatementsHandler if (UNEXPECTED(position.isUndef())) return zv::Val(); statementStartTokenPositions.push(std::move(position)); } - zv::Val parentFrame = pt_mutating_scope_get_current_template_argument_frame(Z_OBJ_P(scopeArg)); + bool resolvesTemplateArguments = Z_TYPE_P(OBJ_PROP_NUM(self, slots::unresolvedTemplateArguments)) == IS_TRUE; + zv::Val parentFrame = pt_mutating_scope_get_current_body_frame(Z_OBJ_P(scopeArg)); if (UNEXPECTED(parentFrame.isUndef())) return zv::Val(); zv::Val parentConstraints = pt_mutating_scope_get_template_argument_constraints(Z_OBJ_P(scopeArg)); if (UNEXPECTED(parentConstraints.isUndef())) return zv::Val(); - zv::Val observationFrame = pt_template_argument_frame_new(parentFrame.raw(), NULL, NULL, parentNode, stmts); + zv::Val observationFrame = pt_template_argument_frame_new(parentFrame.raw(), NULL, NULL, parentNode, stmts, NULL, false, NULL, resolvesTemplateArguments); if (UNEXPECTED(observationFrame.isUndef())) return zv::Val(); bool statsEnabled; if (UNEXPECTED(!templateArgumentStatsEnabled(statsEnabled))) return zv::Val(); @@ -1829,7 +1830,7 @@ class StatementsHandler finalConstraints = templateArgumentConstraintsCreateEmpty(); if (UNEXPECTED(finalConstraints.isUndef())) return zv::Val(); } - zv::Val staticSites = pt_static_variable_inference_get_sites(OBJ_PROP_NUM(self, slots::staticVariableInference), parentNode, stmts); + zv::Val staticSites = resolvesTemplateArguments ? pt_static_variable_inference_get_sites(OBJ_PROP_NUM(self, slots::staticVariableInference), parentNode, stmts) : zv::Val(zv::Arr::empty()); if (UNEXPECTED(staticSites.isUndef())) return zv::Val(); zv::Val staticVariableTypes = zv::Val(zv::Arr::empty()); zv::Val staticVariableConditionalExpressions = zv::Val(zv::Arr::empty()); @@ -1851,7 +1852,13 @@ class StatementsHandler finalConstraints = zv::Val::copyOf(zv::Ref(zend_hash_index_find(Z_ARRVAL_P(inferred.raw()), 2))); staticWalk = zv::Val::copyOf(zv::Ref(zend_hash_index_find(Z_ARRVAL_P(inferred.raw()), 3))); } - zv::Val frame = templateArgumentResolverResolve(OBJ_PROP_NUM(self, slots::templateArgumentResolver), finalConstraints.raw(), parentFrame.raw(), statementStartTokenPositions.raw(), parentNode, stmts); + zv::Val frame; + if (resolvesTemplateArguments) { + frame = templateArgumentResolverResolve(OBJ_PROP_NUM(self, slots::templateArgumentResolver), finalConstraints.raw(), parentFrame.raw(), statementStartTokenPositions.raw(), parentNode, stmts); + } else { + zv::Val noResolutions = zv::Val(zv::Arr::empty()); + frame = pt_template_argument_frame_new(parentFrame.raw(), noResolutions.raw(), NULL, parentNode, stmts, NULL, false, NULL, false); + } if (UNEXPECTED(frame.isUndef())) return zv::Val(); if (zend_hash_num_elements(Z_ARRVAL_P(staticVariableTypes.raw())) > 0) { frame = pt_template_argument_frame_with_static_variable_types(frame.raw(), staticVariableTypes.raw(), staticStatementIndexes.raw(), staticVariableConditionalExpressions.raw()); diff --git a/turbo-ext/src/TemplateArgumentFrame.cpp b/turbo-ext/src/TemplateArgumentFrame.cpp index 001fd35d37d..e2b15632a61 100644 --- a/turbo-ext/src/TemplateArgumentFrame.cpp +++ b/turbo-ext/src/TemplateArgumentFrame.cpp @@ -95,7 +95,7 @@ class TemplateArgumentFrame * $staticVariableTypes = [], private readonly array * $staticVariableConditionalExpressions = []); NULL for null / []. false = * pending exception (a repeated construction modifies readonly properties) */ - [[nodiscard]] bool construct(zval *parent, zval *resolutions, zval *siteStatementIndexes, zval *closureSignatureBody, zval *closureSignatureStmts, zval *settledClosureSites, bool observingClosures, zval *byRefSites, zval *staticVariableTypes, zval *staticVariableConditionalExpressions) const + [[nodiscard]] bool construct(zval *parent, zval *resolutions, zval *siteStatementIndexes, zval *closureSignatureBody, zval *closureSignatureStmts, zval *settledClosureSites, bool observingClosures, zval *byRefSites, zval *staticVariableTypes, zval *staticVariableConditionalExpressions, bool resolvesTemplateArguments = true) const { if (UNEXPECTED(Z_TYPE_P(OBJ_PROP_NUM(self, slots::parent)) != IS_UNDEF)) { zend_throw_error(NULL, "Cannot modify readonly property %s::$parent", ZSTR_VAL(self->ce->name)); @@ -158,9 +158,23 @@ class TemplateArgumentFrame ZVAL_EMPTY_ARRAY(&value); pt_write_slot(self, slots::staticVariableConditionalExpressions, &value); } + ZVAL_BOOL(&value, resolvesTemplateArguments); + pt_write_slot(self, slots::resolvesTemplateArguments, &value); return true; } + /* Mirrors resolvesTemplateArguments(); false = pending exception */ + [[nodiscard]] bool resolvesTemplateArguments(bool &out) const + { + zval *value = pt_typed_slot(self, slots::resolvesTemplateArguments, self->ce, "resolvesTemplateArguments"); + if (UNEXPECTED(value == NULL)) return false; + out = Z_TYPE_P(value) == IS_TRUE; + return true; + } + + /* the resolvesTemplateArguments slot, for the copies of this frame */ + bool resolvesSlot() const { return Z_TYPE_P(OBJ_PROP_NUM(self, slots::resolvesTemplateArguments)) == IS_TRUE; } + /* Mirrors getStaticVariableTypes(): [phpdoc, native] or PHP null */ zv::Val getStaticVariableTypes(zval *var) const { @@ -215,7 +229,8 @@ class TemplateArgumentFrame Z_TYPE_P(OBJ_PROP_NUM(self, slots::observingClosures)) == IS_TRUE, OBJ_PROP_NUM(self, slots::byRefSites), staticVariableTypes, - conditionalExpressions + conditionalExpressions, + resolvesSlot() ); } @@ -292,7 +307,8 @@ class TemplateArgumentFrame false, byRefSites, OBJ_PROP_NUM(self, slots::staticVariableTypes), - OBJ_PROP_NUM(self, slots::staticVariableConditionalExpressions) + OBJ_PROP_NUM(self, slots::staticVariableConditionalExpressions), + resolvesSlot() ); } @@ -336,12 +352,12 @@ class TemplateArgumentFrame zval *closureSignatureStmts() const { return OBJ_PROP_NUM(self, slots::closureSignatureStmts); } /* new self(...); UNDEF = pending exception */ - static zv::Val create(zval *parent, zval *resolutions, zval *siteStatementIndexes, zval *closureSignatureBody, zval *closureSignatureStmts, zval *settledClosureSites, bool observingClosures, zval *byRefSites, zval *staticVariableTypes = NULL, zval *staticVariableConditionalExpressions = NULL) + static zv::Val create(zval *parent, zval *resolutions, zval *siteStatementIndexes, zval *closureSignatureBody, zval *closureSignatureStmts, zval *settledClosureSites, bool observingClosures, zval *byRefSites, zval *staticVariableTypes = NULL, zval *staticVariableConditionalExpressions = NULL, bool resolvesTemplateArguments = true) { zval object; if (UNEXPECTED(object_init_ex(&object, pt_ce_template_argument_frame) != SUCCESS)) return zv::Val(); zv::Val frame = zv::Val::adopt(object); - if (UNEXPECTED(!TemplateArgumentFrame(Z_OBJ_P(frame.raw())).construct(parent, resolutions, siteStatementIndexes, closureSignatureBody, closureSignatureStmts, settledClosureSites, observingClosures, byRefSites, staticVariableTypes, staticVariableConditionalExpressions))) return zv::Val(); + if (UNEXPECTED(!TemplateArgumentFrame(Z_OBJ_P(frame.raw())).construct(parent, resolutions, siteStatementIndexes, closureSignatureBody, closureSignatureStmts, settledClosureSites, observingClosures, byRefSites, staticVariableTypes, staticVariableConditionalExpressions, resolvesTemplateArguments))) return zv::Val(); return frame; } @@ -645,9 +661,18 @@ bool pt_template_argument_frame_is_settled_closure_site(zval *frame, zval *site, return true; } -zv::Val pt_template_argument_frame_new(zval *parent, zval *resolutions, zval *siteStatementIndexes, zval *closureSignatureBody, zval *closureSignatureStmts, zval *settledClosureSites, bool observingClosures, zval *byRefSites) +zv::Val pt_template_argument_frame_new(zval *parent, zval *resolutions, zval *siteStatementIndexes, zval *closureSignatureBody, zval *closureSignatureStmts, zval *settledClosureSites, bool observingClosures, zval *byRefSites, bool resolvesTemplateArguments) { - return TemplateArgumentFrame::create(parent != NULL && Z_TYPE_P(parent) == IS_NULL ? NULL : parent, resolutions != NULL && Z_TYPE_P(resolutions) == IS_NULL ? NULL : resolutions, siteStatementIndexes, closureSignatureBody != NULL && Z_TYPE_P(closureSignatureBody) == IS_NULL ? NULL : closureSignatureBody, closureSignatureStmts, settledClosureSites, observingClosures, byRefSites); + return TemplateArgumentFrame::create(parent != NULL && Z_TYPE_P(parent) == IS_NULL ? NULL : parent, resolutions != NULL && Z_TYPE_P(resolutions) == IS_NULL ? NULL : resolutions, siteStatementIndexes, closureSignatureBody != NULL && Z_TYPE_P(closureSignatureBody) == IS_NULL ? NULL : closureSignatureBody, closureSignatureStmts, settledClosureSites, observingClosures, byRefSites, NULL, NULL, resolvesTemplateArguments); +} + +bool pt_template_argument_frame_resolves_template_arguments(zval *frame, bool &out) +{ + if (EXPECTED(Z_OBJCE_P(frame) == pt_ce_template_argument_frame)) return TemplateArgumentFrame(Z_OBJ_P(frame)).resolvesTemplateArguments(out); + zv::Val result = pt_type_call(Z_OBJ_P(frame), PT_LC("resolvestemplatearguments"), 0, NULL); + if (UNEXPECTED(result.isUndef())) return false; + out = zend_is_true(result.raw()); + return true; } zv::Val pt_template_argument_frame_with_observed_closures(zval *frame, zval *closureResolutions, zval *closureSiteStatementIndexes, zval *settledClosureSites, zval *byRefSites) @@ -750,7 +775,8 @@ PT_MINIT_REGISTRATION(pt_register_template_argument_frame) cls.method(sigs::__construct, [](INTERNAL_FUNCTION_PARAMETERS) { zval *parent, *resolutions = NULL, *siteStatementIndexes = NULL, *closureSignatureBody = NULL, *closureSignatureStmts = NULL, *settledClosureSites = NULL, *byRefSites = NULL, *staticVariableTypes = NULL, *staticVariableConditionalExpressions = NULL; bool observingClosures = false; - ZEND_PARSE_PARAMETERS_START(1, 10) + bool resolvesTemplateArguments = true; + ZEND_PARSE_PARAMETERS_START(1, 11) Z_PARAM_OBJECT_OR_NULL(parent) Z_PARAM_OPTIONAL Z_PARAM_ARRAY_OR_NULL(resolutions) @@ -762,8 +788,9 @@ PT_MINIT_REGISTRATION(pt_register_template_argument_frame) Z_PARAM_ARRAY(byRefSites) Z_PARAM_ARRAY(staticVariableTypes) Z_PARAM_ARRAY(staticVariableConditionalExpressions) + Z_PARAM_BOOL(resolvesTemplateArguments) ZEND_PARSE_PARAMETERS_END(); - if (UNEXPECTED(!TemplateArgumentFrame(Z_OBJ_P(ZEND_THIS)).construct(parent, resolutions, siteStatementIndexes, closureSignatureBody, closureSignatureStmts, settledClosureSites, observingClosures, byRefSites, staticVariableTypes, staticVariableConditionalExpressions))) RETURN_THROWS(); + if (UNEXPECTED(!TemplateArgumentFrame(Z_OBJ_P(ZEND_THIS)).construct(parent, resolutions, siteStatementIndexes, closureSignatureBody, closureSignatureStmts, settledClosureSites, observingClosures, byRefSites, staticVariableTypes, staticVariableConditionalExpressions, resolvesTemplateArguments))) RETURN_THROWS(); }); cls.method(sigs::withObservedClosures, [](INTERNAL_FUNCTION_PARAMETERS) { @@ -827,6 +854,7 @@ PT_MINIT_REGISTRATION(pt_register_template_argument_frame) cls.method<&TemplateArgumentFrame::isObserving>(sigs::isObserving); cls.method<&TemplateArgumentFrame::isObservingClosures>(sigs::isObservingClosures); + cls.method<&TemplateArgumentFrame::resolvesTemplateArguments>(sigs::resolvesTemplateArguments); cls.method<&TemplateArgumentFrame::firstSiteStatementIndex>(sigs::firstSiteStatementIndex); diff --git a/turbo-ext/src/generated/CallbackArgVisitor.h b/turbo-ext/src/generated/CallbackArgVisitor.h deleted file mode 100644 index a7c1000c415..00000000000 --- a/turbo-ext/src/generated/CallbackArgVisitor.h +++ /dev/null @@ -1,44 +0,0 @@ -/* Generated by turbo-ext/bin/generate-declarations.php from - * src/Parser/CallbackArgVisitor.php — do not edit. */ - -#ifndef PHPSTANTURBO_GENERATED_CALLBACK_ARG_VISITOR_H -#define PHPSTANTURBO_GENERATED_CALLBACK_ARG_VISITOR_H - -#include "../reg.h" - -namespace ptdecl::CallbackArgVisitor { - -inline void declareClass(reg::Class &cls) -{ - cls.final(); - cls.parent("PhpParser\\NodeVisitorAbstract"); -} - -/* the properties the class declares itself, in declaration order (a used trait's come from its registrar) */ -inline void declareProperties(reg::Class &cls) -{ - (void) cls; -} - -/* the string and parameter tables the signatures below index into (see reg::Sig) */ -namespace sigtab { -inline constexpr char strings[] = - "node\0" /* 0 */ - "PhpParser\\Node\0" /* 5 */ - "\0" /* 20 */ - "enterNode"; /* 21 */ -inline constexpr reg::PackedArg args[] = { - reg::packed(0, 0, 5), /* enterNode $node */ - reg::packed(20, MAY_BE_NULL, 5), /* enterNode return */ -}; -using Sig = reg::Sig; -} // namespace sigtab - -/* the signatures of the methods the class declares itself (a used trait's are in the trait's header) */ -namespace sig { -inline constexpr sigtab::Sig enterNode = { { 21 /* enterNode */, 1, 0, 1, 1, ZEND_ACC_PUBLIC } }; -} // namespace sig - -} // namespace ptdecl::CallbackArgVisitor - -#endif diff --git a/turbo-ext/src/generated/ClosureParameterResolver.h b/turbo-ext/src/generated/ClosureParameterResolver.h index 526d70445f7..41901c535ca 100644 --- a/turbo-ext/src/generated/ClosureParameterResolver.h +++ b/turbo-ext/src/generated/ClosureParameterResolver.h @@ -10,8 +10,8 @@ namespace ptdecl::ClosureParameterResolver { /* the OBJ_PROP_NUM slots of the instance properties the class declares (the inherited ones come first) */ namespace slot { -inline constexpr uint32_t nodeScopeResolver = 0; -inline constexpr uint32_t closureTypeResolver = 1; +inline constexpr uint32_t container = 0; +inline constexpr uint32_t nodeScopeResolver = 1; inline constexpr uint32_t contextualClosureParameterResolver = 2; } // namespace slot @@ -23,70 +23,70 @@ inline void declareClass(reg::Class &cls) /* the properties the class declares itself, in declaration order (a used trait's come from its registrar) */ inline void declareProperties(reg::Class &cls) { + cls.property("container", ZEND_ACC_PRIVATE, reg::PropertyKind::Typed, 0, "PHPStan\\DependencyInjection\\Container"); cls.property("nodeScopeResolver", ZEND_ACC_PRIVATE, reg::PropertyKind::Typed, 0, "PHPStan\\Analyser\\NodeScopeResolver"); - cls.property("closureTypeResolver", ZEND_ACC_PRIVATE, reg::PropertyKind::Typed, 0, "PHPStan\\Analyser\\ExprHandler\\Helper\\ClosureTypeResolver"); cls.property("contextualClosureParameterResolver", ZEND_ACC_PRIVATE, reg::PropertyKind::Typed, 0, "PHPStan\\Analyser\\ExprHandler\\Helper\\ContextualClosureParameterResolver"); } /* the string and parameter tables the signatures below index into (see reg::Sig) */ namespace sigtab { inline constexpr char strings[] = - "nodeScopeResolver\0" /* 0 */ - "PHPStan\\Analyser\\NodeScopeResolver\0" /* 18 */ - "closureTypeResolver\0" /* 53 */ - "PHPStan\\Analyser\\ExprHandler\\Helper\\ClosureTypeResolver\0" /* 73 */ - "contextualClosureParameterResolver\0" /* 129 */ - "PHPStan\\Analyser\\ExprHandler\\Helper\\ContextualClosureParameterResolver\0" /* 164 */ - "__construct\0" /* 235 */ - "scope\0" /* 247 */ - "PHPStan\\Analyser\\MutatingScope\0" /* 253 */ - "expr\0" /* 284 */ - "PhpParser\\Node\\Expr\\Closure|PhpParser\\Node\\Expr\\ArrowFunction\0" /* 289 */ - "storage\0" /* 351 */ - "PHPStan\\Analyser\\ExpressionResultStorage\0" /* 359 */ - "callArgs\0" /* 400 */ - "passedToType\0" /* 409 */ - "PHPStan\\Type\\Type\0" /* 422 */ - "nativePassedToType\0" /* 440 */ - "\0" /* 459 */ - "PHPStan\\Analyser\\ClosureParameterTypes\0" /* 460 */ - "resolve\0" /* 499 */ - "PhpParser\\Node\\Expr\0" /* 507 */ - "resolveCallableTypeForScope\0" /* 527 */ - "closureExpr\0" /* 555 */ - "args\0" /* 567 */ - "typeGetter\0" /* 572 */ - "Closure\0" /* 583 */ - "createCallArgsParameters"; /* 591 */ + "container\0" /* 0 */ + "PHPStan\\DependencyInjection\\Container\0" /* 10 */ + "nodeScopeResolver\0" /* 48 */ + "PHPStan\\Analyser\\NodeScopeResolver\0" /* 66 */ + "contextualClosureParameterResolver\0" /* 101 */ + "PHPStan\\Analyser\\ExprHandler\\Helper\\ContextualClosureParameterResolver\0" /* 136 */ + "__construct\0" /* 207 */ + "scope\0" /* 219 */ + "PHPStan\\Analyser\\MutatingScope\0" /* 225 */ + "expr\0" /* 256 */ + "PhpParser\\Node\\Expr\\Closure|PhpParser\\Node\\Expr\\ArrowFunction\0" /* 261 */ + "storage\0" /* 323 */ + "PHPStan\\Analyser\\ExpressionResultStorage\0" /* 331 */ + "callArgs\0" /* 372 */ + "passedToType\0" /* 381 */ + "PHPStan\\Type\\Type\0" /* 394 */ + "nativePassedToType\0" /* 412 */ + "\0" /* 431 */ + "PHPStan\\Analyser\\ClosureParameterTypes\0" /* 432 */ + "resolve\0" /* 471 */ + "PhpParser\\Node\\Expr\0" /* 479 */ + "resolveCallableTypeForScope\0" /* 499 */ + "closureExpr\0" /* 527 */ + "args\0" /* 539 */ + "typeGetter\0" /* 544 */ + "Closure\0" /* 555 */ + "createCallArgsParameters"; /* 563 */ inline constexpr reg::PackedArg args[] = { - reg::packed(0, 0, 18), /* __construct $nodeScopeResolver */ - reg::packed(53, 0, 73), /* __construct $closureTypeResolver */ - reg::packed(129, 0, 164), /* __construct $contextualClosureParameterResolver */ - reg::packed(247, 0, 253), /* resolve $scope */ - reg::packed(284, 0, 289), /* resolve $expr */ - reg::packed(351, MAY_BE_NULL, 359), /* resolve $storage */ - reg::packed(400, MAY_BE_NULL | MAY_BE_ARRAY), /* resolve $callArgs */ - reg::packed(409, MAY_BE_NULL, 422), /* resolve $passedToType */ - reg::packed(440, MAY_BE_NULL, 422), /* resolve $nativePassedToType */ - reg::packed(459, 0, 460), /* resolve return */ - reg::packed(284, 0, 507), /* resolveCallableTypeForScope $expr */ - reg::packed(247, 0, 253), /* resolveCallableTypeForScope $scope */ - reg::packed(459, 0, 422), /* resolveCallableTypeForScope return */ - reg::packed(247, 0, 253), /* createCallArgsParameters $scope */ - reg::packed(555, 0, 507), /* createCallArgsParameters $closureExpr */ - reg::packed(567, MAY_BE_ARRAY), /* createCallArgsParameters $args */ - reg::packed(572, 0, 583), /* createCallArgsParameters $typeGetter */ - reg::packed(459, MAY_BE_NULL | MAY_BE_ARRAY), /* createCallArgsParameters return */ + reg::packed(0, 0, 10), /* __construct $container */ + reg::packed(48, 0, 66), /* __construct $nodeScopeResolver */ + reg::packed(101, 0, 136), /* __construct $contextualClosureParameterResolver */ + reg::packed(219, 0, 225), /* resolve $scope */ + reg::packed(256, 0, 261), /* resolve $expr */ + reg::packed(323, MAY_BE_NULL, 331), /* resolve $storage */ + reg::packed(372, MAY_BE_NULL | MAY_BE_ARRAY), /* resolve $callArgs */ + reg::packed(381, MAY_BE_NULL, 394), /* resolve $passedToType */ + reg::packed(412, MAY_BE_NULL, 394), /* resolve $nativePassedToType */ + reg::packed(431, 0, 432), /* resolve return */ + reg::packed(256, 0, 479), /* resolveCallableTypeForScope $expr */ + reg::packed(219, 0, 225), /* resolveCallableTypeForScope $scope */ + reg::packed(431, 0, 394), /* resolveCallableTypeForScope return */ + reg::packed(219, 0, 225), /* createCallArgsParameters $scope */ + reg::packed(527, 0, 479), /* createCallArgsParameters $closureExpr */ + reg::packed(539, MAY_BE_ARRAY), /* createCallArgsParameters $args */ + reg::packed(544, 0, 555), /* createCallArgsParameters $typeGetter */ + reg::packed(431, MAY_BE_NULL | MAY_BE_ARRAY), /* createCallArgsParameters return */ }; using Sig = reg::Sig; } // namespace sigtab /* the signatures of the methods the class declares itself (a used trait's are in the trait's header) */ namespace sig { -inline constexpr sigtab::Sig __construct = { { 235 /* __construct */, 3, 0, 3, reg::NoArg, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig resolve = { { 499 /* resolve */, 6, 3, 6, 9, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig resolveCallableTypeForScope = { { 527 /* resolveCallableTypeForScope */, 2, 10, 2, 12, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig createCallArgsParameters = { { 591 /* createCallArgsParameters */, 4, 13, 4, 17, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig __construct = { { 207 /* __construct */, 3, 0, 3, reg::NoArg, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig resolve = { { 471 /* resolve */, 6, 3, 6, 9, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig resolveCallableTypeForScope = { { 499 /* resolveCallableTypeForScope */, 2, 10, 2, 12, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig createCallArgsParameters = { { 563 /* createCallArgsParameters */, 4, 13, 4, 17, ZEND_ACC_PRIVATE } }; } // namespace sig } // namespace ptdecl::ClosureParameterResolver diff --git a/turbo-ext/src/generated/ClosureProcessor.h b/turbo-ext/src/generated/ClosureProcessor.h index 942087e1fb9..78506a0e665 100644 --- a/turbo-ext/src/generated/ClosureProcessor.h +++ b/turbo-ext/src/generated/ClosureProcessor.h @@ -32,6 +32,8 @@ inline void declareProperties(reg::Class &cls) cls.property("closureTypeResolver", ZEND_ACC_PRIVATE, reg::PropertyKind::Typed, 0, "PHPStan\\Analyser\\ExprHandler\\Helper\\ClosureTypeResolver"); cls.property("contextualClosureParameterResolver", ZEND_ACC_PRIVATE, reg::PropertyKind::Typed, 0, "PHPStan\\Analyser\\ExprHandler\\Helper\\ContextualClosureParameterResolver"); cls.property("closureSignatureInference", ZEND_ACC_PRIVATE, reg::PropertyKind::Typed, 0, "PHPStan\\Analyser\\Generics\\ClosureSignatureInference"); + cls.property("closureTypeWalkDepth", ZEND_ACC_PRIVATE | ZEND_ACC_STATIC, reg::PropertyKind::TypedLong, 0); + cls.property("cappedClosureTypeWalks", ZEND_ACC_PRIVATE | ZEND_ACC_STATIC, reg::PropertyKind::TypedLong, 0); } /* the string and parameter tables the signatures below index into (see reg::Sig) */ @@ -68,50 +70,61 @@ inline constexpr char strings[] = "nodeCallback\0" /* 819 */ "PHPStan\\Dependency\\Dependencies\0" /* 832 */ "processAttributeGroupsAndParams\0" /* 864 */ - "PhpParser\\Node\\Expr\\Closure\0" /* 896 */ - "context\0" /* 924 */ - "PHPStan\\Analyser\\ExpressionContext\0" /* 932 */ - "passedToType\0" /* 967 */ - "PHPStan\\Type\\Type\0" /* 980 */ - "nativePassedToType\0" /* 998 */ - "null\0" /* 1017 */ - "PHPStan\\Analyser\\ProcessClosureResult\0" /* 1022 */ - "processClosureNode\0" /* 1060 */ - "processClosureNodeInternal\0" /* 1079 */ - "call\0" /* 1106 */ - "PhpParser\\Node\\Expr\0" /* 1111 */ - "argumentTypes\0" /* 1131 */ - "creationScope\0" /* 1145 */ - "untilFixpoint\0" /* 1159 */ - "processByRefInvocation\0" /* 1173 */ - "entryScope\0" /* 1196 */ - "enter\0" /* 1207 */ - "byRefUses\0" /* 1213 */ - "walkByRefInvocation\0" /* 1223 */ - "byRefEntryTypes\0" /* 1243 */ - "processDeferredByRefClosureBody\0" /* 1259 */ - "callableParameters\0" /* 1291 */ - "enterWithCapturedUses\0" /* 1310 */ - "rightSideExpr\0" /* 1332 */ - "variableName\0" /* 1346 */ - "resolveAssignedClosureType\0" /* 1359 */ - "getByRefUseNames\0" /* 1386 */ - "source\0" /* 1403 */ - "assignByRefUses\0" /* 1410 */ - "closureScope\0" /* 1426 */ - "gatheredReturnStatementsWithScope\0" /* 1439 */ - "gatheredYieldStatementsWithScope\0" /* 1473 */ - "executionEnds\0" /* 1506 */ - "throwPoints\0" /* 1520 */ - "impurePoints\0" /* 1532 */ - "invalidateExpressions\0" /* 1545 */ - "refineClosureNodeScope\0" /* 1567 */ - "invalidatedExpressions\0" /* 1590 */ - "uses\0" /* 1613 */ - "processImmediatelyCalledCallable\0" /* 1618 */ - "PhpParser\\Node\\Expr\\ArrowFunction\0" /* 1651 */ - "PHPStan\\Analyser\\ProcessArrowFunctionResult\0" /* 1685 */ - "processArrowFunctionNode"; /* 1729 */ + "invokedDuringCall\0" /* 896 */ + "markCallbackArgument\0" /* 914 */ + "functionScope\0" /* 935 */ + "enterWhereInvoked\0" /* 949 */ + "null\0" /* 967 */ + "passedToType\0" /* 972 */ + "PHPStan\\Type\\Type\0" /* 985 */ + "byRefUseTypes\0" /* 1003 */ + "[]\0" /* 1017 */ + "PHPStan\\Type\\ClosureType\0" /* 1020 */ + "getClosureType\0" /* 1045 */ + "impurePoints\0" /* 1060 */ + "invalidateExpressions\0" /* 1073 */ + "returnStatements\0" /* 1095 */ + "yieldStatements\0" /* 1112 */ + "executionEnds\0" /* 1128 */ + "createClosureTypeGatherer\0" /* 1142 */ + "PhpParser\\Node\\Expr\\Closure\0" /* 1168 */ + "context\0" /* 1196 */ + "PHPStan\\Analyser\\ExpressionContext\0" /* 1204 */ + "nativePassedToType\0" /* 1239 */ + "PHPStan\\Analyser\\ProcessClosureResult\0" /* 1258 */ + "processClosureNode\0" /* 1296 */ + "processClosureNodeInternal\0" /* 1315 */ + "call\0" /* 1342 */ + "PhpParser\\Node\\Expr\0" /* 1347 */ + "argumentTypes\0" /* 1367 */ + "creationScope\0" /* 1381 */ + "untilFixpoint\0" /* 1395 */ + "processByRefInvocation\0" /* 1409 */ + "entryScope\0" /* 1432 */ + "enter\0" /* 1443 */ + "byRefUses\0" /* 1449 */ + "walkByRefInvocation\0" /* 1459 */ + "byRefEntryTypes\0" /* 1479 */ + "processDeferredByRefClosureBody\0" /* 1495 */ + "callableParameters\0" /* 1527 */ + "enterWithCapturedUses\0" /* 1546 */ + "rightSideExpr\0" /* 1568 */ + "variableName\0" /* 1582 */ + "resolveAssignedClosureType\0" /* 1595 */ + "getByRefUseNames\0" /* 1622 */ + "source\0" /* 1639 */ + "assignByRefUses\0" /* 1646 */ + "closureScope\0" /* 1662 */ + "gatheredReturnStatementsWithScope\0" /* 1675 */ + "gatheredYieldStatementsWithScope\0" /* 1709 */ + "throwPoints\0" /* 1742 */ + "refineClosureNodeScope\0" /* 1754 */ + "invalidatedExpressions\0" /* 1777 */ + "uses\0" /* 1800 */ + "processImmediatelyCalledCallable\0" /* 1805 */ + "PhpParser\\Node\\Expr\\ArrowFunction\0" /* 1838 */ + "PHPStan\\Analyser\\ProcessArrowFunctionResult\0" /* 1872 */ + "processArrowFunctionNode"; /* 1916 */ inline constexpr reg::PackedArg args[] = { reg::packed(0, 0, 10), /* __construct $container */ reg::packed(48, 0, 72), /* __construct $expressionResultFactory */ @@ -128,92 +141,111 @@ inline constexpr reg::PackedArg args[] = { reg::packed(770, 0, 778), /* processAttributeGroupsAndParams $storage */ reg::packed(819, MAY_BE_CALLABLE), /* processAttributeGroupsAndParams $nodeCallback */ reg::packed(471, MAY_BE_NULL, 832), /* processAttributeGroupsAndParams return */ + reg::packed(666, 0, 671), /* markCallbackArgument $expr */ + reg::packed(896, MAY_BE_BOOL), /* markCallbackArgument $invokedDuringCall */ + reg::packed(471, MAY_BE_VOID), /* markCallbackArgument return */ + reg::packed(935, 0, 739), /* enterWhereInvoked $functionScope */ + reg::packed(666, 0, 671), /* enterWhereInvoked $expr */ + reg::packed(471, 0, 739), /* enterWhereInvoked return */ + reg::packed(733, 0, 739), /* getClosureType $scope */ + reg::packed(666, 0, 671), /* getClosureType $expr */ + reg::packed(770, MAY_BE_NULL, 778, false, false, 967), /* getClosureType $storage */ + reg::packed(972, MAY_BE_NULL, 985, false, false, 967), /* getClosureType $passedToType */ + reg::packed(1003, MAY_BE_ARRAY, reg::NoString, false, false, 1017), /* getClosureType $byRefUseTypes */ + reg::packed(471, 0, 1020), /* getClosureType return */ + reg::packed(935, 0, 739), /* createClosureTypeGatherer $functionScope */ + reg::packed(1060, MAY_BE_ARRAY, reg::NoString, true, false), /* createClosureTypeGatherer $impurePoints */ + reg::packed(1073, MAY_BE_ARRAY, reg::NoString, true, false), /* createClosureTypeGatherer $invalidateExpressions */ + reg::packed(1095, MAY_BE_ARRAY, reg::NoString, true, false, 1017), /* createClosureTypeGatherer $returnStatements */ + reg::packed(1112, MAY_BE_ARRAY, reg::NoString, true, false, 1017), /* createClosureTypeGatherer $yieldStatements */ + reg::packed(1128, MAY_BE_ARRAY, reg::NoString, true, false, 1017), /* createClosureTypeGatherer $executionEnds */ + reg::packed(471, MAY_BE_CALLABLE), /* createClosureTypeGatherer return */ reg::packed(588, 0, 606), /* processClosureNode $nodeScopeResolver */ reg::packed(641, 0, 646), /* processClosureNode $stmt */ - reg::packed(666, 0, 896), /* processClosureNode $expr */ + reg::packed(666, 0, 1168), /* processClosureNode $expr */ reg::packed(733, 0, 739), /* processClosureNode $scope */ reg::packed(770, 0, 778), /* processClosureNode $storage */ reg::packed(819, MAY_BE_CALLABLE), /* processClosureNode $nodeCallback */ - reg::packed(924, 0, 932), /* processClosureNode $context */ - reg::packed(967, MAY_BE_NULL, 980), /* processClosureNode $passedToType */ - reg::packed(998, MAY_BE_NULL, 980, false, false, 1017), /* processClosureNode $nativePassedToType */ - reg::packed(471, 0, 1022), /* processClosureNode return */ + reg::packed(1196, 0, 1204), /* processClosureNode $context */ + reg::packed(972, MAY_BE_NULL, 985), /* processClosureNode $passedToType */ + reg::packed(1239, MAY_BE_NULL, 985, false, false, 967), /* processClosureNode $nativePassedToType */ + reg::packed(471, 0, 1258), /* processClosureNode return */ reg::packed(588, 0, 606), /* processClosureNodeInternal $nodeScopeResolver */ reg::packed(641, 0, 646), /* processClosureNodeInternal $stmt */ - reg::packed(666, 0, 896), /* processClosureNodeInternal $expr */ + reg::packed(666, 0, 1168), /* processClosureNodeInternal $expr */ reg::packed(733, 0, 739), /* processClosureNodeInternal $scope */ reg::packed(770, 0, 778), /* processClosureNodeInternal $storage */ reg::packed(819, MAY_BE_CALLABLE), /* processClosureNodeInternal $nodeCallback */ - reg::packed(924, 0, 932), /* processClosureNodeInternal $context */ - reg::packed(967, MAY_BE_NULL, 980), /* processClosureNodeInternal $passedToType */ - reg::packed(998, MAY_BE_NULL, 980, false, false, 1017), /* processClosureNodeInternal $nativePassedToType */ - reg::packed(471, 0, 1022), /* processClosureNodeInternal return */ + reg::packed(1196, 0, 1204), /* processClosureNodeInternal $context */ + reg::packed(972, MAY_BE_NULL, 985), /* processClosureNodeInternal $passedToType */ + reg::packed(1239, MAY_BE_NULL, 985, false, false, 967), /* processClosureNodeInternal $nativePassedToType */ + reg::packed(471, 0, 1258), /* processClosureNodeInternal return */ reg::packed(588, 0, 606), /* processByRefInvocation $nodeScopeResolver */ - reg::packed(666, 0, 896), /* processByRefInvocation $expr */ - reg::packed(1106, 0, 1111), /* processByRefInvocation $call */ + reg::packed(666, 0, 1168), /* processByRefInvocation $expr */ + reg::packed(1342, 0, 1347), /* processByRefInvocation $call */ reg::packed(733, 0, 739), /* processByRefInvocation $scope */ reg::packed(770, 0, 778), /* processByRefInvocation $storage */ - reg::packed(1131, MAY_BE_ARRAY), /* processByRefInvocation $argumentTypes */ - reg::packed(1145, 0, 739), /* processByRefInvocation $creationScope */ - reg::packed(1159, MAY_BE_BOOL), /* processByRefInvocation $untilFixpoint */ + reg::packed(1367, MAY_BE_ARRAY), /* processByRefInvocation $argumentTypes */ + reg::packed(1381, 0, 739), /* processByRefInvocation $creationScope */ + reg::packed(1395, MAY_BE_BOOL), /* processByRefInvocation $untilFixpoint */ reg::packed(471, MAY_BE_ARRAY), /* processByRefInvocation return */ reg::packed(588, 0, 606), /* walkByRefInvocation $nodeScopeResolver */ - reg::packed(666, 0, 896), /* walkByRefInvocation $expr */ + reg::packed(666, 0, 1168), /* walkByRefInvocation $expr */ reg::packed(733, 0, 739), /* walkByRefInvocation $scope */ reg::packed(770, 0, 778), /* walkByRefInvocation $storage */ - reg::packed(1196, 0, 739), /* walkByRefInvocation $entryScope */ - reg::packed(1207, MAY_BE_CALLABLE), /* walkByRefInvocation $enter */ - reg::packed(1213, MAY_BE_ARRAY), /* walkByRefInvocation $byRefUses */ - reg::packed(1159, MAY_BE_BOOL), /* walkByRefInvocation $untilFixpoint */ + reg::packed(1432, 0, 739), /* walkByRefInvocation $entryScope */ + reg::packed(1443, MAY_BE_CALLABLE), /* walkByRefInvocation $enter */ + reg::packed(1449, MAY_BE_ARRAY), /* walkByRefInvocation $byRefUses */ + reg::packed(1395, MAY_BE_BOOL), /* walkByRefInvocation $untilFixpoint */ reg::packed(471, MAY_BE_ARRAY), /* walkByRefInvocation return */ reg::packed(588, 0, 606), /* processDeferredByRefClosureBody $nodeScopeResolver */ - reg::packed(666, 0, 896), /* processDeferredByRefClosureBody $expr */ + reg::packed(666, 0, 1168), /* processDeferredByRefClosureBody $expr */ reg::packed(733, 0, 739), /* processDeferredByRefClosureBody $scope */ reg::packed(770, 0, 778), /* processDeferredByRefClosureBody $storage */ reg::packed(819, MAY_BE_CALLABLE), /* processDeferredByRefClosureBody $nodeCallback */ - reg::packed(1243, MAY_BE_ARRAY), /* processDeferredByRefClosureBody $byRefEntryTypes */ + reg::packed(1479, MAY_BE_ARRAY), /* processDeferredByRefClosureBody $byRefEntryTypes */ reg::packed(471, MAY_BE_NULL, 832), /* processDeferredByRefClosureBody return */ reg::packed(733, 0, 739), /* enterWithCapturedUses $scope */ - reg::packed(666, 0, 896), /* enterWithCapturedUses $expr */ - reg::packed(1291, MAY_BE_ARRAY), /* enterWithCapturedUses $callableParameters */ - reg::packed(1145, 0, 739), /* enterWithCapturedUses $creationScope */ + reg::packed(666, 0, 1168), /* enterWithCapturedUses $expr */ + reg::packed(1527, MAY_BE_ARRAY), /* enterWithCapturedUses $callableParameters */ + reg::packed(1381, 0, 739), /* enterWithCapturedUses $creationScope */ reg::packed(471, 0, 739), /* enterWithCapturedUses return */ - reg::packed(1332, 0, 1111), /* resolveAssignedClosureType $rightSideExpr */ - reg::packed(666, 0, 896), /* resolveAssignedClosureType $expr */ + reg::packed(1568, 0, 1347), /* resolveAssignedClosureType $rightSideExpr */ + reg::packed(666, 0, 1168), /* resolveAssignedClosureType $expr */ reg::packed(733, 0, 739), /* resolveAssignedClosureType $scope */ - reg::packed(1346, MAY_BE_STRING), /* resolveAssignedClosureType $variableName */ - reg::packed(471, 0, 980), /* resolveAssignedClosureType return */ - reg::packed(1213, MAY_BE_ARRAY), /* getByRefUseNames $byRefUses */ + reg::packed(1582, MAY_BE_STRING), /* resolveAssignedClosureType $variableName */ + reg::packed(471, 0, 985), /* resolveAssignedClosureType return */ + reg::packed(1449, MAY_BE_ARRAY), /* getByRefUseNames $byRefUses */ reg::packed(471, MAY_BE_ARRAY), /* getByRefUseNames return */ reg::packed(733, 0, 739), /* assignByRefUses $scope */ - reg::packed(1403, 0, 739), /* assignByRefUses $source */ - reg::packed(1213, MAY_BE_ARRAY), /* assignByRefUses $byRefUses */ + reg::packed(1639, 0, 739), /* assignByRefUses $source */ + reg::packed(1449, MAY_BE_ARRAY), /* assignByRefUses $byRefUses */ reg::packed(471, 0, 739), /* assignByRefUses return */ - reg::packed(1426, 0, 739), /* refineClosureNodeScope $closureScope */ + reg::packed(1662, 0, 739), /* refineClosureNodeScope $closureScope */ reg::packed(733, 0, 739), /* refineClosureNodeScope $scope */ - reg::packed(666, 0, 896), /* refineClosureNodeScope $expr */ - reg::packed(1439, MAY_BE_ARRAY), /* refineClosureNodeScope $gatheredReturnStatementsWithScope */ - reg::packed(1473, MAY_BE_ARRAY), /* refineClosureNodeScope $gatheredYieldStatementsWithScope */ - reg::packed(1506, MAY_BE_ARRAY), /* refineClosureNodeScope $executionEnds */ - reg::packed(1520, MAY_BE_ARRAY), /* refineClosureNodeScope $throwPoints */ - reg::packed(1532, MAY_BE_ARRAY), /* refineClosureNodeScope $impurePoints */ - reg::packed(1545, MAY_BE_ARRAY), /* refineClosureNodeScope $invalidateExpressions */ + reg::packed(666, 0, 1168), /* refineClosureNodeScope $expr */ + reg::packed(1675, MAY_BE_ARRAY), /* refineClosureNodeScope $gatheredReturnStatementsWithScope */ + reg::packed(1709, MAY_BE_ARRAY), /* refineClosureNodeScope $gatheredYieldStatementsWithScope */ + reg::packed(1128, MAY_BE_ARRAY), /* refineClosureNodeScope $executionEnds */ + reg::packed(1742, MAY_BE_ARRAY), /* refineClosureNodeScope $throwPoints */ + reg::packed(1060, MAY_BE_ARRAY), /* refineClosureNodeScope $impurePoints */ + reg::packed(1073, MAY_BE_ARRAY), /* refineClosureNodeScope $invalidateExpressions */ reg::packed(770, 0, 778), /* refineClosureNodeScope $storage */ reg::packed(471, 0, 739), /* refineClosureNodeScope return */ reg::packed(733, 0, 739), /* processImmediatelyCalledCallable $scope */ - reg::packed(1590, MAY_BE_ARRAY), /* processImmediatelyCalledCallable $invalidatedExpressions */ - reg::packed(1613, MAY_BE_ARRAY), /* processImmediatelyCalledCallable $uses */ + reg::packed(1777, MAY_BE_ARRAY), /* processImmediatelyCalledCallable $invalidatedExpressions */ + reg::packed(1800, MAY_BE_ARRAY), /* processImmediatelyCalledCallable $uses */ reg::packed(471, 0, 739), /* processImmediatelyCalledCallable return */ reg::packed(588, 0, 606), /* processArrowFunctionNode $nodeScopeResolver */ reg::packed(641, 0, 646), /* processArrowFunctionNode $stmt */ - reg::packed(666, 0, 1651), /* processArrowFunctionNode $expr */ + reg::packed(666, 0, 1838), /* processArrowFunctionNode $expr */ reg::packed(733, 0, 739), /* processArrowFunctionNode $scope */ reg::packed(770, 0, 778), /* processArrowFunctionNode $storage */ reg::packed(819, MAY_BE_CALLABLE), /* processArrowFunctionNode $nodeCallback */ - reg::packed(967, MAY_BE_NULL, 980), /* processArrowFunctionNode $passedToType */ - reg::packed(998, MAY_BE_NULL, 980, false, false, 1017), /* processArrowFunctionNode $nativePassedToType */ - reg::packed(924, MAY_BE_NULL, 932, false, false, 1017), /* processArrowFunctionNode $context */ - reg::packed(471, 0, 1685), /* processArrowFunctionNode return */ + reg::packed(972, MAY_BE_NULL, 985), /* processArrowFunctionNode $passedToType */ + reg::packed(1239, MAY_BE_NULL, 985, false, false, 967), /* processArrowFunctionNode $nativePassedToType */ + reg::packed(1196, MAY_BE_NULL, 1204, false, false, 967), /* processArrowFunctionNode $context */ + reg::packed(471, 0, 1872), /* processArrowFunctionNode return */ }; using Sig = reg::Sig; } // namespace sigtab @@ -224,18 +256,22 @@ inline constexpr sigtab::Sig __construct = { { 459 /* __construct */, 6, 0, 6, r inline constexpr sigtab::Sig getParametersProcessor = { { 509 /* getParametersProcessor */, 0, 6, 0, 6, ZEND_ACC_PRIVATE } }; inline constexpr sigtab::Sig getAttributesHandler = { { 567 /* getAttributesHandler */, 0, 7, 0, 7, ZEND_ACC_PRIVATE } }; inline constexpr sigtab::Sig processAttributeGroupsAndParams = { { 864 /* processAttributeGroupsAndParams */, 6, 8, 6, 14, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig processClosureNode = { { 1060 /* processClosureNode */, 8, 15, 9, 24, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig processClosureNodeInternal = { { 1079 /* processClosureNodeInternal */, 8, 25, 9, 34, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig processByRefInvocation = { { 1173 /* processByRefInvocation */, 8, 35, 8, 43, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig walkByRefInvocation = { { 1223 /* walkByRefInvocation */, 8, 44, 8, 52, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig processDeferredByRefClosureBody = { { 1259 /* processDeferredByRefClosureBody */, 6, 53, 6, 59, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig enterWithCapturedUses = { { 1310 /* enterWithCapturedUses */, 4, 60, 4, 64, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig resolveAssignedClosureType = { { 1359 /* resolveAssignedClosureType */, 4, 65, 4, 69, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig getByRefUseNames = { { 1386 /* getByRefUseNames */, 1, 70, 1, 71, ZEND_ACC_PRIVATE | ZEND_ACC_STATIC } }; -inline constexpr sigtab::Sig assignByRefUses = { { 1410 /* assignByRefUses */, 3, 72, 3, 75, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig refineClosureNodeScope = { { 1567 /* refineClosureNodeScope */, 10, 76, 10, 86, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig processImmediatelyCalledCallable = { { 1618 /* processImmediatelyCalledCallable */, 3, 87, 3, 90, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig processArrowFunctionNode = { { 1729 /* processArrowFunctionNode */, 7, 91, 9, 100, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig markCallbackArgument = { { 914 /* markCallbackArgument */, 2, 15, 2, 17, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC } }; +inline constexpr sigtab::Sig enterWhereInvoked = { { 949 /* enterWhereInvoked */, 2, 18, 2, 20, ZEND_ACC_PRIVATE | ZEND_ACC_STATIC } }; +inline constexpr sigtab::Sig getClosureType = { { 1045 /* getClosureType */, 2, 21, 5, 26, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig createClosureTypeGatherer = { { 1142 /* createClosureTypeGatherer */, 3, 27, 6, 33, ZEND_ACC_PRIVATE | ZEND_ACC_STATIC } }; +inline constexpr sigtab::Sig processClosureNode = { { 1296 /* processClosureNode */, 8, 34, 9, 43, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig processClosureNodeInternal = { { 1315 /* processClosureNodeInternal */, 8, 44, 9, 53, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig processByRefInvocation = { { 1409 /* processByRefInvocation */, 8, 54, 8, 62, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig walkByRefInvocation = { { 1459 /* walkByRefInvocation */, 8, 63, 8, 71, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig processDeferredByRefClosureBody = { { 1495 /* processDeferredByRefClosureBody */, 6, 72, 6, 78, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig enterWithCapturedUses = { { 1546 /* enterWithCapturedUses */, 4, 79, 4, 83, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig resolveAssignedClosureType = { { 1595 /* resolveAssignedClosureType */, 4, 84, 4, 88, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig getByRefUseNames = { { 1622 /* getByRefUseNames */, 1, 89, 1, 90, ZEND_ACC_PRIVATE | ZEND_ACC_STATIC } }; +inline constexpr sigtab::Sig assignByRefUses = { { 1646 /* assignByRefUses */, 3, 91, 3, 94, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig refineClosureNodeScope = { { 1754 /* refineClosureNodeScope */, 10, 95, 10, 105, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig processImmediatelyCalledCallable = { { 1805 /* processImmediatelyCalledCallable */, 3, 106, 3, 109, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig processArrowFunctionNode = { { 1916 /* processArrowFunctionNode */, 7, 110, 9, 119, ZEND_ACC_PUBLIC } }; } // namespace sig } // namespace ptdecl::ClosureProcessor diff --git a/turbo-ext/src/generated/ClosureTypeResolver.h b/turbo-ext/src/generated/ClosureTypeResolver.h index 2b73faf6f95..aadf3578c32 100644 --- a/turbo-ext/src/generated/ClosureTypeResolver.h +++ b/turbo-ext/src/generated/ClosureTypeResolver.h @@ -11,10 +11,9 @@ namespace ptdecl::ClosureTypeResolver { /* the OBJ_PROP_NUM slots of the instance properties the class declares (the inherited ones come first) */ namespace slot { inline constexpr uint32_t cachedTypes = 0; -inline constexpr uint32_t nodeScopeResolver = 1; -inline constexpr uint32_t initializerExprTypeResolver = 2; -inline constexpr uint32_t contextualClosureParameterResolver = 3; -inline constexpr uint32_t closureSignatureInference = 4; +inline constexpr uint32_t initializerExprTypeResolver = 1; +inline constexpr uint32_t contextualClosureParameterResolver = 2; +inline constexpr uint32_t closureSignatureInference = 3; } // namespace slot inline void declareClass(reg::Class &cls) @@ -26,10 +25,7 @@ inline void declareClass(reg::Class &cls) /* the properties the class declares itself, in declaration order (a used trait's come from its registrar) */ inline void declareProperties(reg::Class &cls) { - cls.property("resolveClosureTypeDepth", ZEND_ACC_PRIVATE | ZEND_ACC_STATIC, reg::PropertyKind::TypedLong, 0); - cls.property("cappedClosureTypeWalks", ZEND_ACC_PRIVATE | ZEND_ACC_STATIC, reg::PropertyKind::TypedLong, 0); cls.property("cachedTypes", ZEND_ACC_PRIVATE, reg::PropertyKind::TypedEmptyArray, MAY_BE_ARRAY); - cls.property("nodeScopeResolver", ZEND_ACC_PRIVATE, reg::PropertyKind::Typed, 0, "PHPStan\\Analyser\\NodeScopeResolver"); cls.property("initializerExprTypeResolver", ZEND_ACC_PRIVATE, reg::PropertyKind::Typed, 0, "PHPStan\\Reflection\\InitializerExprTypeResolver"); cls.property("contextualClosureParameterResolver", ZEND_ACC_PRIVATE, reg::PropertyKind::Typed, 0, "PHPStan\\Analyser\\ExprHandler\\Helper\\ContextualClosureParameterResolver"); cls.property("closureSignatureInference", ZEND_ACC_PRIVATE, reg::PropertyKind::Typed, 0, "PHPStan\\Analyser\\Generics\\ClosureSignatureInference"); @@ -38,204 +34,212 @@ inline void declareProperties(reg::Class &cls) /* the string and parameter tables the signatures below index into (see reg::Sig) */ namespace sigtab { inline constexpr char strings[] = - "nodeScopeResolver\0" /* 0 */ - "PHPStan\\Analyser\\NodeScopeResolver\0" /* 18 */ - "initializerExprTypeResolver\0" /* 53 */ - "PHPStan\\Reflection\\InitializerExprTypeResolver\0" /* 81 */ - "contextualClosureParameterResolver\0" /* 128 */ - "PHPStan\\Analyser\\ExprHandler\\Helper\\ContextualClosureParameterResolver\0" /* 163 */ - "closureSignatureInference\0" /* 234 */ - "PHPStan\\Analyser\\Generics\\ClosureSignatureInference\0" /* 260 */ - "__construct\0" /* 312 */ - "\0" /* 324 */ - "resetFileAnalysisState\0" /* 325 */ - "expr\0" /* 348 */ - "PhpParser\\Node\\Expr\\Closure|PhpParser\\Node\\Expr\\ArrowFunction\0" /* 353 */ - "findCachedTypes\0" /* 415 */ - "scope\0" /* 431 */ - "PHPStan\\Analyser\\MutatingScope\0" /* 437 */ - "shallow\0" /* 468 */ - "false\0" /* 476 */ - "storage\0" /* 482 */ - "PHPStan\\Analyser\\ExpressionResultStorage\0" /* 490 */ - "null\0" /* 531 */ - "passedToType\0" /* 536 */ - "PHPStan\\Type\\Type\0" /* 549 */ - "byRefUseTypes\0" /* 567 */ - "[]\0" /* 581 */ - "PHPStan\\Type\\ClosureType\0" /* 584 */ - "getClosureType\0" /* 609 */ - "walkStorage\0" /* 624 */ - "cappedBefore\0" /* 636 */ - "readableWalkStorage\0" /* 649 */ - "PhpParser\\Node\\Expr\\Closure\0" /* 669 */ - "returnStatements\0" /* 697 */ - "yieldStatements\0" /* 714 */ - "executionEnds\0" /* 730 */ - "throwPoints\0" /* 744 */ - "impurePoints\0" /* 756 */ - "invalidateExpressions\0" /* 769 */ - "native\0" /* 791 */ - "nativePassedToType\0" /* 798 */ - "buildClosureTypeForClosure\0" /* 817 */ - "PhpParser\\Node\\Expr\\ArrowFunction\0" /* 844 */ - "arrowScope\0" /* 878 */ - "buildClosureTypeForArrowFunction\0" /* 889 */ - "callableParameters\0" /* 922 */ - "parameters\0" /* 941 */ - "closureContextCacheKey\0" /* 952 */ - "freeVariableRoots\0" /* 975 */ - "PhpParser\\Node\\Expr\0" /* 993 */ - "readScope\0" /* 1013 */ - "readExprType\0" /* 1023 */ - "isVariadic\0" /* 1036 */ - "cacheKey\0" /* 1047 */ - "contextFree\0" /* 1056 */ - "buildClosureTypeFromClosureWalk\0" /* 1068 */ - "resolveArrowFunctionReturnType\0" /* 1100 */ - "deriveOnlyNeverExecutionEnds\0" /* 1131 */ - "buildDeclaredParameters\0" /* 1160 */ - "getDeclaredClosureType\0" /* 1184 */ - "templateSuffix\0" /* 1207 */ - "buildParametersAndAcceptors\0" /* 1222 */ - "cachedClosureData\0" /* 1250 */ - "createClosureTypeFromCache\0" /* 1268 */ - "returnType\0" /* 1295 */ - "usedVariables\0" /* 1306 */ - "assembleClosureType"; /* 1320 */ + "initializerExprTypeResolver\0" /* 0 */ + "PHPStan\\Reflection\\InitializerExprTypeResolver\0" /* 28 */ + "contextualClosureParameterResolver\0" /* 75 */ + "PHPStan\\Analyser\\ExprHandler\\Helper\\ContextualClosureParameterResolver\0" /* 110 */ + "closureSignatureInference\0" /* 181 */ + "PHPStan\\Analyser\\Generics\\ClosureSignatureInference\0" /* 207 */ + "__construct\0" /* 259 */ + "\0" /* 271 */ + "resetFileAnalysisState\0" /* 272 */ + "expr\0" /* 295 */ + "PhpParser\\Node\\Expr\\Closure|PhpParser\\Node\\Expr\\ArrowFunction\0" /* 300 */ + "findCachedTypes\0" /* 362 */ + "scope\0" /* 378 */ + "PHPStan\\Analyser\\MutatingScope\0" /* 384 */ + "storage\0" /* 415 */ + "PHPStan\\Analyser\\ExpressionResultStorage\0" /* 423 */ + "null\0" /* 464 */ + "passedToType\0" /* 469 */ + "PHPStan\\Type\\Type\0" /* 482 */ + "PHPStan\\Type\\ClosureType\0" /* 500 */ + "getShallowClosureType\0" /* 525 */ + "nativePassedToType\0" /* 547 */ + "byRefUseTypes\0" /* 566 */ + "templateSuffix\0" /* 580 */ + "findCachedClosureType\0" /* 595 */ + "getWalkPassedToTypes\0" /* 617 */ + "byRefUseTypesCacheKeySuffix\0" /* 638 */ + "PhpParser\\Node\\Expr\\Closure\0" /* 666 */ + "returnStatements\0" /* 694 */ + "yieldStatements\0" /* 711 */ + "executionEnds\0" /* 727 */ + "throwPoints\0" /* 741 */ + "impurePoints\0" /* 753 */ + "invalidateExpressions\0" /* 766 */ + "native\0" /* 788 */ + "false\0" /* 795 */ + "[]\0" /* 801 */ + "buildClosureTypeForClosure\0" /* 804 */ + "PhpParser\\Node\\Expr\\ArrowFunction\0" /* 831 */ + "arrowScope\0" /* 865 */ + "buildClosureTypeForArrowFunction\0" /* 876 */ + "callableParameters\0" /* 909 */ + "parameters\0" /* 928 */ + "closureContextCacheKey\0" /* 939 */ + "freeVariableRoots\0" /* 962 */ + "PhpParser\\Node\\Expr\0" /* 980 */ + "readScope\0" /* 1000 */ + "readExprType\0" /* 1010 */ + "isVariadic\0" /* 1023 */ + "cacheKey\0" /* 1034 */ + "contextFree\0" /* 1043 */ + "buildClosureTypeFromClosureWalk\0" /* 1055 */ + "resolveArrowFunctionReturnType\0" /* 1087 */ + "deriveOnlyNeverExecutionEnds\0" /* 1118 */ + "buildDeclaredParameters\0" /* 1147 */ + "getDeclaredClosureType\0" /* 1171 */ + "buildParametersAndAcceptors\0" /* 1194 */ + "cachedClosureData\0" /* 1222 */ + "createClosureTypeFromCache\0" /* 1240 */ + "returnType\0" /* 1267 */ + "usedVariables\0" /* 1278 */ + "assembleClosureType"; /* 1292 */ inline constexpr reg::PackedArg args[] = { - reg::packed(0, 0, 18), /* __construct $nodeScopeResolver */ - reg::packed(53, 0, 81), /* __construct $initializerExprTypeResolver */ - reg::packed(128, 0, 163), /* __construct $contextualClosureParameterResolver */ - reg::packed(234, 0, 260), /* __construct $closureSignatureInference */ - reg::packed(324, MAY_BE_VOID), /* resetFileAnalysisState return */ - reg::packed(348, 0, 353), /* findCachedTypes $expr */ - reg::packed(324, MAY_BE_ARRAY), /* findCachedTypes return */ - reg::packed(431, 0, 437), /* getClosureType $scope */ - reg::packed(348, 0, 353), /* getClosureType $expr */ - reg::packed(468, MAY_BE_BOOL, reg::NoString, false, false, 476), /* getClosureType $shallow */ - reg::packed(482, MAY_BE_NULL, 490, false, false, 531), /* getClosureType $storage */ - reg::packed(536, MAY_BE_NULL, 549, false, false, 531), /* getClosureType $passedToType */ - reg::packed(567, MAY_BE_ARRAY, reg::NoString, false, false, 581), /* getClosureType $byRefUseTypes */ - reg::packed(324, 0, 584), /* getClosureType return */ - reg::packed(624, 0, 490), /* readableWalkStorage $walkStorage */ - reg::packed(636, MAY_BE_LONG), /* readableWalkStorage $cappedBefore */ - reg::packed(324, MAY_BE_NULL, 490), /* readableWalkStorage return */ - reg::packed(431, 0, 437), /* buildClosureTypeForClosure $scope */ - reg::packed(348, 0, 669), /* buildClosureTypeForClosure $expr */ - reg::packed(697, MAY_BE_ARRAY), /* buildClosureTypeForClosure $returnStatements */ - reg::packed(714, MAY_BE_ARRAY), /* buildClosureTypeForClosure $yieldStatements */ - reg::packed(730, MAY_BE_ARRAY), /* buildClosureTypeForClosure $executionEnds */ - reg::packed(744, MAY_BE_ARRAY), /* buildClosureTypeForClosure $throwPoints */ - reg::packed(756, MAY_BE_ARRAY), /* buildClosureTypeForClosure $impurePoints */ - reg::packed(769, MAY_BE_ARRAY), /* buildClosureTypeForClosure $invalidateExpressions */ - reg::packed(791, MAY_BE_BOOL, reg::NoString, false, false, 476), /* buildClosureTypeForClosure $native */ - reg::packed(482, MAY_BE_NULL, 490, false, false, 531), /* buildClosureTypeForClosure $storage */ - reg::packed(536, MAY_BE_NULL, 549, false, false, 531), /* buildClosureTypeForClosure $passedToType */ - reg::packed(798, MAY_BE_NULL, 549, false, false, 531), /* buildClosureTypeForClosure $nativePassedToType */ - reg::packed(324, 0, 584), /* buildClosureTypeForClosure return */ - reg::packed(431, 0, 437), /* buildClosureTypeForArrowFunction $scope */ - reg::packed(348, 0, 844), /* buildClosureTypeForArrowFunction $expr */ - reg::packed(878, 0, 437), /* buildClosureTypeForArrowFunction $arrowScope */ - reg::packed(744, MAY_BE_ARRAY), /* buildClosureTypeForArrowFunction $throwPoints */ - reg::packed(756, MAY_BE_ARRAY), /* buildClosureTypeForArrowFunction $impurePoints */ - reg::packed(769, MAY_BE_ARRAY), /* buildClosureTypeForArrowFunction $invalidateExpressions */ - reg::packed(791, MAY_BE_BOOL, reg::NoString, false, false, 476), /* buildClosureTypeForArrowFunction $native */ - reg::packed(482, MAY_BE_NULL, 490, false, false, 531), /* buildClosureTypeForArrowFunction $storage */ - reg::packed(536, MAY_BE_NULL, 549, false, false, 531), /* buildClosureTypeForArrowFunction $passedToType */ - reg::packed(798, MAY_BE_NULL, 549, false, false, 531), /* buildClosureTypeForArrowFunction $nativePassedToType */ - reg::packed(324, 0, 584), /* buildClosureTypeForArrowFunction return */ - reg::packed(431, 0, 437), /* closureContextCacheKey $scope */ - reg::packed(348, 0, 353), /* closureContextCacheKey $expr */ - reg::packed(922, MAY_BE_NULL | MAY_BE_ARRAY), /* closureContextCacheKey $callableParameters */ - reg::packed(941, MAY_BE_ARRAY), /* closureContextCacheKey $parameters */ - reg::packed(324, MAY_BE_STRING), /* closureContextCacheKey return */ - reg::packed(348, 0, 353), /* freeVariableRoots $expr */ - reg::packed(324, MAY_BE_NULL | MAY_BE_ARRAY), /* freeVariableRoots return */ - reg::packed(482, MAY_BE_NULL, 490), /* readExprType $storage */ - reg::packed(348, 0, 993), /* readExprType $expr */ - reg::packed(1013, 0, 437), /* readExprType $readScope */ - reg::packed(791, MAY_BE_BOOL), /* readExprType $native */ - reg::packed(324, 0, 549), /* readExprType return */ - reg::packed(431, 0, 437), /* buildClosureTypeFromClosureWalk $scope */ - reg::packed(348, 0, 669), /* buildClosureTypeFromClosureWalk $expr */ - reg::packed(941, MAY_BE_ARRAY), /* buildClosureTypeFromClosureWalk $parameters */ - reg::packed(1036, MAY_BE_BOOL), /* buildClosureTypeFromClosureWalk $isVariadic */ - reg::packed(697, MAY_BE_ARRAY), /* buildClosureTypeFromClosureWalk $returnStatements */ - reg::packed(714, MAY_BE_ARRAY), /* buildClosureTypeFromClosureWalk $yieldStatements */ - reg::packed(730, MAY_BE_ARRAY), /* buildClosureTypeFromClosureWalk $executionEnds */ - reg::packed(744, MAY_BE_ARRAY), /* buildClosureTypeFromClosureWalk $throwPoints */ - reg::packed(756, MAY_BE_ARRAY), /* buildClosureTypeFromClosureWalk $impurePoints */ - reg::packed(769, MAY_BE_ARRAY), /* buildClosureTypeFromClosureWalk $invalidateExpressions */ - reg::packed(1047, MAY_BE_NULL | MAY_BE_STRING, reg::NoString, false, false, 531), /* buildClosureTypeFromClosureWalk $cacheKey */ - reg::packed(791, MAY_BE_BOOL, reg::NoString, false, false, 476), /* buildClosureTypeFromClosureWalk $native */ - reg::packed(482, MAY_BE_NULL, 490, false, false, 531), /* buildClosureTypeFromClosureWalk $storage */ - reg::packed(1056, MAY_BE_BOOL, reg::NoString, false, false, 476), /* buildClosureTypeFromClosureWalk $contextFree */ - reg::packed(324, 0, 584), /* buildClosureTypeFromClosureWalk return */ - reg::packed(431, 0, 437), /* resolveArrowFunctionReturnType $scope */ - reg::packed(878, 0, 437), /* resolveArrowFunctionReturnType $arrowScope */ - reg::packed(348, 0, 844), /* resolveArrowFunctionReturnType $expr */ - reg::packed(791, MAY_BE_BOOL, reg::NoString, false, false, 476), /* resolveArrowFunctionReturnType $native */ - reg::packed(482, MAY_BE_NULL, 490, false, false, 531), /* resolveArrowFunctionReturnType $storage */ - reg::packed(324, 0, 549), /* resolveArrowFunctionReturnType return */ - reg::packed(730, MAY_BE_ARRAY), /* deriveOnlyNeverExecutionEnds $executionEnds */ - reg::packed(324, MAY_BE_NULL | MAY_BE_BOOL), /* deriveOnlyNeverExecutionEnds return */ - reg::packed(431, 0, 437), /* buildDeclaredParameters $scope */ - reg::packed(348, 0, 353), /* buildDeclaredParameters $expr */ - reg::packed(324, MAY_BE_ARRAY), /* buildDeclaredParameters return */ - reg::packed(431, 0, 437), /* getDeclaredClosureType $scope */ - reg::packed(348, 0, 353), /* getDeclaredClosureType $expr */ - reg::packed(324, 0, 584), /* getDeclaredClosureType return */ - reg::packed(431, 0, 437), /* buildParametersAndAcceptors $scope */ - reg::packed(348, 0, 353), /* buildParametersAndAcceptors $expr */ - reg::packed(482, MAY_BE_NULL, 490, false, false, 531), /* buildParametersAndAcceptors $storage */ - reg::packed(536, MAY_BE_NULL, 549, false, false, 531), /* buildParametersAndAcceptors $passedToType */ - reg::packed(798, MAY_BE_NULL, 549, false, false, 531), /* buildParametersAndAcceptors $nativePassedToType */ - reg::packed(1207, MAY_BE_NULL | MAY_BE_STRING, reg::NoString, false, false, 531), /* buildParametersAndAcceptors $templateSuffix */ - reg::packed(324, MAY_BE_ARRAY), /* buildParametersAndAcceptors return */ - reg::packed(431, 0, 437), /* createClosureTypeFromCache $scope */ - reg::packed(348, 0, 353), /* createClosureTypeFromCache $expr */ - reg::packed(941, MAY_BE_ARRAY), /* createClosureTypeFromCache $parameters */ - reg::packed(1036, MAY_BE_BOOL), /* createClosureTypeFromCache $isVariadic */ - reg::packed(1250, MAY_BE_ARRAY), /* createClosureTypeFromCache $cachedClosureData */ - reg::packed(1056, MAY_BE_BOOL), /* createClosureTypeFromCache $contextFree */ - reg::packed(324, 0, 584), /* createClosureTypeFromCache return */ - reg::packed(431, 0, 437), /* assembleClosureType $scope */ - reg::packed(348, 0, 353), /* assembleClosureType $expr */ - reg::packed(941, MAY_BE_ARRAY), /* assembleClosureType $parameters */ - reg::packed(1036, MAY_BE_BOOL), /* assembleClosureType $isVariadic */ - reg::packed(1295, 0, 549), /* assembleClosureType $returnType */ - reg::packed(744, MAY_BE_ARRAY), /* assembleClosureType $throwPoints */ - reg::packed(756, MAY_BE_ARRAY), /* assembleClosureType $impurePoints */ - reg::packed(769, MAY_BE_ARRAY), /* assembleClosureType $invalidateExpressions */ - reg::packed(1306, MAY_BE_ARRAY), /* assembleClosureType $usedVariables */ - reg::packed(1047, MAY_BE_NULL | MAY_BE_STRING, reg::NoString, false, false, 531), /* assembleClosureType $cacheKey */ - reg::packed(1056, MAY_BE_BOOL, reg::NoString, false, false, 476), /* assembleClosureType $contextFree */ - reg::packed(324, 0, 584), /* assembleClosureType return */ + reg::packed(0, 0, 28), /* __construct $initializerExprTypeResolver */ + reg::packed(75, 0, 110), /* __construct $contextualClosureParameterResolver */ + reg::packed(181, 0, 207), /* __construct $closureSignatureInference */ + reg::packed(271, MAY_BE_VOID), /* resetFileAnalysisState return */ + reg::packed(295, 0, 300), /* findCachedTypes $expr */ + reg::packed(271, MAY_BE_ARRAY), /* findCachedTypes return */ + reg::packed(378, 0, 384), /* getShallowClosureType $scope */ + reg::packed(295, 0, 300), /* getShallowClosureType $expr */ + reg::packed(415, MAY_BE_NULL, 423, false, false, 464), /* getShallowClosureType $storage */ + reg::packed(469, MAY_BE_NULL, 482, false, false, 464), /* getShallowClosureType $passedToType */ + reg::packed(271, 0, 500), /* getShallowClosureType return */ + reg::packed(378, 0, 384), /* findCachedClosureType $scope */ + reg::packed(295, 0, 300), /* findCachedClosureType $expr */ + reg::packed(415, MAY_BE_NULL, 423), /* findCachedClosureType $storage */ + reg::packed(469, MAY_BE_NULL, 482), /* findCachedClosureType $passedToType */ + reg::packed(547, MAY_BE_NULL, 482), /* findCachedClosureType $nativePassedToType */ + reg::packed(566, MAY_BE_ARRAY), /* findCachedClosureType $byRefUseTypes */ + reg::packed(580, MAY_BE_STRING), /* findCachedClosureType $templateSuffix */ + reg::packed(271, MAY_BE_NULL, 500), /* findCachedClosureType return */ + reg::packed(378, 0, 384), /* getWalkPassedToTypes $scope */ + reg::packed(469, MAY_BE_NULL, 482), /* getWalkPassedToTypes $passedToType */ + reg::packed(580, MAY_BE_STRING), /* getWalkPassedToTypes $templateSuffix */ + reg::packed(271, MAY_BE_ARRAY), /* getWalkPassedToTypes return */ + reg::packed(566, MAY_BE_ARRAY), /* byRefUseTypesCacheKeySuffix $byRefUseTypes */ + reg::packed(271, MAY_BE_STRING), /* byRefUseTypesCacheKeySuffix return */ + reg::packed(378, 0, 384), /* buildClosureTypeForClosure $scope */ + reg::packed(295, 0, 666), /* buildClosureTypeForClosure $expr */ + reg::packed(694, MAY_BE_ARRAY), /* buildClosureTypeForClosure $returnStatements */ + reg::packed(711, MAY_BE_ARRAY), /* buildClosureTypeForClosure $yieldStatements */ + reg::packed(727, MAY_BE_ARRAY), /* buildClosureTypeForClosure $executionEnds */ + reg::packed(741, MAY_BE_ARRAY), /* buildClosureTypeForClosure $throwPoints */ + reg::packed(753, MAY_BE_ARRAY), /* buildClosureTypeForClosure $impurePoints */ + reg::packed(766, MAY_BE_ARRAY), /* buildClosureTypeForClosure $invalidateExpressions */ + reg::packed(788, MAY_BE_BOOL, reg::NoString, false, false, 795), /* buildClosureTypeForClosure $native */ + reg::packed(415, MAY_BE_NULL, 423, false, false, 464), /* buildClosureTypeForClosure $storage */ + reg::packed(469, MAY_BE_NULL, 482, false, false, 464), /* buildClosureTypeForClosure $passedToType */ + reg::packed(547, MAY_BE_NULL, 482, false, false, 464), /* buildClosureTypeForClosure $nativePassedToType */ + reg::packed(566, MAY_BE_ARRAY, reg::NoString, false, false, 801), /* buildClosureTypeForClosure $byRefUseTypes */ + reg::packed(271, 0, 500), /* buildClosureTypeForClosure return */ + reg::packed(378, 0, 384), /* buildClosureTypeForArrowFunction $scope */ + reg::packed(295, 0, 831), /* buildClosureTypeForArrowFunction $expr */ + reg::packed(865, 0, 384), /* buildClosureTypeForArrowFunction $arrowScope */ + reg::packed(741, MAY_BE_ARRAY), /* buildClosureTypeForArrowFunction $throwPoints */ + reg::packed(753, MAY_BE_ARRAY), /* buildClosureTypeForArrowFunction $impurePoints */ + reg::packed(766, MAY_BE_ARRAY), /* buildClosureTypeForArrowFunction $invalidateExpressions */ + reg::packed(788, MAY_BE_BOOL, reg::NoString, false, false, 795), /* buildClosureTypeForArrowFunction $native */ + reg::packed(415, MAY_BE_NULL, 423, false, false, 464), /* buildClosureTypeForArrowFunction $storage */ + reg::packed(469, MAY_BE_NULL, 482, false, false, 464), /* buildClosureTypeForArrowFunction $passedToType */ + reg::packed(547, MAY_BE_NULL, 482, false, false, 464), /* buildClosureTypeForArrowFunction $nativePassedToType */ + reg::packed(566, MAY_BE_ARRAY, reg::NoString, false, false, 801), /* buildClosureTypeForArrowFunction $byRefUseTypes */ + reg::packed(271, 0, 500), /* buildClosureTypeForArrowFunction return */ + reg::packed(378, 0, 384), /* closureContextCacheKey $scope */ + reg::packed(295, 0, 300), /* closureContextCacheKey $expr */ + reg::packed(909, MAY_BE_NULL | MAY_BE_ARRAY), /* closureContextCacheKey $callableParameters */ + reg::packed(928, MAY_BE_ARRAY), /* closureContextCacheKey $parameters */ + reg::packed(271, MAY_BE_STRING), /* closureContextCacheKey return */ + reg::packed(295, 0, 300), /* freeVariableRoots $expr */ + reg::packed(271, MAY_BE_NULL | MAY_BE_ARRAY), /* freeVariableRoots return */ + reg::packed(415, MAY_BE_NULL, 423), /* readExprType $storage */ + reg::packed(295, 0, 980), /* readExprType $expr */ + reg::packed(1000, 0, 384), /* readExprType $readScope */ + reg::packed(788, MAY_BE_BOOL), /* readExprType $native */ + reg::packed(271, 0, 482), /* readExprType return */ + reg::packed(378, 0, 384), /* buildClosureTypeFromClosureWalk $scope */ + reg::packed(295, 0, 666), /* buildClosureTypeFromClosureWalk $expr */ + reg::packed(928, MAY_BE_ARRAY), /* buildClosureTypeFromClosureWalk $parameters */ + reg::packed(1023, MAY_BE_BOOL), /* buildClosureTypeFromClosureWalk $isVariadic */ + reg::packed(694, MAY_BE_ARRAY), /* buildClosureTypeFromClosureWalk $returnStatements */ + reg::packed(711, MAY_BE_ARRAY), /* buildClosureTypeFromClosureWalk $yieldStatements */ + reg::packed(727, MAY_BE_ARRAY), /* buildClosureTypeFromClosureWalk $executionEnds */ + reg::packed(741, MAY_BE_ARRAY), /* buildClosureTypeFromClosureWalk $throwPoints */ + reg::packed(753, MAY_BE_ARRAY), /* buildClosureTypeFromClosureWalk $impurePoints */ + reg::packed(766, MAY_BE_ARRAY), /* buildClosureTypeFromClosureWalk $invalidateExpressions */ + reg::packed(1034, MAY_BE_NULL | MAY_BE_STRING, reg::NoString, false, false, 464), /* buildClosureTypeFromClosureWalk $cacheKey */ + reg::packed(788, MAY_BE_BOOL, reg::NoString, false, false, 795), /* buildClosureTypeFromClosureWalk $native */ + reg::packed(415, MAY_BE_NULL, 423, false, false, 464), /* buildClosureTypeFromClosureWalk $storage */ + reg::packed(1043, MAY_BE_BOOL, reg::NoString, false, false, 795), /* buildClosureTypeFromClosureWalk $contextFree */ + reg::packed(271, 0, 500), /* buildClosureTypeFromClosureWalk return */ + reg::packed(378, 0, 384), /* resolveArrowFunctionReturnType $scope */ + reg::packed(865, 0, 384), /* resolveArrowFunctionReturnType $arrowScope */ + reg::packed(295, 0, 831), /* resolveArrowFunctionReturnType $expr */ + reg::packed(788, MAY_BE_BOOL, reg::NoString, false, false, 795), /* resolveArrowFunctionReturnType $native */ + reg::packed(415, MAY_BE_NULL, 423, false, false, 464), /* resolveArrowFunctionReturnType $storage */ + reg::packed(271, 0, 482), /* resolveArrowFunctionReturnType return */ + reg::packed(727, MAY_BE_ARRAY), /* deriveOnlyNeverExecutionEnds $executionEnds */ + reg::packed(271, MAY_BE_NULL | MAY_BE_BOOL), /* deriveOnlyNeverExecutionEnds return */ + reg::packed(378, 0, 384), /* buildDeclaredParameters $scope */ + reg::packed(295, 0, 300), /* buildDeclaredParameters $expr */ + reg::packed(271, MAY_BE_ARRAY), /* buildDeclaredParameters return */ + reg::packed(378, 0, 384), /* getDeclaredClosureType $scope */ + reg::packed(295, 0, 300), /* getDeclaredClosureType $expr */ + reg::packed(271, 0, 500), /* getDeclaredClosureType return */ + reg::packed(378, 0, 384), /* buildParametersAndAcceptors $scope */ + reg::packed(295, 0, 300), /* buildParametersAndAcceptors $expr */ + reg::packed(415, MAY_BE_NULL, 423, false, false, 464), /* buildParametersAndAcceptors $storage */ + reg::packed(469, MAY_BE_NULL, 482, false, false, 464), /* buildParametersAndAcceptors $passedToType */ + reg::packed(547, MAY_BE_NULL, 482, false, false, 464), /* buildParametersAndAcceptors $nativePassedToType */ + reg::packed(271, MAY_BE_ARRAY), /* buildParametersAndAcceptors return */ + reg::packed(378, 0, 384), /* createClosureTypeFromCache $scope */ + reg::packed(295, 0, 300), /* createClosureTypeFromCache $expr */ + reg::packed(928, MAY_BE_ARRAY), /* createClosureTypeFromCache $parameters */ + reg::packed(1023, MAY_BE_BOOL), /* createClosureTypeFromCache $isVariadic */ + reg::packed(1222, MAY_BE_ARRAY), /* createClosureTypeFromCache $cachedClosureData */ + reg::packed(1043, MAY_BE_BOOL), /* createClosureTypeFromCache $contextFree */ + reg::packed(271, 0, 500), /* createClosureTypeFromCache return */ + reg::packed(378, 0, 384), /* assembleClosureType $scope */ + reg::packed(295, 0, 300), /* assembleClosureType $expr */ + reg::packed(928, MAY_BE_ARRAY), /* assembleClosureType $parameters */ + reg::packed(1023, MAY_BE_BOOL), /* assembleClosureType $isVariadic */ + reg::packed(1267, 0, 482), /* assembleClosureType $returnType */ + reg::packed(741, MAY_BE_ARRAY), /* assembleClosureType $throwPoints */ + reg::packed(753, MAY_BE_ARRAY), /* assembleClosureType $impurePoints */ + reg::packed(766, MAY_BE_ARRAY), /* assembleClosureType $invalidateExpressions */ + reg::packed(1278, MAY_BE_ARRAY), /* assembleClosureType $usedVariables */ + reg::packed(1034, MAY_BE_NULL | MAY_BE_STRING, reg::NoString, false, false, 464), /* assembleClosureType $cacheKey */ + reg::packed(1043, MAY_BE_BOOL, reg::NoString, false, false, 795), /* assembleClosureType $contextFree */ + reg::packed(271, 0, 500), /* assembleClosureType return */ }; using Sig = reg::Sig; } // namespace sigtab /* the signatures of the methods the class declares itself (a used trait's are in the trait's header) */ namespace sig { -inline constexpr sigtab::Sig __construct = { { 312 /* __construct */, 4, 0, 4, reg::NoArg, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig resetFileAnalysisState = { { 325 /* resetFileAnalysisState */, 0, 4, 0, 4, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig findCachedTypes = { { 415 /* findCachedTypes */, 1, 5, 1, 6, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig getClosureType = { { 609 /* getClosureType */, 2, 7, 6, 13, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig readableWalkStorage = { { 649 /* readableWalkStorage */, 2, 14, 2, 16, ZEND_ACC_PRIVATE | ZEND_ACC_STATIC } }; -inline constexpr sigtab::Sig buildClosureTypeForClosure = { { 817 /* buildClosureTypeForClosure */, 8, 17, 12, 29, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig buildClosureTypeForArrowFunction = { { 889 /* buildClosureTypeForArrowFunction */, 6, 30, 10, 40, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig closureContextCacheKey = { { 952 /* closureContextCacheKey */, 4, 41, 4, 45, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig freeVariableRoots = { { 975 /* freeVariableRoots */, 1, 46, 1, 47, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig readExprType = { { 1023 /* readExprType */, 4, 48, 4, 52, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig buildClosureTypeFromClosureWalk = { { 1068 /* buildClosureTypeFromClosureWalk */, 10, 53, 14, 67, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig resolveArrowFunctionReturnType = { { 1100 /* resolveArrowFunctionReturnType */, 3, 68, 5, 73, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig deriveOnlyNeverExecutionEnds = { { 1131 /* deriveOnlyNeverExecutionEnds */, 1, 74, 1, 75, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig buildDeclaredParameters = { { 1160 /* buildDeclaredParameters */, 2, 76, 2, 78, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig getDeclaredClosureType = { { 1184 /* getDeclaredClosureType */, 2, 79, 2, 81, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig buildParametersAndAcceptors = { { 1222 /* buildParametersAndAcceptors */, 2, 82, 6, 88, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig createClosureTypeFromCache = { { 1268 /* createClosureTypeFromCache */, 6, 89, 6, 95, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig assembleClosureType = { { 1320 /* assembleClosureType */, 9, 96, 11, 107, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig __construct = { { 259 /* __construct */, 3, 0, 3, reg::NoArg, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig resetFileAnalysisState = { { 272 /* resetFileAnalysisState */, 0, 3, 0, 3, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig findCachedTypes = { { 362 /* findCachedTypes */, 1, 4, 1, 5, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig getShallowClosureType = { { 525 /* getShallowClosureType */, 2, 6, 4, 10, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig findCachedClosureType = { { 595 /* findCachedClosureType */, 7, 11, 7, 18, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig getWalkPassedToTypes = { { 617 /* getWalkPassedToTypes */, 3, 19, 3, 22, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig byRefUseTypesCacheKeySuffix = { { 638 /* byRefUseTypesCacheKeySuffix */, 1, 23, 1, 24, ZEND_ACC_PRIVATE | ZEND_ACC_STATIC } }; +inline constexpr sigtab::Sig buildClosureTypeForClosure = { { 804 /* buildClosureTypeForClosure */, 8, 25, 13, 38, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig buildClosureTypeForArrowFunction = { { 876 /* buildClosureTypeForArrowFunction */, 6, 39, 11, 50, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig closureContextCacheKey = { { 939 /* closureContextCacheKey */, 4, 51, 4, 55, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig freeVariableRoots = { { 962 /* freeVariableRoots */, 1, 56, 1, 57, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig readExprType = { { 1010 /* readExprType */, 4, 58, 4, 62, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig buildClosureTypeFromClosureWalk = { { 1055 /* buildClosureTypeFromClosureWalk */, 10, 63, 14, 77, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig resolveArrowFunctionReturnType = { { 1087 /* resolveArrowFunctionReturnType */, 3, 78, 5, 83, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig deriveOnlyNeverExecutionEnds = { { 1118 /* deriveOnlyNeverExecutionEnds */, 1, 84, 1, 85, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig buildDeclaredParameters = { { 1147 /* buildDeclaredParameters */, 2, 86, 2, 88, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig getDeclaredClosureType = { { 1171 /* getDeclaredClosureType */, 2, 89, 2, 91, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig buildParametersAndAcceptors = { { 1194 /* buildParametersAndAcceptors */, 2, 92, 5, 97, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig createClosureTypeFromCache = { { 1240 /* createClosureTypeFromCache */, 6, 98, 6, 104, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig assembleClosureType = { { 1292 /* assembleClosureType */, 9, 105, 11, 116, ZEND_ACC_PRIVATE } }; } // namespace sig } // namespace ptdecl::ClosureTypeResolver diff --git a/turbo-ext/src/generated/MutatingScope.h b/turbo-ext/src/generated/MutatingScope.h index 5cb164d3c48..314bcef4294 100644 --- a/turbo-ext/src/generated/MutatingScope.h +++ b/turbo-ext/src/generated/MutatingScope.h @@ -193,390 +193,390 @@ inline constexpr char strings[] = "frame\0" /* 2347 */ "withTemplateArgumentFrame\0" /* 2353 */ "getCurrentTemplateArgumentFrame\0" /* 2379 */ - "getTemplateArgumentConstraints\0" /* 2411 */ - "constraints\0" /* 2442 */ - "withTemplateArgumentConstraints\0" /* 2454 */ - "addTemplateArgumentConstraints\0" /* 2486 */ - "withoutMemoizedTypes\0" /* 2517 */ - "other\0" /* 2538 */ - "getDifferingVariableRoots\0" /* 2544 */ - "getDifferingConditionalGuardRoots\0" /* 2570 */ - "key\0" /* 2604 */ - "getVariablesOfExpressionKey\0" /* 2608 */ - "recordedEntry\0" /* 2636 */ - "recordedExit\0" /* 2650 */ - "withRecordedStatementDelta\0" /* 2663 */ - "current\0" /* 2690 */ - "applyRecordedHolderDelta\0" /* 2698 */ - "getNativeType\0" /* 2723 */ - "getKeepVoidType\0" /* 2737 */ - "doNotTreatPhpDocTypesAsCertain\0" /* 2753 */ - "promoteNativeTypes\0" /* 2784 */ - "resolveName\0" /* 2803 */ - "PHPStan\\Type\\TypeWithClassName\0" /* 2815 */ - "resolveTypeByName\0" /* 2846 */ - "value\0" /* 2864 */ - "getTypeFromValue\0" /* 2870 */ - "hasExpressionType\0" /* 2887 */ - "getTrackedExpressionType\0" /* 2905 */ - "getNarrowedFromType\0" /* 2930 */ - "reflection\0" /* 2950 */ - "parameter\0" /* 2961 */ - "PHPStan\\Reflection\\ParameterReflection\0" /* 2971 */ - "rememberTypes\0" /* 3010 */ - "pushInFunctionCall\0" /* 3024 */ - "popInFunctionCall\0" /* 3043 */ - "className\0" /* 3061 */ - "isInClassExists\0" /* 3071 */ - "getFunctionCallStack\0" /* 3087 */ - "getFunctionCallStackWithParameters\0" /* 3108 */ - "functionName\0" /* 3143 */ - "isInFunctionExists\0" /* 3156 */ - "classReflection\0" /* 3175 */ - "enterClass\0" /* 3191 */ - "traitReflection\0" /* 3202 */ - "enterTrait\0" /* 3218 */ - "classMethod\0" /* 3229 */ - "PhpParser\\Node\\Stmt\\ClassMethod\0" /* 3241 */ - "templateTypeMap\0" /* 3273 */ - "PHPStan\\Type\\Generic\\TemplateTypeMap\0" /* 3289 */ - "phpDocParameterTypes\0" /* 3326 */ - "phpDocReturnType\0" /* 3347 */ - "throwType\0" /* 3364 */ - "deprecatedDescription\0" /* 3374 */ - "isDeprecated\0" /* 3396 */ - "isInternal\0" /* 3409 */ - "isFinal\0" /* 3420 */ - "isPure\0" /* 3428 */ - "acceptsNamedArguments\0" /* 3435 */ - "asserts\0" /* 3457 */ - "PHPStan\\Reflection\\Assertions\0" /* 3465 */ - "selfOutType\0" /* 3495 */ - "phpDocComment\0" /* 3507 */ - "parameterOutTypes\0" /* 3521 */ - "immediatelyInvokedCallableParameters\0" /* 3539 */ - "phpDocClosureThisTypeParameters\0" /* 3576 */ - "isConstructor\0" /* 3608 */ - "resolvedPhpDocBlock\0" /* 3622 */ - "PHPStan\\PhpDoc\\ResolvedPhpDocBlock\0" /* 3642 */ - "phpDocPureUnlessCallableIsImpureParameters\0" /* 3677 */ - "phpDocPureUnlessParameterPassedParameters\0" /* 3720 */ - "enterClassMethod\0" /* 3762 */ - "hook\0" /* 3779 */ - "PhpParser\\Node\\PropertyHook\0" /* 3784 */ - "propertyName\0" /* 3812 */ - "nativePropertyTypeNode\0" /* 3825 */ - "PhpParser\\Node\\Identifier|PhpParser\\Node\\Name|PhpParser\\Node\\ComplexType\0" /* 3848 */ - "phpDocPropertyType\0" /* 3921 */ - "enterPropertyHook\0" /* 3940 */ - "type\0" /* 3958 */ - "transformStaticType\0" /* 3963 */ - "functionLike\0" /* 3983 */ - "PhpParser\\Node\\FunctionLike\0" /* 3996 */ - "getRealParameterTypes\0" /* 4024 */ - "getRealParameterDefaultValues\0" /* 4046 */ - "PhpParser\\Node\\Stmt\\ClassMethod|PhpParser\\Node\\Stmt\\Function_|PhpParser\\Node\\PropertyHook\0" /* 4076 */ - "getParameterAttributes\0" /* 4166 */ - "PhpParser\\Node\\Stmt\\Function_\0" /* 4189 */ - "pureUnlessCallableIsImpureParameters\0" /* 4219 */ - "pureUnlessParameterPassedParameters\0" /* 4256 */ - "enterFunction\0" /* 4292 */ - "functionReflection\0" /* 4306 */ - "preserveConstructorScope\0" /* 4325 */ - "enterFunctionLike\0" /* 4350 */ - "namespaceName\0" /* 4368 */ - "enterNamespace\0" /* 4382 */ - "thisType\0" /* 4397 */ - "nativeThisType\0" /* 4406 */ - "scopeClasses\0" /* 4421 */ - "enterClosureBind\0" /* 4434 */ - "originalScope\0" /* 4451 */ - "restoreOriginalScopeAfterClosureBind\0" /* 4465 */ - "restoreThisScope\0" /* 4502 */ - "restoreThis\0" /* 4519 */ - "enterClosureCall\0" /* 4531 */ - "isInClosureBind\0" /* 4548 */ - "withClosureBindScopeClasses\0" /* 4564 */ - "closure\0" /* 4592 */ - "PhpParser\\Node\\Expr\\Closure\0" /* 4600 */ - "callableParameters\0" /* 4628 */ - "nativeCallableParameters\0" /* 4647 */ - "enterAnonymousFunction\0" /* 4672 */ - "enterAnonymousFunctionWithoutReflection\0" /* 4695 */ - "PhpParser\\Node\\Expr\\Closure|PhpParser\\Node\\Expr\\ArrowFunction\0" /* 4735 */ - "isInvokedWhereCreated\0" /* 4797 */ - "containsMutablePropertyFetch\0" /* 4819 */ - "invalidateMutablePropertyFetches\0" /* 4848 */ - "invalidateMutablePropertyFetchConditionalExpressions\0" /* 4881 */ - "typeHolder\0" /* 4934 */ - "PHPStan\\Analyser\\ExpressionTypeHolder\0" /* 4945 */ - "expressionTypeIsUnchangeable\0" /* 4983 */ - "invalidateStaticExpressions\0" /* 5012 */ - "arrowFunction\0" /* 5040 */ - "PhpParser\\Node\\Expr\\ArrowFunction\0" /* 5054 */ - "enterArrowFunction\0" /* 5088 */ - "enterArrowFunctionWithoutReflection\0" /* 5107 */ - "PhpParser\\Node\\Param\0" /* 5143 */ - "isParameterValueNullable\0" /* 5164 */ - "isNullable\0" /* 5189 */ - "isVariadic\0" /* 5200 */ - "getFunctionType\0" /* 5211 */ - "index\0" /* 5227 */ - "getCallableParameterType\0" /* 5233 */ - "startIndex\0" /* 5258 */ - "buildVariadicArrayTypeFromCallableParameters\0" /* 5269 */ - "nativeType\0" /* 5314 */ - "inferredType\0" /* 5325 */ - "intersectButNotNever\0" /* 5338 */ - "PhpParser\\Node\\Expr\\Match_\0" /* 5359 */ - "condType\0" /* 5386 */ - "condNativeType\0" /* 5395 */ - "enterMatch\0" /* 5410 */ - "iteratee\0" /* 5421 */ - "iterateeType\0" /* 5430 */ - "nativeIterateeType\0" /* 5443 */ - "valueName\0" /* 5462 */ - "keyName\0" /* 5472 */ - "valueByRef\0" /* 5480 */ - "enterForeach\0" /* 5491 */ - "enterForeachKey\0" /* 5504 */ - "catchType\0" /* 5520 */ - "enterCatchType\0" /* 5530 */ - "isPlainWrite\0" /* 5545 */ - "enterExpressionAssign\0" /* 5558 */ - "exitExpressionAssign\0" /* 5580 */ - "isInExpressionAssign\0" /* 5601 */ - "isInWriteExpressionAssign\0" /* 5622 */ - "setAllowedUndefinedExpression\0" /* 5648 */ - "unsetAllowedUndefinedExpression\0" /* 5678 */ - "isUndefinedExpressionAllowed\0" /* 5710 */ - "certainty\0" /* 5739 */ - "intertwinedPropagatedFrom\0" /* 5749 */ - "assignVariable\0" /* 5775 */ - "overwriteExpression\0" /* 5790 */ - "scope\0" /* 5810 */ - "rootType\0" /* 5816 */ - "assignedExpr\0" /* 5825 */ - "rootVariableName\0" /* 5838 */ - "native\0" /* 5855 */ - "resolveIntertwinedAssignedType\0" /* 5862 */ - "dimFetch\0" /* 5893 */ - "PhpParser\\Node\\Expr\\ArrayDimFetch\0" /* 5902 */ - "isDimFetchPathReachable\0" /* 5936 */ - "unsetExpression\0" /* 5960 */ - "getStateType\0" /* 5976 */ - "getScopeStateType\0" /* 5989 */ - "getScopeStateNativeType\0" /* 6007 */ - "resolveScopeStateType\0" /* 6031 */ - "specifyExpressionType\0" /* 6053 */ - "openSpecificationScope\0" /* 6075 */ - "isSpecifyExpressionTypeNoop\0" /* 6098 */ - "narrowedFrom\0" /* 6126 */ - "nativeNarrowedFrom\0" /* 6139 */ - "specifyExpressionTypeInPlace\0" /* 6158 */ - "assignExpression\0" /* 6187 */ - "specifyAssignedExpressionType\0" /* 6204 */ - "fetchedOnType\0" /* 6234 */ - "assignInitializedProperty\0" /* 6248 */ - "expressionToInvalidate\0" /* 6274 */ - "requireMoreCharacters\0" /* 6297 */ - "invalidatingClass\0" /* 6319 */ - "keepPropertyFetches\0" /* 6337 */ - "preservedPropertyNames\0" /* 6357 */ - "invalidateExpression\0" /* 6380 */ - "assignObjectAlias\0" /* 6401 */ - "assignNarrowedFrom\0" /* 6419 */ - "otherExpr\0" /* 6438 */ - "holdsSameObject\0" /* 6448 */ - "aliasedExpr\0" /* 6464 */ - "specifyObjectAlias\0" /* 6476 */ - "getObjectAliasRootVariableName\0" /* 6495 */ - "getObjectAliasEdges\0" /* 6526 */ - "includeSelf\0" /* 6546 */ - "getPropertyFetchChainPrefixes\0" /* 6558 */ - "edges\0" /* 6588 */ - "findObjectAliasClass\0" /* 6594 */ - "findObjectAliasInvalidationTargets\0" /* 6615 */ - "targets\0" /* 6650 */ - "reconnectObjectAliases\0" /* 6658 */ - "invalidateExpressionWithoutAliases\0" /* 6681 */ - "isPrivatePropertyOfDifferentClass\0" /* 6716 */ - "invalidateMethodsOnExpression\0" /* 6750 */ - "setExpressionCertaintyKeepingType\0" /* 6780 */ - "varType\0" /* 6814 */ - "dimType\0" /* 6822 */ - "offsetValueType\0" /* 6830 */ - "removeArraysWithoutOffsetValueType\0" /* 6846 */ - "isComplexUnionType\0" /* 6881 */ - "addTypeToExpression\0" /* 6900 */ - "typeToRemove\0" /* 6920 */ - "removeTypeFromExpression\0" /* 6933 */ - "filterByTruthyValue\0" /* 6958 */ - "filterByFalseyValue\0" /* 6978 */ - "specifiedTypes\0" /* 6998 */ - "applySpecifiedTypes\0" /* 7013 */ - "changedExpressions\0" /* 7033 */ - "respecifyRelationalFacts\0" /* 7052 */ - "applySpecifiedTypesBatch\0" /* 7077 */ - "specifiedExpressions\0" /* 7102 */ - "processConditionalExpressionsAfterSpecifying\0" /* 7123 */ - "getConditionalExpressions\0" /* 7168 */ - "conditionalExpressionHolders\0" /* 7194 */ - "addConditionalExpressions\0" /* 7223 */ - "exitFirstLevelStatements\0" /* 7249 */ - "isInFirstLevelStatement\0" /* 7274 */ - "otherScope\0" /* 7298 */ - "preserveVacuousConditionals\0" /* 7309 */ - "joinsIterations\0" /* 7337 */ - "mergeWith\0" /* 7353 */ - "differingKeys\0" /* 7363 */ - "ourTypes\0" /* 7377 */ - "theirTypes\0" /* 7386 */ - "ourNativeTypes\0" /* 7397 */ - "theirNativeTypes\0" /* 7412 */ - "completeOffsetWriteBases\0" /* 7429 */ - "holder\0" /* 7454 */ - "types\0" /* 7461 */ - "nativeTypes\0" /* 7467 */ - "completeOffsetWriteBase\0" /* 7479 */ - "ours\0" /* 7503 */ - "theirs\0" /* 7508 */ - "collectAbsorbedClosures\0" /* 7515 */ - "mergeWithVariableState\0" /* 7539 */ - "differingExpressionKeys\0" /* 7562 */ - "mergedExpressionTypes\0" /* 7586 */ - "findMergedCallCandidates\0" /* 7608 */ - "call\0" /* 7633 */ - "PhpParser\\Node\\Expr\\FuncCall|PhpParser\\Node\\Expr\\MethodCall|PhpParser\\Node\\Expr\\StaticCall\0" /* 7638 */ - "hasNarrowableArgument\0" /* 7729 */ - "candidates\0" /* 7751 */ - "mergedNativeTypes\0" /* 7762 */ - "findUninformativeMergedCalls\0" /* 7780 */ - "ourExpressionTypes\0" /* 7809 */ - "theirExpressionTypes\0" /* 7828 */ - "withoutPreciseClassConstantFetches\0" /* 7849 */ - "currentConditionalExpressions\0" /* 7884 */ - "sourceConditionalExpressions\0" /* 7914 */ - "otherExpressionTypes\0" /* 7943 */ - "preserveVacuousConditionalExpressions\0" /* 7964 */ - "PHPStan\\Analyser\\ConditionalExpressionHolder\0" /* 8002 */ - "isAboutCall\0" /* 8047 */ - "ourConditionalExpressions\0" /* 8059 */ - "theirConditionalExpressions\0" /* 8085 */ - "mergeSameGuardConditionalExpressions\0" /* 8113 */ - "newConditionalExpressions\0" /* 8150 */ - "existingConditionalExpressions\0" /* 8176 */ - "mergeConditionalExpressions\0" /* 8207 */ - "calledMethodScope\0" /* 8235 */ - "mergeInitializedProperties\0" /* 8253 */ - "finallyScope\0" /* 8280 */ - "originalFinallyScope\0" /* 8293 */ - "processFinallyScope\0" /* 8314 */ - "ourVariableTypeHolders\0" /* 8334 */ - "finallyVariableTypeHolders\0" /* 8357 */ - "originalVariableTypeHolders\0" /* 8384 */ - "processFinallyScopeVariableTypeHolders\0" /* 8412 */ - "closureScope\0" /* 8451 */ - "prevScope\0" /* 8464 */ - "byRefUses\0" /* 8474 */ - "processClosureScope\0" /* 8484 */ - "finalScope\0" /* 8504 */ - "processAlwaysIterableForeachScopeWithoutPollute\0" /* 8515 */ - "writtenVariableNames\0" /* 8563 */ - "forgetLoopWrittenVariables\0" /* 8584 */ - "previousScope\0" /* 8611 */ - "forgetChangedLoopVariables\0" /* 8625 */ - "getChangedVariableNames\0" /* 8652 */ - "previousType\0" /* 8676 */ - "generalizeIteratedType\0" /* 8689 */ - "writableVariableNames\0" /* 8712 */ - "loopEntryScope\0" /* 8734 */ - "generalizeWith\0" /* 8749 */ - "generalizeWithVariableState\0" /* 8764 */ - "generalizedExpressionTypes\0" /* 8792 */ - "withoutWidenedConditionalExpressions\0" /* 8819 */ - "variableTypeHolders\0" /* 8856 */ - "otherVariableTypeHolders\0" /* 8876 */ - "entryVariableTypeHolders\0" /* 8901 */ - "generalizeVariableTypeHolders\0" /* 8926 */ - "flattenUnionForGeneralization\0" /* 8956 */ - "a\0" /* 8986 */ - "b\0" /* 8988 */ - "depth\0" /* 8990 */ - "entryType\0" /* 8996 */ - "generalizeType\0" /* 9006 */ - "entryMin\0" /* 9021 */ - "entryMax\0" /* 9030 */ - "generalizeConstantFloats\0" /* 9039 */ - "allA\0" /* 9064 */ - "allB\0" /* 9069 */ - "generalizeShapesKeyByKey\0" /* 9074 */ - "pairShapes\0" /* 9099 */ - "shape\0" /* 9110 */ - "PHPStan\\Type\\Constant\\ConstantArrayType\0" /* 9116 */ - "getRequiredKeysSignature\0" /* 9156 */ - "getArrayDepth\0" /* 9181 */ - "equals\0" /* 9195 */ - "otherConditionalExpressions\0" /* 9202 */ - "compareConditionalExpressions\0" /* 9230 */ - "compareVariableTypeHolders\0" /* 9260 */ - "propertyReflection\0" /* 9287 */ - "PHPStan\\Reflection\\PropertyReflection\0" /* 9306 */ - "canAccessProperty\0" /* 9344 */ - "PHPStan\\Reflection\\ExtendedPropertyReflection\0" /* 9362 */ - "canReadProperty\0" /* 9408 */ - "canWriteProperty\0" /* 9424 */ - "methodReflection\0" /* 9441 */ - "PHPStan\\Reflection\\MethodReflection\0" /* 9458 */ - "canCallMethod\0" /* 9494 */ - "constantReflection\0" /* 9508 */ - "PHPStan\\Reflection\\ClassConstantReflection\0" /* 9527 */ - "canAccessConstant\0" /* 9570 */ - "classMemberReflection\0" /* 9588 */ - "PHPStan\\Reflection\\ClassMemberReflection\0" /* 9610 */ - "canAccessClassMember\0" /* 9651 */ - "debug\0" /* 9672 */ - "typeWithMethod\0" /* 9678 */ - "methodName\0" /* 9693 */ - "filterTypeWithMethod\0" /* 9704 */ - "PHPStan\\Reflection\\ExtendedMethodReflection\0" /* 9725 */ - "getMethodReflection\0" /* 9769 */ - "getNakedMethod\0" /* 9789 */ - "typeWithProperty\0" /* 9804 */ - "getPropertyReflection\0" /* 9821 */ - "getInstancePropertyReflection\0" /* 9843 */ - "getStaticPropertyReflection\0" /* 9873 */ - "typeWithConstant\0" /* 9901 */ - "constantName\0" /* 9918 */ - "getConstantReflection\0" /* 9931 */ - "constantType\0" /* 9953 */ - "getConstantExplicitTypeFromConfig\0" /* 9966 */ - "getConstantTypes\0" /* 10000 */ - "getGlobalConstantType\0" /* 10017 */ - "nameString\0" /* 10039 */ - "createGlobalConstantFetches\0" /* 10050 */ - "getNativeConstantTypes\0" /* 10078 */ - "getIterableKeyType\0" /* 10101 */ - "getIterableValueType\0" /* 10120 */ - "PHPStan\\Php\\PhpVersions\0" /* 10141 */ - "getPhpVersion\0" /* 10165 */ - "resolvePhpVersion\0" /* 10179 */ - "getConfiguredPhpVersionRange\0" /* 10197 */ - "isOverallPhpVersionRange\0" /* 10226 */ - "PhpParser\\Node\0" /* 10251 */ - "invokeNodeCallback\0" /* 10266 */ - "collectorType\0" /* 10285 */ - "data\0" /* 10299 */ - "emitCollectedData\0" /* 10304 */ - "extensionClass\0" /* 10322 */ - "trackValueDependency\0" /* 10337 */ - "file\0" /* 10358 */ - "trackFileDependency\0" /* 10363 */ - "directory\0" /* 10383 */ - "pattern\0" /* 10393 */ - "'*'\0" /* 10401 */ - "trackDirectoryDependency\0" /* 10405 */ - "trackClassDependency"; /* 10430 */ + "getCurrentBodyFrame\0" /* 2411 */ + "getTemplateArgumentConstraints\0" /* 2431 */ + "constraints\0" /* 2462 */ + "withTemplateArgumentConstraints\0" /* 2474 */ + "addTemplateArgumentConstraints\0" /* 2506 */ + "withoutMemoizedTypes\0" /* 2537 */ + "other\0" /* 2558 */ + "getDifferingVariableRoots\0" /* 2564 */ + "getDifferingConditionalGuardRoots\0" /* 2590 */ + "key\0" /* 2624 */ + "getVariablesOfExpressionKey\0" /* 2628 */ + "recordedEntry\0" /* 2656 */ + "recordedExit\0" /* 2670 */ + "withRecordedStatementDelta\0" /* 2683 */ + "current\0" /* 2710 */ + "applyRecordedHolderDelta\0" /* 2718 */ + "getNativeType\0" /* 2743 */ + "getKeepVoidType\0" /* 2757 */ + "doNotTreatPhpDocTypesAsCertain\0" /* 2773 */ + "promoteNativeTypes\0" /* 2804 */ + "resolveName\0" /* 2823 */ + "PHPStan\\Type\\TypeWithClassName\0" /* 2835 */ + "resolveTypeByName\0" /* 2866 */ + "value\0" /* 2884 */ + "getTypeFromValue\0" /* 2890 */ + "hasExpressionType\0" /* 2907 */ + "getTrackedExpressionType\0" /* 2925 */ + "getNarrowedFromType\0" /* 2950 */ + "reflection\0" /* 2970 */ + "parameter\0" /* 2981 */ + "PHPStan\\Reflection\\ParameterReflection\0" /* 2991 */ + "rememberTypes\0" /* 3030 */ + "pushInFunctionCall\0" /* 3044 */ + "popInFunctionCall\0" /* 3063 */ + "className\0" /* 3081 */ + "isInClassExists\0" /* 3091 */ + "getFunctionCallStack\0" /* 3107 */ + "getFunctionCallStackWithParameters\0" /* 3128 */ + "functionName\0" /* 3163 */ + "isInFunctionExists\0" /* 3176 */ + "classReflection\0" /* 3195 */ + "enterClass\0" /* 3211 */ + "traitReflection\0" /* 3222 */ + "enterTrait\0" /* 3238 */ + "classMethod\0" /* 3249 */ + "PhpParser\\Node\\Stmt\\ClassMethod\0" /* 3261 */ + "templateTypeMap\0" /* 3293 */ + "PHPStan\\Type\\Generic\\TemplateTypeMap\0" /* 3309 */ + "phpDocParameterTypes\0" /* 3346 */ + "phpDocReturnType\0" /* 3367 */ + "throwType\0" /* 3384 */ + "deprecatedDescription\0" /* 3394 */ + "isDeprecated\0" /* 3416 */ + "isInternal\0" /* 3429 */ + "isFinal\0" /* 3440 */ + "isPure\0" /* 3448 */ + "acceptsNamedArguments\0" /* 3455 */ + "asserts\0" /* 3477 */ + "PHPStan\\Reflection\\Assertions\0" /* 3485 */ + "selfOutType\0" /* 3515 */ + "phpDocComment\0" /* 3527 */ + "parameterOutTypes\0" /* 3541 */ + "immediatelyInvokedCallableParameters\0" /* 3559 */ + "phpDocClosureThisTypeParameters\0" /* 3596 */ + "isConstructor\0" /* 3628 */ + "resolvedPhpDocBlock\0" /* 3642 */ + "PHPStan\\PhpDoc\\ResolvedPhpDocBlock\0" /* 3662 */ + "phpDocPureUnlessCallableIsImpureParameters\0" /* 3697 */ + "phpDocPureUnlessParameterPassedParameters\0" /* 3740 */ + "enterClassMethod\0" /* 3782 */ + "hook\0" /* 3799 */ + "PhpParser\\Node\\PropertyHook\0" /* 3804 */ + "propertyName\0" /* 3832 */ + "nativePropertyTypeNode\0" /* 3845 */ + "PhpParser\\Node\\Identifier|PhpParser\\Node\\Name|PhpParser\\Node\\ComplexType\0" /* 3868 */ + "phpDocPropertyType\0" /* 3941 */ + "enterPropertyHook\0" /* 3960 */ + "type\0" /* 3978 */ + "transformStaticType\0" /* 3983 */ + "functionLike\0" /* 4003 */ + "PhpParser\\Node\\FunctionLike\0" /* 4016 */ + "getRealParameterTypes\0" /* 4044 */ + "getRealParameterDefaultValues\0" /* 4066 */ + "PhpParser\\Node\\Stmt\\ClassMethod|PhpParser\\Node\\Stmt\\Function_|PhpParser\\Node\\PropertyHook\0" /* 4096 */ + "getParameterAttributes\0" /* 4186 */ + "PhpParser\\Node\\Stmt\\Function_\0" /* 4209 */ + "pureUnlessCallableIsImpureParameters\0" /* 4239 */ + "pureUnlessParameterPassedParameters\0" /* 4276 */ + "enterFunction\0" /* 4312 */ + "functionReflection\0" /* 4326 */ + "preserveConstructorScope\0" /* 4345 */ + "enterFunctionLike\0" /* 4370 */ + "namespaceName\0" /* 4388 */ + "enterNamespace\0" /* 4402 */ + "thisType\0" /* 4417 */ + "nativeThisType\0" /* 4426 */ + "scopeClasses\0" /* 4441 */ + "enterClosureBind\0" /* 4454 */ + "originalScope\0" /* 4471 */ + "restoreOriginalScopeAfterClosureBind\0" /* 4485 */ + "restoreThisScope\0" /* 4522 */ + "restoreThis\0" /* 4539 */ + "enterClosureCall\0" /* 4551 */ + "isInClosureBind\0" /* 4568 */ + "withClosureBindScopeClasses\0" /* 4584 */ + "closure\0" /* 4612 */ + "PhpParser\\Node\\Expr\\Closure\0" /* 4620 */ + "callableParameters\0" /* 4648 */ + "nativeCallableParameters\0" /* 4667 */ + "enterAnonymousFunction\0" /* 4692 */ + "enterAnonymousFunctionWithoutReflection\0" /* 4715 */ + "forgetMutablePropertyFetches\0" /* 4755 */ + "containsMutablePropertyFetch\0" /* 4784 */ + "invalidateMutablePropertyFetches\0" /* 4813 */ + "invalidateMutablePropertyFetchConditionalExpressions\0" /* 4846 */ + "typeHolder\0" /* 4899 */ + "PHPStan\\Analyser\\ExpressionTypeHolder\0" /* 4910 */ + "expressionTypeIsUnchangeable\0" /* 4948 */ + "invalidateStaticExpressions\0" /* 4977 */ + "arrowFunction\0" /* 5005 */ + "PhpParser\\Node\\Expr\\ArrowFunction\0" /* 5019 */ + "enterArrowFunction\0" /* 5053 */ + "enterArrowFunctionWithoutReflection\0" /* 5072 */ + "PhpParser\\Node\\Param\0" /* 5108 */ + "isParameterValueNullable\0" /* 5129 */ + "isNullable\0" /* 5154 */ + "isVariadic\0" /* 5165 */ + "getFunctionType\0" /* 5176 */ + "index\0" /* 5192 */ + "getCallableParameterType\0" /* 5198 */ + "startIndex\0" /* 5223 */ + "buildVariadicArrayTypeFromCallableParameters\0" /* 5234 */ + "nativeType\0" /* 5279 */ + "inferredType\0" /* 5290 */ + "intersectButNotNever\0" /* 5303 */ + "PhpParser\\Node\\Expr\\Match_\0" /* 5324 */ + "condType\0" /* 5351 */ + "condNativeType\0" /* 5360 */ + "enterMatch\0" /* 5375 */ + "iteratee\0" /* 5386 */ + "iterateeType\0" /* 5395 */ + "nativeIterateeType\0" /* 5408 */ + "valueName\0" /* 5427 */ + "keyName\0" /* 5437 */ + "valueByRef\0" /* 5445 */ + "enterForeach\0" /* 5456 */ + "enterForeachKey\0" /* 5469 */ + "catchType\0" /* 5485 */ + "enterCatchType\0" /* 5495 */ + "isPlainWrite\0" /* 5510 */ + "enterExpressionAssign\0" /* 5523 */ + "exitExpressionAssign\0" /* 5545 */ + "isInExpressionAssign\0" /* 5566 */ + "isInWriteExpressionAssign\0" /* 5587 */ + "setAllowedUndefinedExpression\0" /* 5613 */ + "unsetAllowedUndefinedExpression\0" /* 5643 */ + "isUndefinedExpressionAllowed\0" /* 5675 */ + "certainty\0" /* 5704 */ + "intertwinedPropagatedFrom\0" /* 5714 */ + "assignVariable\0" /* 5740 */ + "overwriteExpression\0" /* 5755 */ + "scope\0" /* 5775 */ + "rootType\0" /* 5781 */ + "assignedExpr\0" /* 5790 */ + "rootVariableName\0" /* 5803 */ + "native\0" /* 5820 */ + "resolveIntertwinedAssignedType\0" /* 5827 */ + "dimFetch\0" /* 5858 */ + "PhpParser\\Node\\Expr\\ArrayDimFetch\0" /* 5867 */ + "isDimFetchPathReachable\0" /* 5901 */ + "unsetExpression\0" /* 5925 */ + "getStateType\0" /* 5941 */ + "getScopeStateType\0" /* 5954 */ + "getScopeStateNativeType\0" /* 5972 */ + "resolveScopeStateType\0" /* 5996 */ + "specifyExpressionType\0" /* 6018 */ + "openSpecificationScope\0" /* 6040 */ + "isSpecifyExpressionTypeNoop\0" /* 6063 */ + "narrowedFrom\0" /* 6091 */ + "nativeNarrowedFrom\0" /* 6104 */ + "specifyExpressionTypeInPlace\0" /* 6123 */ + "assignExpression\0" /* 6152 */ + "specifyAssignedExpressionType\0" /* 6169 */ + "fetchedOnType\0" /* 6199 */ + "assignInitializedProperty\0" /* 6213 */ + "expressionToInvalidate\0" /* 6239 */ + "requireMoreCharacters\0" /* 6262 */ + "invalidatingClass\0" /* 6284 */ + "keepPropertyFetches\0" /* 6302 */ + "preservedPropertyNames\0" /* 6322 */ + "invalidateExpression\0" /* 6345 */ + "assignObjectAlias\0" /* 6366 */ + "assignNarrowedFrom\0" /* 6384 */ + "otherExpr\0" /* 6403 */ + "holdsSameObject\0" /* 6413 */ + "aliasedExpr\0" /* 6429 */ + "specifyObjectAlias\0" /* 6441 */ + "getObjectAliasRootVariableName\0" /* 6460 */ + "getObjectAliasEdges\0" /* 6491 */ + "includeSelf\0" /* 6511 */ + "getPropertyFetchChainPrefixes\0" /* 6523 */ + "edges\0" /* 6553 */ + "findObjectAliasClass\0" /* 6559 */ + "findObjectAliasInvalidationTargets\0" /* 6580 */ + "targets\0" /* 6615 */ + "reconnectObjectAliases\0" /* 6623 */ + "invalidateExpressionWithoutAliases\0" /* 6646 */ + "isPrivatePropertyOfDifferentClass\0" /* 6681 */ + "invalidateMethodsOnExpression\0" /* 6715 */ + "setExpressionCertaintyKeepingType\0" /* 6745 */ + "varType\0" /* 6779 */ + "dimType\0" /* 6787 */ + "offsetValueType\0" /* 6795 */ + "removeArraysWithoutOffsetValueType\0" /* 6811 */ + "isComplexUnionType\0" /* 6846 */ + "addTypeToExpression\0" /* 6865 */ + "typeToRemove\0" /* 6885 */ + "removeTypeFromExpression\0" /* 6898 */ + "filterByTruthyValue\0" /* 6923 */ + "filterByFalseyValue\0" /* 6943 */ + "specifiedTypes\0" /* 6963 */ + "applySpecifiedTypes\0" /* 6978 */ + "changedExpressions\0" /* 6998 */ + "respecifyRelationalFacts\0" /* 7017 */ + "applySpecifiedTypesBatch\0" /* 7042 */ + "specifiedExpressions\0" /* 7067 */ + "processConditionalExpressionsAfterSpecifying\0" /* 7088 */ + "getConditionalExpressions\0" /* 7133 */ + "conditionalExpressionHolders\0" /* 7159 */ + "addConditionalExpressions\0" /* 7188 */ + "exitFirstLevelStatements\0" /* 7214 */ + "isInFirstLevelStatement\0" /* 7239 */ + "otherScope\0" /* 7263 */ + "preserveVacuousConditionals\0" /* 7274 */ + "joinsIterations\0" /* 7302 */ + "mergeWith\0" /* 7318 */ + "differingKeys\0" /* 7328 */ + "ourTypes\0" /* 7342 */ + "theirTypes\0" /* 7351 */ + "ourNativeTypes\0" /* 7362 */ + "theirNativeTypes\0" /* 7377 */ + "completeOffsetWriteBases\0" /* 7394 */ + "holder\0" /* 7419 */ + "types\0" /* 7426 */ + "nativeTypes\0" /* 7432 */ + "completeOffsetWriteBase\0" /* 7444 */ + "ours\0" /* 7468 */ + "theirs\0" /* 7473 */ + "collectAbsorbedClosures\0" /* 7480 */ + "mergeWithVariableState\0" /* 7504 */ + "differingExpressionKeys\0" /* 7527 */ + "mergedExpressionTypes\0" /* 7551 */ + "findMergedCallCandidates\0" /* 7573 */ + "call\0" /* 7598 */ + "PhpParser\\Node\\Expr\\FuncCall|PhpParser\\Node\\Expr\\MethodCall|PhpParser\\Node\\Expr\\StaticCall\0" /* 7603 */ + "hasNarrowableArgument\0" /* 7694 */ + "candidates\0" /* 7716 */ + "mergedNativeTypes\0" /* 7727 */ + "findUninformativeMergedCalls\0" /* 7745 */ + "ourExpressionTypes\0" /* 7774 */ + "theirExpressionTypes\0" /* 7793 */ + "withoutPreciseClassConstantFetches\0" /* 7814 */ + "currentConditionalExpressions\0" /* 7849 */ + "sourceConditionalExpressions\0" /* 7879 */ + "otherExpressionTypes\0" /* 7908 */ + "preserveVacuousConditionalExpressions\0" /* 7929 */ + "PHPStan\\Analyser\\ConditionalExpressionHolder\0" /* 7967 */ + "isAboutCall\0" /* 8012 */ + "ourConditionalExpressions\0" /* 8024 */ + "theirConditionalExpressions\0" /* 8050 */ + "mergeSameGuardConditionalExpressions\0" /* 8078 */ + "newConditionalExpressions\0" /* 8115 */ + "existingConditionalExpressions\0" /* 8141 */ + "mergeConditionalExpressions\0" /* 8172 */ + "calledMethodScope\0" /* 8200 */ + "mergeInitializedProperties\0" /* 8218 */ + "finallyScope\0" /* 8245 */ + "originalFinallyScope\0" /* 8258 */ + "processFinallyScope\0" /* 8279 */ + "ourVariableTypeHolders\0" /* 8299 */ + "finallyVariableTypeHolders\0" /* 8322 */ + "originalVariableTypeHolders\0" /* 8349 */ + "processFinallyScopeVariableTypeHolders\0" /* 8377 */ + "closureScope\0" /* 8416 */ + "prevScope\0" /* 8429 */ + "byRefUses\0" /* 8439 */ + "processClosureScope\0" /* 8449 */ + "finalScope\0" /* 8469 */ + "processAlwaysIterableForeachScopeWithoutPollute\0" /* 8480 */ + "writtenVariableNames\0" /* 8528 */ + "forgetLoopWrittenVariables\0" /* 8549 */ + "previousScope\0" /* 8576 */ + "forgetChangedLoopVariables\0" /* 8590 */ + "getChangedVariableNames\0" /* 8617 */ + "previousType\0" /* 8641 */ + "generalizeIteratedType\0" /* 8654 */ + "writableVariableNames\0" /* 8677 */ + "loopEntryScope\0" /* 8699 */ + "generalizeWith\0" /* 8714 */ + "generalizeWithVariableState\0" /* 8729 */ + "generalizedExpressionTypes\0" /* 8757 */ + "withoutWidenedConditionalExpressions\0" /* 8784 */ + "variableTypeHolders\0" /* 8821 */ + "otherVariableTypeHolders\0" /* 8841 */ + "entryVariableTypeHolders\0" /* 8866 */ + "generalizeVariableTypeHolders\0" /* 8891 */ + "flattenUnionForGeneralization\0" /* 8921 */ + "a\0" /* 8951 */ + "b\0" /* 8953 */ + "depth\0" /* 8955 */ + "entryType\0" /* 8961 */ + "generalizeType\0" /* 8971 */ + "entryMin\0" /* 8986 */ + "entryMax\0" /* 8995 */ + "generalizeConstantFloats\0" /* 9004 */ + "allA\0" /* 9029 */ + "allB\0" /* 9034 */ + "generalizeShapesKeyByKey\0" /* 9039 */ + "pairShapes\0" /* 9064 */ + "shape\0" /* 9075 */ + "PHPStan\\Type\\Constant\\ConstantArrayType\0" /* 9081 */ + "getRequiredKeysSignature\0" /* 9121 */ + "getArrayDepth\0" /* 9146 */ + "equals\0" /* 9160 */ + "otherConditionalExpressions\0" /* 9167 */ + "compareConditionalExpressions\0" /* 9195 */ + "compareVariableTypeHolders\0" /* 9225 */ + "propertyReflection\0" /* 9252 */ + "PHPStan\\Reflection\\PropertyReflection\0" /* 9271 */ + "canAccessProperty\0" /* 9309 */ + "PHPStan\\Reflection\\ExtendedPropertyReflection\0" /* 9327 */ + "canReadProperty\0" /* 9373 */ + "canWriteProperty\0" /* 9389 */ + "methodReflection\0" /* 9406 */ + "PHPStan\\Reflection\\MethodReflection\0" /* 9423 */ + "canCallMethod\0" /* 9459 */ + "constantReflection\0" /* 9473 */ + "PHPStan\\Reflection\\ClassConstantReflection\0" /* 9492 */ + "canAccessConstant\0" /* 9535 */ + "classMemberReflection\0" /* 9553 */ + "PHPStan\\Reflection\\ClassMemberReflection\0" /* 9575 */ + "canAccessClassMember\0" /* 9616 */ + "debug\0" /* 9637 */ + "typeWithMethod\0" /* 9643 */ + "methodName\0" /* 9658 */ + "filterTypeWithMethod\0" /* 9669 */ + "PHPStan\\Reflection\\ExtendedMethodReflection\0" /* 9690 */ + "getMethodReflection\0" /* 9734 */ + "getNakedMethod\0" /* 9754 */ + "typeWithProperty\0" /* 9769 */ + "getPropertyReflection\0" /* 9786 */ + "getInstancePropertyReflection\0" /* 9808 */ + "getStaticPropertyReflection\0" /* 9838 */ + "typeWithConstant\0" /* 9866 */ + "constantName\0" /* 9883 */ + "getConstantReflection\0" /* 9896 */ + "constantType\0" /* 9918 */ + "getConstantExplicitTypeFromConfig\0" /* 9931 */ + "getConstantTypes\0" /* 9965 */ + "getGlobalConstantType\0" /* 9982 */ + "nameString\0" /* 10004 */ + "createGlobalConstantFetches\0" /* 10015 */ + "getNativeConstantTypes\0" /* 10043 */ + "getIterableKeyType\0" /* 10066 */ + "getIterableValueType\0" /* 10085 */ + "PHPStan\\Php\\PhpVersions\0" /* 10106 */ + "getPhpVersion\0" /* 10130 */ + "resolvePhpVersion\0" /* 10144 */ + "getConfiguredPhpVersionRange\0" /* 10162 */ + "isOverallPhpVersionRange\0" /* 10191 */ + "PhpParser\\Node\0" /* 10216 */ + "invokeNodeCallback\0" /* 10231 */ + "collectorType\0" /* 10250 */ + "data\0" /* 10264 */ + "emitCollectedData\0" /* 10269 */ + "extensionClass\0" /* 10287 */ + "trackValueDependency\0" /* 10302 */ + "file\0" /* 10323 */ + "trackFileDependency\0" /* 10328 */ + "directory\0" /* 10348 */ + "pattern\0" /* 10358 */ + "'*'\0" /* 10366 */ + "trackDirectoryDependency\0" /* 10370 */ + "trackClassDependency"; /* 10395 */ inline constexpr reg::PackedArg args[] = { reg::packed(0, 0, 9), /* __construct $services */ reg::packed(40, 0, 53), /* __construct $scopeFactory */ @@ -689,24 +689,25 @@ inline constexpr reg::PackedArg args[] = { reg::packed(2347, MAY_BE_NULL, 596), /* withTemplateArgumentFrame $frame */ reg::packed(738, 0, 523), /* withTemplateArgumentFrame return */ reg::packed(738, MAY_BE_NULL, 596), /* getCurrentTemplateArgumentFrame return */ + reg::packed(738, MAY_BE_NULL, 596), /* getCurrentBodyFrame return */ reg::packed(738, MAY_BE_NULL, 672), /* getTemplateArgumentConstraints return */ - reg::packed(2442, MAY_BE_NULL, 672), /* withTemplateArgumentConstraints $constraints */ + reg::packed(2462, MAY_BE_NULL, 672), /* withTemplateArgumentConstraints $constraints */ reg::packed(738, 0, 523), /* withTemplateArgumentConstraints return */ - reg::packed(2442, MAY_BE_NULL, 672), /* addTemplateArgumentConstraints $constraints */ + reg::packed(2462, MAY_BE_NULL, 672), /* addTemplateArgumentConstraints $constraints */ reg::packed(738, 0, 523), /* addTemplateArgumentConstraints return */ reg::packed(738, 0, 523), /* withoutMemoizedTypes return */ - reg::packed(2538, 0, 523), /* getDifferingVariableRoots $other */ + reg::packed(2558, 0, 523), /* getDifferingVariableRoots $other */ reg::packed(738, MAY_BE_NULL | MAY_BE_ARRAY), /* getDifferingVariableRoots return */ - reg::packed(2538, 0, 523), /* getDifferingConditionalGuardRoots $other */ + reg::packed(2558, 0, 523), /* getDifferingConditionalGuardRoots $other */ reg::packed(738, MAY_BE_NULL | MAY_BE_ARRAY), /* getDifferingConditionalGuardRoots return */ - reg::packed(2604, MAY_BE_STRING), /* getVariablesOfExpressionKey $key */ + reg::packed(2624, MAY_BE_STRING), /* getVariablesOfExpressionKey $key */ reg::packed(738, MAY_BE_NULL | MAY_BE_ARRAY), /* getVariablesOfExpressionKey return */ - reg::packed(2636, 0, 523), /* withRecordedStatementDelta $recordedEntry */ - reg::packed(2650, 0, 523), /* withRecordedStatementDelta $recordedExit */ + reg::packed(2656, 0, 523), /* withRecordedStatementDelta $recordedEntry */ + reg::packed(2670, 0, 523), /* withRecordedStatementDelta $recordedExit */ reg::packed(738, 0, 523), /* withRecordedStatementDelta return */ - reg::packed(2690, MAY_BE_ARRAY), /* applyRecordedHolderDelta $current */ - reg::packed(2636, MAY_BE_ARRAY), /* applyRecordedHolderDelta $recordedEntry */ - reg::packed(2650, MAY_BE_ARRAY), /* applyRecordedHolderDelta $recordedExit */ + reg::packed(2710, MAY_BE_ARRAY), /* applyRecordedHolderDelta $current */ + reg::packed(2656, MAY_BE_ARRAY), /* applyRecordedHolderDelta $recordedEntry */ + reg::packed(2670, MAY_BE_ARRAY), /* applyRecordedHolderDelta $recordedExit */ reg::packed(738, MAY_BE_ARRAY), /* applyRecordedHolderDelta return */ reg::packed(966, 0, 1742), /* getNativeType $expr */ reg::packed(738, 0, 1454), /* getNativeType return */ @@ -717,8 +718,8 @@ inline constexpr reg::PackedArg args[] = { reg::packed(1550, 0, 1555), /* resolveName $name */ reg::packed(738, MAY_BE_STRING), /* resolveName return */ reg::packed(1550, 0, 1555), /* resolveTypeByName $name */ - reg::packed(738, 0, 2815), /* resolveTypeByName return */ - reg::packed(2864, 0), /* getTypeFromValue $value */ + reg::packed(738, 0, 2835), /* resolveTypeByName return */ + reg::packed(2884, 0), /* getTypeFromValue $value */ reg::packed(738, 0, 1454), /* getTypeFromValue return */ reg::packed(1737, 0, 1742), /* hasExpressionType $node */ reg::packed(738, 0, 1417), /* hasExpressionType return */ @@ -726,167 +727,166 @@ inline constexpr reg::PackedArg args[] = { reg::packed(738, 0, 1454), /* getTrackedExpressionType return */ reg::packed(1737, 0, 1742), /* getNarrowedFromType $node */ reg::packed(738, MAY_BE_NULL, 1454), /* getNarrowedFromType return */ - reg::packed(2950, 0), /* pushInFunctionCall $reflection */ - reg::packed(2961, MAY_BE_NULL, 2971), /* pushInFunctionCall $parameter */ - reg::packed(3010, MAY_BE_BOOL), /* pushInFunctionCall $rememberTypes */ + reg::packed(2970, 0), /* pushInFunctionCall $reflection */ + reg::packed(2981, MAY_BE_NULL, 2991), /* pushInFunctionCall $parameter */ + reg::packed(3030, MAY_BE_BOOL), /* pushInFunctionCall $rememberTypes */ reg::packed(738, 0, 523), /* pushInFunctionCall return */ reg::packed(738, 0, 523), /* popInFunctionCall return */ - reg::packed(3061, MAY_BE_STRING), /* isInClassExists $className */ + reg::packed(3081, MAY_BE_STRING), /* isInClassExists $className */ reg::packed(738, MAY_BE_BOOL), /* isInClassExists return */ reg::packed(738, MAY_BE_ARRAY), /* getFunctionCallStack return */ reg::packed(738, MAY_BE_ARRAY), /* getFunctionCallStackWithParameters return */ - reg::packed(3143, MAY_BE_STRING), /* isInFunctionExists $functionName */ + reg::packed(3163, MAY_BE_STRING), /* isInFunctionExists $functionName */ reg::packed(738, MAY_BE_BOOL), /* isInFunctionExists return */ - reg::packed(3175, 0, 1065), /* enterClass $classReflection */ + reg::packed(3195, 0, 1065), /* enterClass $classReflection */ reg::packed(738, 0, 523), /* enterClass return */ - reg::packed(3202, 0, 1065), /* enterTrait $traitReflection */ + reg::packed(3222, 0, 1065), /* enterTrait $traitReflection */ reg::packed(738, 0, 523), /* enterTrait return */ - reg::packed(3229, 0, 3241), /* enterClassMethod $classMethod */ - reg::packed(3273, 0, 3289), /* enterClassMethod $templateTypeMap */ - reg::packed(3326, MAY_BE_ARRAY), /* enterClassMethod $phpDocParameterTypes */ - reg::packed(3347, MAY_BE_NULL, 1454), /* enterClassMethod $phpDocReturnType */ - reg::packed(3364, MAY_BE_NULL, 1454), /* enterClassMethod $throwType */ - reg::packed(3374, MAY_BE_NULL | MAY_BE_STRING), /* enterClassMethod $deprecatedDescription */ - reg::packed(3396, MAY_BE_BOOL), /* enterClassMethod $isDeprecated */ - reg::packed(3409, MAY_BE_BOOL), /* enterClassMethod $isInternal */ - reg::packed(3420, MAY_BE_BOOL), /* enterClassMethod $isFinal */ - reg::packed(3428, MAY_BE_NULL | MAY_BE_BOOL, reg::NoString, false, false, 222), /* enterClassMethod $isPure */ - reg::packed(3435, MAY_BE_BOOL, reg::NoString, false, false, 402), /* enterClassMethod $acceptsNamedArguments */ - reg::packed(3457, MAY_BE_NULL, 3465, false, false, 222), /* enterClassMethod $asserts */ - reg::packed(3495, MAY_BE_NULL, 1454, false, false, 222), /* enterClassMethod $selfOutType */ - reg::packed(3507, MAY_BE_NULL | MAY_BE_STRING, reg::NoString, false, false, 222), /* enterClassMethod $phpDocComment */ - reg::packed(3521, MAY_BE_ARRAY, reg::NoString, false, false, 253), /* enterClassMethod $parameterOutTypes */ - reg::packed(3539, MAY_BE_ARRAY, reg::NoString, false, false, 253), /* enterClassMethod $immediatelyInvokedCallableParameters */ - reg::packed(3576, MAY_BE_ARRAY, reg::NoString, false, false, 253), /* enterClassMethod $phpDocClosureThisTypeParameters */ - reg::packed(3608, MAY_BE_BOOL, reg::NoString, false, false, 148), /* enterClassMethod $isConstructor */ - reg::packed(3622, MAY_BE_NULL, 3642, false, false, 222), /* enterClassMethod $resolvedPhpDocBlock */ - reg::packed(3677, MAY_BE_ARRAY, reg::NoString, false, false, 253), /* enterClassMethod $phpDocPureUnlessCallableIsImpureParameters */ - reg::packed(3720, MAY_BE_ARRAY, reg::NoString, false, false, 253), /* enterClassMethod $phpDocPureUnlessParameterPassedParameters */ + reg::packed(3249, 0, 3261), /* enterClassMethod $classMethod */ + reg::packed(3293, 0, 3309), /* enterClassMethod $templateTypeMap */ + reg::packed(3346, MAY_BE_ARRAY), /* enterClassMethod $phpDocParameterTypes */ + reg::packed(3367, MAY_BE_NULL, 1454), /* enterClassMethod $phpDocReturnType */ + reg::packed(3384, MAY_BE_NULL, 1454), /* enterClassMethod $throwType */ + reg::packed(3394, MAY_BE_NULL | MAY_BE_STRING), /* enterClassMethod $deprecatedDescription */ + reg::packed(3416, MAY_BE_BOOL), /* enterClassMethod $isDeprecated */ + reg::packed(3429, MAY_BE_BOOL), /* enterClassMethod $isInternal */ + reg::packed(3440, MAY_BE_BOOL), /* enterClassMethod $isFinal */ + reg::packed(3448, MAY_BE_NULL | MAY_BE_BOOL, reg::NoString, false, false, 222), /* enterClassMethod $isPure */ + reg::packed(3455, MAY_BE_BOOL, reg::NoString, false, false, 402), /* enterClassMethod $acceptsNamedArguments */ + reg::packed(3477, MAY_BE_NULL, 3485, false, false, 222), /* enterClassMethod $asserts */ + reg::packed(3515, MAY_BE_NULL, 1454, false, false, 222), /* enterClassMethod $selfOutType */ + reg::packed(3527, MAY_BE_NULL | MAY_BE_STRING, reg::NoString, false, false, 222), /* enterClassMethod $phpDocComment */ + reg::packed(3541, MAY_BE_ARRAY, reg::NoString, false, false, 253), /* enterClassMethod $parameterOutTypes */ + reg::packed(3559, MAY_BE_ARRAY, reg::NoString, false, false, 253), /* enterClassMethod $immediatelyInvokedCallableParameters */ + reg::packed(3596, MAY_BE_ARRAY, reg::NoString, false, false, 253), /* enterClassMethod $phpDocClosureThisTypeParameters */ + reg::packed(3628, MAY_BE_BOOL, reg::NoString, false, false, 148), /* enterClassMethod $isConstructor */ + reg::packed(3642, MAY_BE_NULL, 3662, false, false, 222), /* enterClassMethod $resolvedPhpDocBlock */ + reg::packed(3697, MAY_BE_ARRAY, reg::NoString, false, false, 253), /* enterClassMethod $phpDocPureUnlessCallableIsImpureParameters */ + reg::packed(3740, MAY_BE_ARRAY, reg::NoString, false, false, 253), /* enterClassMethod $phpDocPureUnlessParameterPassedParameters */ reg::packed(738, 0, 523), /* enterClassMethod return */ - reg::packed(3779, 0, 3784), /* enterPropertyHook $hook */ - reg::packed(3812, MAY_BE_STRING), /* enterPropertyHook $propertyName */ - reg::packed(3825, MAY_BE_NULL, 3848), /* enterPropertyHook $nativePropertyTypeNode */ - reg::packed(3921, MAY_BE_NULL, 1454), /* enterPropertyHook $phpDocPropertyType */ - reg::packed(3326, MAY_BE_ARRAY), /* enterPropertyHook $phpDocParameterTypes */ - reg::packed(3364, MAY_BE_NULL, 1454), /* enterPropertyHook $throwType */ - reg::packed(3374, MAY_BE_NULL | MAY_BE_STRING), /* enterPropertyHook $deprecatedDescription */ - reg::packed(3396, MAY_BE_BOOL), /* enterPropertyHook $isDeprecated */ - reg::packed(3428, MAY_BE_NULL | MAY_BE_BOOL), /* enterPropertyHook $isPure */ - reg::packed(3507, MAY_BE_NULL | MAY_BE_STRING), /* enterPropertyHook $phpDocComment */ - reg::packed(3622, MAY_BE_NULL, 3642, false, false, 222), /* enterPropertyHook $resolvedPhpDocBlock */ + reg::packed(3799, 0, 3804), /* enterPropertyHook $hook */ + reg::packed(3832, MAY_BE_STRING), /* enterPropertyHook $propertyName */ + reg::packed(3845, MAY_BE_NULL, 3868), /* enterPropertyHook $nativePropertyTypeNode */ + reg::packed(3941, MAY_BE_NULL, 1454), /* enterPropertyHook $phpDocPropertyType */ + reg::packed(3346, MAY_BE_ARRAY), /* enterPropertyHook $phpDocParameterTypes */ + reg::packed(3384, MAY_BE_NULL, 1454), /* enterPropertyHook $throwType */ + reg::packed(3394, MAY_BE_NULL | MAY_BE_STRING), /* enterPropertyHook $deprecatedDescription */ + reg::packed(3416, MAY_BE_BOOL), /* enterPropertyHook $isDeprecated */ + reg::packed(3448, MAY_BE_NULL | MAY_BE_BOOL), /* enterPropertyHook $isPure */ + reg::packed(3527, MAY_BE_NULL | MAY_BE_STRING), /* enterPropertyHook $phpDocComment */ + reg::packed(3642, MAY_BE_NULL, 3662, false, false, 222), /* enterPropertyHook $resolvedPhpDocBlock */ reg::packed(738, 0, 523), /* enterPropertyHook return */ - reg::packed(3958, 0, 1454), /* transformStaticType $type */ + reg::packed(3978, 0, 1454), /* transformStaticType $type */ reg::packed(738, 0, 1454), /* transformStaticType return */ - reg::packed(3983, 0, 3996), /* getRealParameterTypes $functionLike */ + reg::packed(4003, 0, 4016), /* getRealParameterTypes $functionLike */ reg::packed(738, MAY_BE_ARRAY), /* getRealParameterTypes return */ - reg::packed(3983, 0, 3996), /* getRealParameterDefaultValues $functionLike */ + reg::packed(4003, 0, 4016), /* getRealParameterDefaultValues $functionLike */ reg::packed(738, MAY_BE_ARRAY), /* getRealParameterDefaultValues return */ - reg::packed(3983, 0, 4076), /* getParameterAttributes $functionLike */ + reg::packed(4003, 0, 4096), /* getParameterAttributes $functionLike */ reg::packed(738, MAY_BE_ARRAY), /* getParameterAttributes return */ - reg::packed(154, 0, 4189), /* enterFunction $function */ - reg::packed(3273, 0, 3289), /* enterFunction $templateTypeMap */ - reg::packed(3326, MAY_BE_ARRAY), /* enterFunction $phpDocParameterTypes */ - reg::packed(3347, MAY_BE_NULL, 1454), /* enterFunction $phpDocReturnType */ - reg::packed(3364, MAY_BE_NULL, 1454), /* enterFunction $throwType */ - reg::packed(3374, MAY_BE_NULL | MAY_BE_STRING), /* enterFunction $deprecatedDescription */ - reg::packed(3396, MAY_BE_BOOL), /* enterFunction $isDeprecated */ - reg::packed(3409, MAY_BE_BOOL), /* enterFunction $isInternal */ - reg::packed(3428, MAY_BE_NULL | MAY_BE_BOOL, reg::NoString, false, false, 222), /* enterFunction $isPure */ - reg::packed(3435, MAY_BE_BOOL, reg::NoString, false, false, 402), /* enterFunction $acceptsNamedArguments */ - reg::packed(3457, MAY_BE_NULL, 3465, false, false, 222), /* enterFunction $asserts */ - reg::packed(3507, MAY_BE_NULL | MAY_BE_STRING, reg::NoString, false, false, 222), /* enterFunction $phpDocComment */ - reg::packed(3521, MAY_BE_ARRAY, reg::NoString, false, false, 253), /* enterFunction $parameterOutTypes */ - reg::packed(3539, MAY_BE_ARRAY, reg::NoString, false, false, 253), /* enterFunction $immediatelyInvokedCallableParameters */ - reg::packed(3576, MAY_BE_ARRAY, reg::NoString, false, false, 253), /* enterFunction $phpDocClosureThisTypeParameters */ - reg::packed(4219, MAY_BE_ARRAY, reg::NoString, false, false, 253), /* enterFunction $pureUnlessCallableIsImpureParameters */ - reg::packed(4256, MAY_BE_ARRAY, reg::NoString, false, false, 253), /* enterFunction $pureUnlessParameterPassedParameters */ + reg::packed(154, 0, 4209), /* enterFunction $function */ + reg::packed(3293, 0, 3309), /* enterFunction $templateTypeMap */ + reg::packed(3346, MAY_BE_ARRAY), /* enterFunction $phpDocParameterTypes */ + reg::packed(3367, MAY_BE_NULL, 1454), /* enterFunction $phpDocReturnType */ + reg::packed(3384, MAY_BE_NULL, 1454), /* enterFunction $throwType */ + reg::packed(3394, MAY_BE_NULL | MAY_BE_STRING), /* enterFunction $deprecatedDescription */ + reg::packed(3416, MAY_BE_BOOL), /* enterFunction $isDeprecated */ + reg::packed(3429, MAY_BE_BOOL), /* enterFunction $isInternal */ + reg::packed(3448, MAY_BE_NULL | MAY_BE_BOOL, reg::NoString, false, false, 222), /* enterFunction $isPure */ + reg::packed(3455, MAY_BE_BOOL, reg::NoString, false, false, 402), /* enterFunction $acceptsNamedArguments */ + reg::packed(3477, MAY_BE_NULL, 3485, false, false, 222), /* enterFunction $asserts */ + reg::packed(3527, MAY_BE_NULL | MAY_BE_STRING, reg::NoString, false, false, 222), /* enterFunction $phpDocComment */ + reg::packed(3541, MAY_BE_ARRAY, reg::NoString, false, false, 253), /* enterFunction $parameterOutTypes */ + reg::packed(3559, MAY_BE_ARRAY, reg::NoString, false, false, 253), /* enterFunction $immediatelyInvokedCallableParameters */ + reg::packed(3596, MAY_BE_ARRAY, reg::NoString, false, false, 253), /* enterFunction $phpDocClosureThisTypeParameters */ + reg::packed(4239, MAY_BE_ARRAY, reg::NoString, false, false, 253), /* enterFunction $pureUnlessCallableIsImpureParameters */ + reg::packed(4276, MAY_BE_ARRAY, reg::NoString, false, false, 253), /* enterFunction $pureUnlessParameterPassedParameters */ reg::packed(738, 0, 523), /* enterFunction return */ - reg::packed(4306, 0, 163), /* enterFunctionLike $functionReflection */ - reg::packed(4325, MAY_BE_BOOL), /* enterFunctionLike $preserveConstructorScope */ + reg::packed(4326, 0, 163), /* enterFunctionLike $functionReflection */ + reg::packed(4345, MAY_BE_BOOL), /* enterFunctionLike $preserveConstructorScope */ reg::packed(738, 0, 523), /* enterFunctionLike return */ - reg::packed(4368, MAY_BE_STRING), /* enterNamespace $namespaceName */ + reg::packed(4388, MAY_BE_STRING), /* enterNamespace $namespaceName */ reg::packed(738, 0, 523), /* enterNamespace return */ - reg::packed(4397, MAY_BE_NULL, 1454), /* enterClosureBind $thisType */ - reg::packed(4406, MAY_BE_NULL, 1454), /* enterClosureBind $nativeThisType */ - reg::packed(4421, MAY_BE_ARRAY), /* enterClosureBind $scopeClasses */ + reg::packed(4417, MAY_BE_NULL, 1454), /* enterClosureBind $thisType */ + reg::packed(4426, MAY_BE_NULL, 1454), /* enterClosureBind $nativeThisType */ + reg::packed(4441, MAY_BE_ARRAY), /* enterClosureBind $scopeClasses */ reg::packed(738, 0, 523), /* enterClosureBind return */ - reg::packed(4451, 0, 523), /* restoreOriginalScopeAfterClosureBind $originalScope */ + reg::packed(4471, 0, 523), /* restoreOriginalScopeAfterClosureBind $originalScope */ reg::packed(738, 0, 523), /* restoreOriginalScopeAfterClosureBind return */ - reg::packed(4502, 0, 523), /* restoreThis $restoreThisScope */ + reg::packed(4522, 0, 523), /* restoreThis $restoreThisScope */ reg::packed(738, 0, 523), /* restoreThis return */ - reg::packed(4397, 0, 1454), /* enterClosureCall $thisType */ - reg::packed(4406, 0, 1454), /* enterClosureCall $nativeThisType */ + reg::packed(4417, 0, 1454), /* enterClosureCall $thisType */ + reg::packed(4426, 0, 1454), /* enterClosureCall $nativeThisType */ reg::packed(738, 0, 523), /* enterClosureCall return */ reg::packed(738, MAY_BE_BOOL), /* isInClosureBind return */ - reg::packed(4421, MAY_BE_ARRAY), /* withClosureBindScopeClasses $scopeClasses */ + reg::packed(4441, MAY_BE_ARRAY), /* withClosureBindScopeClasses $scopeClasses */ reg::packed(738, 0, 523), /* withClosureBindScopeClasses return */ - reg::packed(4592, 0, 4600), /* enterAnonymousFunction $closure */ - reg::packed(4628, MAY_BE_NULL | MAY_BE_ARRAY), /* enterAnonymousFunction $callableParameters */ - reg::packed(4647, MAY_BE_NULL | MAY_BE_ARRAY, reg::NoString, false, false, 222), /* enterAnonymousFunction $nativeCallableParameters */ + reg::packed(4612, 0, 4620), /* enterAnonymousFunction $closure */ + reg::packed(4648, MAY_BE_NULL | MAY_BE_ARRAY), /* enterAnonymousFunction $callableParameters */ + reg::packed(4667, MAY_BE_NULL | MAY_BE_ARRAY, reg::NoString, false, false, 222), /* enterAnonymousFunction $nativeCallableParameters */ reg::packed(738, 0, 523), /* enterAnonymousFunction return */ - reg::packed(4592, 0, 4600), /* enterAnonymousFunctionWithoutReflection $closure */ - reg::packed(4628, MAY_BE_NULL | MAY_BE_ARRAY), /* enterAnonymousFunctionWithoutReflection $callableParameters */ - reg::packed(4647, MAY_BE_NULL | MAY_BE_ARRAY), /* enterAnonymousFunctionWithoutReflection $nativeCallableParameters */ + reg::packed(4612, 0, 4620), /* enterAnonymousFunctionWithoutReflection $closure */ + reg::packed(4648, MAY_BE_NULL | MAY_BE_ARRAY), /* enterAnonymousFunctionWithoutReflection $callableParameters */ + reg::packed(4667, MAY_BE_NULL | MAY_BE_ARRAY), /* enterAnonymousFunctionWithoutReflection $nativeCallableParameters */ reg::packed(738, 0, 523), /* enterAnonymousFunctionWithoutReflection return */ - reg::packed(154, 0, 4735), /* isInvokedWhereCreated $function */ - reg::packed(738, MAY_BE_BOOL), /* isInvokedWhereCreated return */ + reg::packed(738, 0, 523), /* forgetMutablePropertyFetches return */ reg::packed(966, 0, 1742), /* containsMutablePropertyFetch $expr */ reg::packed(738, MAY_BE_BOOL), /* containsMutablePropertyFetch return */ reg::packed(237, MAY_BE_ARRAY), /* invalidateMutablePropertyFetches $expressionTypes */ reg::packed(738, MAY_BE_ARRAY), /* invalidateMutablePropertyFetches return */ reg::packed(278, MAY_BE_ARRAY), /* invalidateMutablePropertyFetchConditionalExpressions $conditionalExpressions */ reg::packed(738, MAY_BE_ARRAY), /* invalidateMutablePropertyFetchConditionalExpressions return */ - reg::packed(4934, 0, 4945), /* expressionTypeIsUnchangeable $typeHolder */ + reg::packed(4899, 0, 4910), /* expressionTypeIsUnchangeable $typeHolder */ reg::packed(738, MAY_BE_BOOL), /* expressionTypeIsUnchangeable return */ reg::packed(237, MAY_BE_ARRAY), /* invalidateStaticExpressions $expressionTypes */ reg::packed(738, MAY_BE_ARRAY), /* invalidateStaticExpressions return */ - reg::packed(5040, 0, 5054), /* enterArrowFunction $arrowFunction */ - reg::packed(4628, MAY_BE_NULL | MAY_BE_ARRAY), /* enterArrowFunction $callableParameters */ - reg::packed(4647, MAY_BE_NULL | MAY_BE_ARRAY, reg::NoString, false, false, 222), /* enterArrowFunction $nativeCallableParameters */ + reg::packed(5005, 0, 5019), /* enterArrowFunction $arrowFunction */ + reg::packed(4648, MAY_BE_NULL | MAY_BE_ARRAY), /* enterArrowFunction $callableParameters */ + reg::packed(4667, MAY_BE_NULL | MAY_BE_ARRAY, reg::NoString, false, false, 222), /* enterArrowFunction $nativeCallableParameters */ reg::packed(738, 0, 523), /* enterArrowFunction return */ - reg::packed(5040, 0, 5054), /* enterArrowFunctionWithoutReflection $arrowFunction */ - reg::packed(4628, MAY_BE_NULL | MAY_BE_ARRAY), /* enterArrowFunctionWithoutReflection $callableParameters */ - reg::packed(4647, MAY_BE_NULL | MAY_BE_ARRAY), /* enterArrowFunctionWithoutReflection $nativeCallableParameters */ + reg::packed(5005, 0, 5019), /* enterArrowFunctionWithoutReflection $arrowFunction */ + reg::packed(4648, MAY_BE_NULL | MAY_BE_ARRAY), /* enterArrowFunctionWithoutReflection $callableParameters */ + reg::packed(4667, MAY_BE_NULL | MAY_BE_ARRAY), /* enterArrowFunctionWithoutReflection $nativeCallableParameters */ reg::packed(738, 0, 523), /* enterArrowFunctionWithoutReflection return */ - reg::packed(2961, 0, 5143), /* isParameterValueNullable $parameter */ + reg::packed(2981, 0, 5108), /* isParameterValueNullable $parameter */ reg::packed(738, MAY_BE_BOOL), /* isParameterValueNullable return */ - reg::packed(3958, 0), /* getFunctionType $type */ - reg::packed(5189, MAY_BE_BOOL), /* getFunctionType $isNullable */ - reg::packed(5200, MAY_BE_BOOL), /* getFunctionType $isVariadic */ + reg::packed(3978, 0), /* getFunctionType $type */ + reg::packed(5154, MAY_BE_BOOL), /* getFunctionType $isNullable */ + reg::packed(5165, MAY_BE_BOOL), /* getFunctionType $isVariadic */ reg::packed(738, 0, 1454), /* getFunctionType return */ - reg::packed(2961, 0, 5143), /* getCallableParameterType $parameter */ - reg::packed(4628, MAY_BE_ARRAY), /* getCallableParameterType $callableParameters */ - reg::packed(5227, MAY_BE_LONG), /* getCallableParameterType $index */ + reg::packed(2981, 0, 5108), /* getCallableParameterType $parameter */ + reg::packed(4648, MAY_BE_ARRAY), /* getCallableParameterType $callableParameters */ + reg::packed(5192, MAY_BE_LONG), /* getCallableParameterType $index */ reg::packed(738, 0, 1454), /* getCallableParameterType return */ - reg::packed(4628, MAY_BE_ARRAY), /* buildVariadicArrayTypeFromCallableParameters $callableParameters */ - reg::packed(5258, MAY_BE_LONG), /* buildVariadicArrayTypeFromCallableParameters $startIndex */ + reg::packed(4648, MAY_BE_ARRAY), /* buildVariadicArrayTypeFromCallableParameters $callableParameters */ + reg::packed(5223, MAY_BE_LONG), /* buildVariadicArrayTypeFromCallableParameters $startIndex */ reg::packed(738, 0, 1454), /* buildVariadicArrayTypeFromCallableParameters return */ - reg::packed(5314, 0, 1454), /* intersectButNotNever $nativeType */ - reg::packed(5325, 0, 1454), /* intersectButNotNever $inferredType */ + reg::packed(5279, 0, 1454), /* intersectButNotNever $nativeType */ + reg::packed(5290, 0, 1454), /* intersectButNotNever $inferredType */ reg::packed(738, 0, 1454), /* intersectButNotNever return */ - reg::packed(966, 0, 5359), /* enterMatch $expr */ - reg::packed(5386, 0, 1454), /* enterMatch $condType */ - reg::packed(5395, 0, 1454), /* enterMatch $condNativeType */ + reg::packed(966, 0, 5324), /* enterMatch $expr */ + reg::packed(5351, 0, 1454), /* enterMatch $condType */ + reg::packed(5360, 0, 1454), /* enterMatch $condNativeType */ reg::packed(738, 0, 523), /* enterMatch return */ - reg::packed(4451, 0, 523), /* enterForeach $originalScope */ - reg::packed(5421, 0, 1742), /* enterForeach $iteratee */ - reg::packed(5430, 0, 1454), /* enterForeach $iterateeType */ - reg::packed(5443, 0, 1454), /* enterForeach $nativeIterateeType */ - reg::packed(5462, MAY_BE_STRING), /* enterForeach $valueName */ - reg::packed(5472, MAY_BE_NULL | MAY_BE_STRING), /* enterForeach $keyName */ - reg::packed(5480, MAY_BE_BOOL), /* enterForeach $valueByRef */ + reg::packed(4471, 0, 523), /* enterForeach $originalScope */ + reg::packed(5386, 0, 1742), /* enterForeach $iteratee */ + reg::packed(5395, 0, 1454), /* enterForeach $iterateeType */ + reg::packed(5408, 0, 1454), /* enterForeach $nativeIterateeType */ + reg::packed(5427, MAY_BE_STRING), /* enterForeach $valueName */ + reg::packed(5437, MAY_BE_NULL | MAY_BE_STRING), /* enterForeach $keyName */ + reg::packed(5445, MAY_BE_BOOL), /* enterForeach $valueByRef */ reg::packed(738, 0, 523), /* enterForeach return */ - reg::packed(4451, 0, 523), /* enterForeachKey $originalScope */ - reg::packed(5421, 0, 1742), /* enterForeachKey $iteratee */ - reg::packed(5430, 0, 1454), /* enterForeachKey $iterateeType */ - reg::packed(5443, 0, 1454), /* enterForeachKey $nativeIterateeType */ - reg::packed(5472, MAY_BE_STRING), /* enterForeachKey $keyName */ + reg::packed(4471, 0, 523), /* enterForeachKey $originalScope */ + reg::packed(5386, 0, 1742), /* enterForeachKey $iteratee */ + reg::packed(5395, 0, 1454), /* enterForeachKey $iterateeType */ + reg::packed(5408, 0, 1454), /* enterForeachKey $nativeIterateeType */ + reg::packed(5437, MAY_BE_STRING), /* enterForeachKey $keyName */ reg::packed(738, 0, 523), /* enterForeachKey return */ - reg::packed(5520, 0, 1454), /* enterCatchType $catchType */ + reg::packed(5485, 0, 1454), /* enterCatchType $catchType */ reg::packed(1404, MAY_BE_NULL | MAY_BE_STRING), /* enterCatchType $variableName */ reg::packed(738, 0, 523), /* enterCatchType return */ reg::packed(966, 0, 1742), /* enterExpressionAssign $expr */ - reg::packed(5545, MAY_BE_BOOL, reg::NoString, false, false, 402), /* enterExpressionAssign $isPlainWrite */ + reg::packed(5510, MAY_BE_BOOL, reg::NoString, false, false, 402), /* enterExpressionAssign $isPlainWrite */ reg::packed(738, 0, 523), /* enterExpressionAssign return */ reg::packed(966, 0, 1742), /* exitExpressionAssign $expr */ reg::packed(738, 0, 523), /* exitExpressionAssign return */ @@ -901,23 +901,23 @@ inline constexpr reg::PackedArg args[] = { reg::packed(966, 0, 1742), /* isUndefinedExpressionAllowed $expr */ reg::packed(738, MAY_BE_BOOL), /* isUndefinedExpressionAllowed return */ reg::packed(1404, MAY_BE_STRING), /* assignVariable $variableName */ - reg::packed(3958, 0, 1454), /* assignVariable $type */ - reg::packed(5314, 0, 1454), /* assignVariable $nativeType */ - reg::packed(5739, 0, 1417), /* assignVariable $certainty */ - reg::packed(5749, MAY_BE_ARRAY, reg::NoString, false, false, 253), /* assignVariable $intertwinedPropagatedFrom */ + reg::packed(3978, 0, 1454), /* assignVariable $type */ + reg::packed(5279, 0, 1454), /* assignVariable $nativeType */ + reg::packed(5704, 0, 1417), /* assignVariable $certainty */ + reg::packed(5714, MAY_BE_ARRAY, reg::NoString, false, false, 253), /* assignVariable $intertwinedPropagatedFrom */ reg::packed(738, 0, 523), /* assignVariable return */ reg::packed(966, 0, 1742), /* overwriteExpression $expr */ - reg::packed(3958, 0, 1454), /* overwriteExpression $type */ - reg::packed(5314, 0, 1454), /* overwriteExpression $nativeType */ + reg::packed(3978, 0, 1454), /* overwriteExpression $type */ + reg::packed(5279, 0, 1454), /* overwriteExpression $nativeType */ reg::packed(738, 0, 523), /* overwriteExpression return */ - reg::packed(5810, 0, 523), /* resolveIntertwinedAssignedType $scope */ - reg::packed(5816, 0, 1454), /* resolveIntertwinedAssignedType $rootType */ - reg::packed(5825, 0, 1742), /* resolveIntertwinedAssignedType $assignedExpr */ - reg::packed(5838, MAY_BE_STRING), /* resolveIntertwinedAssignedType $rootVariableName */ - reg::packed(5855, MAY_BE_BOOL), /* resolveIntertwinedAssignedType $native */ + reg::packed(5775, 0, 523), /* resolveIntertwinedAssignedType $scope */ + reg::packed(5781, 0, 1454), /* resolveIntertwinedAssignedType $rootType */ + reg::packed(5790, 0, 1742), /* resolveIntertwinedAssignedType $assignedExpr */ + reg::packed(5803, MAY_BE_STRING), /* resolveIntertwinedAssignedType $rootVariableName */ + reg::packed(5820, MAY_BE_BOOL), /* resolveIntertwinedAssignedType $native */ reg::packed(738, 0, 1454), /* resolveIntertwinedAssignedType return */ - reg::packed(5810, 0, 523), /* isDimFetchPathReachable $scope */ - reg::packed(5893, 0, 5902), /* isDimFetchPathReachable $dimFetch */ + reg::packed(5775, 0, 523), /* isDimFetchPathReachable $scope */ + reg::packed(5858, 0, 5867), /* isDimFetchPathReachable $dimFetch */ reg::packed(738, MAY_BE_BOOL), /* isDimFetchPathReachable return */ reg::packed(966, 0, 1742), /* unsetExpression $expr */ reg::packed(738, 0, 523), /* unsetExpression return */ @@ -928,306 +928,306 @@ inline constexpr reg::PackedArg args[] = { reg::packed(966, 0, 1742), /* getScopeStateNativeType $expr */ reg::packed(738, 0, 1454), /* getScopeStateNativeType return */ reg::packed(966, 0, 1742), /* resolveScopeStateType $expr */ - reg::packed(5855, MAY_BE_BOOL), /* resolveScopeStateType $native */ + reg::packed(5820, MAY_BE_BOOL), /* resolveScopeStateType $native */ reg::packed(738, 0, 1454), /* resolveScopeStateType return */ reg::packed(966, 0, 1742), /* specifyExpressionType $expr */ - reg::packed(3958, 0, 1454), /* specifyExpressionType $type */ - reg::packed(5314, 0, 1454), /* specifyExpressionType $nativeType */ - reg::packed(5739, 0, 1417), /* specifyExpressionType $certainty */ + reg::packed(3978, 0, 1454), /* specifyExpressionType $type */ + reg::packed(5279, 0, 1454), /* specifyExpressionType $nativeType */ + reg::packed(5704, 0, 1417), /* specifyExpressionType $certainty */ reg::packed(738, 0, 523), /* specifyExpressionType return */ reg::packed(738, 0, 523), /* openSpecificationScope return */ reg::packed(966, 0, 1742), /* isSpecifyExpressionTypeNoop $expr */ - reg::packed(3958, 0, 1454), /* isSpecifyExpressionTypeNoop $type */ + reg::packed(3978, 0, 1454), /* isSpecifyExpressionTypeNoop $type */ reg::packed(738, MAY_BE_BOOL), /* isSpecifyExpressionTypeNoop return */ reg::packed(966, 0, 1742), /* specifyExpressionTypeInPlace $expr */ - reg::packed(3958, 0, 1454), /* specifyExpressionTypeInPlace $type */ - reg::packed(5314, 0, 1454), /* specifyExpressionTypeInPlace $nativeType */ - reg::packed(5739, 0, 1417), /* specifyExpressionTypeInPlace $certainty */ - reg::packed(6126, MAY_BE_NULL, 1454, false, false, 222), /* specifyExpressionTypeInPlace $narrowedFrom */ - reg::packed(6139, MAY_BE_NULL, 1454, false, false, 222), /* specifyExpressionTypeInPlace $nativeNarrowedFrom */ + reg::packed(3978, 0, 1454), /* specifyExpressionTypeInPlace $type */ + reg::packed(5279, 0, 1454), /* specifyExpressionTypeInPlace $nativeType */ + reg::packed(5704, 0, 1417), /* specifyExpressionTypeInPlace $certainty */ + reg::packed(6091, MAY_BE_NULL, 1454, false, false, 222), /* specifyExpressionTypeInPlace $narrowedFrom */ + reg::packed(6104, MAY_BE_NULL, 1454, false, false, 222), /* specifyExpressionTypeInPlace $nativeNarrowedFrom */ reg::packed(738, MAY_BE_VOID), /* specifyExpressionTypeInPlace return */ reg::packed(966, 0, 1742), /* assignExpression $expr */ - reg::packed(3958, 0, 1454), /* assignExpression $type */ - reg::packed(5314, 0, 1454), /* assignExpression $nativeType */ + reg::packed(3978, 0, 1454), /* assignExpression $type */ + reg::packed(5279, 0, 1454), /* assignExpression $nativeType */ reg::packed(738, 0, 523), /* assignExpression return */ reg::packed(966, 0, 1742), /* specifyAssignedExpressionType $expr */ - reg::packed(3958, 0, 1454), /* specifyAssignedExpressionType $type */ - reg::packed(5314, 0, 1454), /* specifyAssignedExpressionType $nativeType */ + reg::packed(3978, 0, 1454), /* specifyAssignedExpressionType $type */ + reg::packed(5279, 0, 1454), /* specifyAssignedExpressionType $nativeType */ reg::packed(738, 0, 523), /* specifyAssignedExpressionType return */ - reg::packed(6234, 0, 1454), /* assignInitializedProperty $fetchedOnType */ - reg::packed(3812, MAY_BE_STRING), /* assignInitializedProperty $propertyName */ + reg::packed(6199, 0, 1454), /* assignInitializedProperty $fetchedOnType */ + reg::packed(3832, MAY_BE_STRING), /* assignInitializedProperty $propertyName */ reg::packed(738, 0, 523), /* assignInitializedProperty return */ - reg::packed(6274, 0, 1742), /* invalidateExpression $expressionToInvalidate */ - reg::packed(6297, MAY_BE_BOOL, reg::NoString, false, false, 148), /* invalidateExpression $requireMoreCharacters */ - reg::packed(6319, MAY_BE_NULL, 1065, false, false, 222), /* invalidateExpression $invalidatingClass */ - reg::packed(6337, MAY_BE_BOOL, reg::NoString, false, false, 148), /* invalidateExpression $keepPropertyFetches */ - reg::packed(6357, MAY_BE_NULL | MAY_BE_ARRAY, reg::NoString, false, false, 222), /* invalidateExpression $preservedPropertyNames */ + reg::packed(6239, 0, 1742), /* invalidateExpression $expressionToInvalidate */ + reg::packed(6262, MAY_BE_BOOL, reg::NoString, false, false, 148), /* invalidateExpression $requireMoreCharacters */ + reg::packed(6284, MAY_BE_NULL, 1065, false, false, 222), /* invalidateExpression $invalidatingClass */ + reg::packed(6302, MAY_BE_BOOL, reg::NoString, false, false, 148), /* invalidateExpression $keepPropertyFetches */ + reg::packed(6322, MAY_BE_NULL | MAY_BE_ARRAY, reg::NoString, false, false, 222), /* invalidateExpression $preservedPropertyNames */ reg::packed(738, 0, 523), /* invalidateExpression return */ reg::packed(1404, MAY_BE_STRING), /* assignObjectAlias $variableName */ - reg::packed(5825, 0, 1742), /* assignObjectAlias $assignedExpr */ - reg::packed(5739, MAY_BE_NULL, 1417, false, false, 222), /* assignObjectAlias $certainty */ + reg::packed(5790, 0, 1742), /* assignObjectAlias $assignedExpr */ + reg::packed(5704, MAY_BE_NULL, 1417, false, false, 222), /* assignObjectAlias $certainty */ reg::packed(738, 0, 523), /* assignObjectAlias return */ reg::packed(1404, MAY_BE_STRING), /* assignNarrowedFrom $variableName */ - reg::packed(5825, 0, 1742), /* assignNarrowedFrom $assignedExpr */ + reg::packed(5790, 0, 1742), /* assignNarrowedFrom $assignedExpr */ reg::packed(738, 0, 523), /* assignNarrowedFrom return */ reg::packed(966, 0, 1742), /* holdsSameObject $expr */ - reg::packed(6438, 0, 1742), /* holdsSameObject $otherExpr */ + reg::packed(6403, 0, 1742), /* holdsSameObject $otherExpr */ reg::packed(738, MAY_BE_BOOL), /* holdsSameObject return */ reg::packed(966, 0, 1742), /* specifyObjectAlias $expr */ - reg::packed(6464, 0, 1742), /* specifyObjectAlias $aliasedExpr */ - reg::packed(5739, 0, 1417), /* specifyObjectAlias $certainty */ + reg::packed(6429, 0, 1742), /* specifyObjectAlias $aliasedExpr */ + reg::packed(5704, 0, 1417), /* specifyObjectAlias $certainty */ reg::packed(738, 0, 523), /* specifyObjectAlias return */ reg::packed(966, 0, 1742), /* getObjectAliasRootVariableName $expr */ reg::packed(738, MAY_BE_NULL | MAY_BE_STRING), /* getObjectAliasRootVariableName return */ reg::packed(738, MAY_BE_ARRAY), /* getObjectAliasEdges return */ reg::packed(966, 0, 1742), /* getPropertyFetchChainPrefixes $expr */ - reg::packed(6546, MAY_BE_BOOL), /* getPropertyFetchChainPrefixes $includeSelf */ + reg::packed(6511, MAY_BE_BOOL), /* getPropertyFetchChainPrefixes $includeSelf */ reg::packed(738, MAY_BE_ARRAY), /* getPropertyFetchChainPrefixes return */ reg::packed(966, 0, 1742), /* findObjectAliasClass $expr */ - reg::packed(6588, MAY_BE_ARRAY), /* findObjectAliasClass $edges */ + reg::packed(6553, MAY_BE_ARRAY), /* findObjectAliasClass $edges */ reg::packed(738, MAY_BE_ARRAY), /* findObjectAliasClass return */ reg::packed(966, 0, 1742), /* findObjectAliasInvalidationTargets $expr */ - reg::packed(6297, MAY_BE_BOOL), /* findObjectAliasInvalidationTargets $requireMoreCharacters */ - reg::packed(6588, MAY_BE_ARRAY), /* findObjectAliasInvalidationTargets $edges */ + reg::packed(6262, MAY_BE_BOOL), /* findObjectAliasInvalidationTargets $requireMoreCharacters */ + reg::packed(6553, MAY_BE_ARRAY), /* findObjectAliasInvalidationTargets $edges */ reg::packed(738, MAY_BE_ARRAY), /* findObjectAliasInvalidationTargets return */ - reg::packed(6588, MAY_BE_ARRAY), /* reconnectObjectAliases $edges */ - reg::packed(6650, MAY_BE_ARRAY), /* reconnectObjectAliases $targets */ + reg::packed(6553, MAY_BE_ARRAY), /* reconnectObjectAliases $edges */ + reg::packed(6615, MAY_BE_ARRAY), /* reconnectObjectAliases $targets */ reg::packed(738, 0, 523), /* reconnectObjectAliases return */ - reg::packed(6274, 0, 1742), /* invalidateExpressionWithoutAliases $expressionToInvalidate */ - reg::packed(6297, MAY_BE_BOOL), /* invalidateExpressionWithoutAliases $requireMoreCharacters */ - reg::packed(6319, MAY_BE_NULL, 1065), /* invalidateExpressionWithoutAliases $invalidatingClass */ - reg::packed(6337, MAY_BE_BOOL), /* invalidateExpressionWithoutAliases $keepPropertyFetches */ - reg::packed(6357, MAY_BE_NULL | MAY_BE_ARRAY), /* invalidateExpressionWithoutAliases $preservedPropertyNames */ + reg::packed(6239, 0, 1742), /* invalidateExpressionWithoutAliases $expressionToInvalidate */ + reg::packed(6262, MAY_BE_BOOL), /* invalidateExpressionWithoutAliases $requireMoreCharacters */ + reg::packed(6284, MAY_BE_NULL, 1065), /* invalidateExpressionWithoutAliases $invalidatingClass */ + reg::packed(6302, MAY_BE_BOOL), /* invalidateExpressionWithoutAliases $keepPropertyFetches */ + reg::packed(6322, MAY_BE_NULL | MAY_BE_ARRAY), /* invalidateExpressionWithoutAliases $preservedPropertyNames */ reg::packed(738, 0, 523), /* invalidateExpressionWithoutAliases return */ reg::packed(966, 0, 1742), /* isPrivatePropertyOfDifferentClass $expr */ - reg::packed(6319, 0, 1065), /* isPrivatePropertyOfDifferentClass $invalidatingClass */ + reg::packed(6284, 0, 1065), /* isPrivatePropertyOfDifferentClass $invalidatingClass */ reg::packed(738, MAY_BE_BOOL), /* isPrivatePropertyOfDifferentClass return */ - reg::packed(6274, 0, 1742), /* invalidateMethodsOnExpression $expressionToInvalidate */ + reg::packed(6239, 0, 1742), /* invalidateMethodsOnExpression $expressionToInvalidate */ reg::packed(738, 0, 523), /* invalidateMethodsOnExpression return */ reg::packed(966, 0, 1742), /* setExpressionCertaintyKeepingType $expr */ - reg::packed(5739, 0, 1417), /* setExpressionCertaintyKeepingType $certainty */ + reg::packed(5704, 0, 1417), /* setExpressionCertaintyKeepingType $certainty */ reg::packed(738, 0, 523), /* setExpressionCertaintyKeepingType return */ - reg::packed(6814, 0, 1454), /* removeArraysWithoutOffsetValueType $varType */ - reg::packed(6822, 0, 1454), /* removeArraysWithoutOffsetValueType $dimType */ - reg::packed(6830, 0, 1454), /* removeArraysWithoutOffsetValueType $offsetValueType */ + reg::packed(6779, 0, 1454), /* removeArraysWithoutOffsetValueType $varType */ + reg::packed(6787, 0, 1454), /* removeArraysWithoutOffsetValueType $dimType */ + reg::packed(6795, 0, 1454), /* removeArraysWithoutOffsetValueType $offsetValueType */ reg::packed(738, 0, 1454), /* removeArraysWithoutOffsetValueType return */ - reg::packed(3958, 0, 1454), /* isComplexUnionType $type */ + reg::packed(3978, 0, 1454), /* isComplexUnionType $type */ reg::packed(738, MAY_BE_BOOL), /* isComplexUnionType return */ reg::packed(966, 0, 1742), /* addTypeToExpression $expr */ - reg::packed(3958, 0, 1454), /* addTypeToExpression $type */ + reg::packed(3978, 0, 1454), /* addTypeToExpression $type */ reg::packed(738, 0, 523), /* addTypeToExpression return */ reg::packed(966, 0, 1742), /* removeTypeFromExpression $expr */ - reg::packed(6920, 0, 1454), /* removeTypeFromExpression $typeToRemove */ + reg::packed(6885, 0, 1454), /* removeTypeFromExpression $typeToRemove */ reg::packed(738, 0, 523), /* removeTypeFromExpression return */ reg::packed(966, 0, 1742), /* filterByTruthyValue $expr */ reg::packed(738, 0, 523), /* filterByTruthyValue return */ reg::packed(966, 0, 1742), /* filterByFalseyValue $expr */ reg::packed(738, 0, 523), /* filterByFalseyValue return */ - reg::packed(6998, 0, 2065), /* applySpecifiedTypes $specifiedTypes */ + reg::packed(6963, 0, 2065), /* applySpecifiedTypes $specifiedTypes */ reg::packed(738, 0, 523), /* applySpecifiedTypes return */ - reg::packed(7033, MAY_BE_ARRAY), /* respecifyRelationalFacts $changedExpressions */ + reg::packed(6998, MAY_BE_ARRAY), /* respecifyRelationalFacts $changedExpressions */ reg::packed(738, MAY_BE_NULL, 2065), /* respecifyRelationalFacts return */ - reg::packed(6998, 0, 2065), /* applySpecifiedTypesBatch $specifiedTypes */ + reg::packed(6963, 0, 2065), /* applySpecifiedTypesBatch $specifiedTypes */ reg::packed(738, MAY_BE_ARRAY), /* applySpecifiedTypesBatch return */ - reg::packed(7102, MAY_BE_ARRAY), /* processConditionalExpressionsAfterSpecifying $specifiedExpressions */ + reg::packed(7067, MAY_BE_ARRAY), /* processConditionalExpressionsAfterSpecifying $specifiedExpressions */ reg::packed(738, 0, 523), /* processConditionalExpressionsAfterSpecifying return */ reg::packed(738, MAY_BE_ARRAY), /* getConditionalExpressions return */ reg::packed(1913, MAY_BE_STRING), /* addConditionalExpressions $exprString */ - reg::packed(7194, MAY_BE_ARRAY), /* addConditionalExpressions $conditionalExpressionHolders */ + reg::packed(7159, MAY_BE_ARRAY), /* addConditionalExpressions $conditionalExpressionHolders */ reg::packed(738, 0, 523), /* addConditionalExpressions return */ reg::packed(738, 0, 523), /* exitFirstLevelStatements return */ reg::packed(738, MAY_BE_BOOL), /* isInFirstLevelStatement return */ - reg::packed(7298, MAY_BE_NULL, 523), /* mergeWith $otherScope */ - reg::packed(7309, MAY_BE_BOOL, reg::NoString, false, false, 148), /* mergeWith $preserveVacuousConditionals */ - reg::packed(7337, MAY_BE_BOOL, reg::NoString, false, false, 148), /* mergeWith $joinsIterations */ + reg::packed(7263, MAY_BE_NULL, 523), /* mergeWith $otherScope */ + reg::packed(7274, MAY_BE_BOOL, reg::NoString, false, false, 148), /* mergeWith $preserveVacuousConditionals */ + reg::packed(7302, MAY_BE_BOOL, reg::NoString, false, false, 148), /* mergeWith $joinsIterations */ reg::packed(738, 0, 523), /* mergeWith return */ - reg::packed(7363, MAY_BE_ARRAY), /* completeOffsetWriteBases $differingKeys */ - reg::packed(7377, MAY_BE_ARRAY, reg::NoString, true, false), /* completeOffsetWriteBases $ourTypes */ - reg::packed(7386, MAY_BE_ARRAY, reg::NoString, true, false), /* completeOffsetWriteBases $theirTypes */ - reg::packed(7397, MAY_BE_ARRAY, reg::NoString, true, false), /* completeOffsetWriteBases $ourNativeTypes */ - reg::packed(7412, MAY_BE_ARRAY, reg::NoString, true, false), /* completeOffsetWriteBases $theirNativeTypes */ + reg::packed(7328, MAY_BE_ARRAY), /* completeOffsetWriteBases $differingKeys */ + reg::packed(7342, MAY_BE_ARRAY, reg::NoString, true, false), /* completeOffsetWriteBases $ourTypes */ + reg::packed(7351, MAY_BE_ARRAY, reg::NoString, true, false), /* completeOffsetWriteBases $theirTypes */ + reg::packed(7362, MAY_BE_ARRAY, reg::NoString, true, false), /* completeOffsetWriteBases $ourNativeTypes */ + reg::packed(7377, MAY_BE_ARRAY, reg::NoString, true, false), /* completeOffsetWriteBases $theirNativeTypes */ reg::packed(738, MAY_BE_BOOL), /* completeOffsetWriteBases return */ reg::packed(1913, MAY_BE_STRING), /* completeOffsetWriteBase $exprString */ - reg::packed(7454, 0, 4945), /* completeOffsetWriteBase $holder */ - reg::packed(7461, MAY_BE_ARRAY, reg::NoString, true, false), /* completeOffsetWriteBase $types */ - reg::packed(7467, MAY_BE_ARRAY, reg::NoString, true, false), /* completeOffsetWriteBase $nativeTypes */ + reg::packed(7419, 0, 4910), /* completeOffsetWriteBase $holder */ + reg::packed(7426, MAY_BE_ARRAY, reg::NoString, true, false), /* completeOffsetWriteBase $types */ + reg::packed(7432, MAY_BE_ARRAY, reg::NoString, true, false), /* completeOffsetWriteBase $nativeTypes */ reg::packed(738, MAY_BE_BOOL), /* completeOffsetWriteBase return */ - reg::packed(7503, 0, 523), /* collectAbsorbedClosures $ours */ - reg::packed(7508, 0, 523), /* collectAbsorbedClosures $theirs */ + reg::packed(7468, 0, 523), /* collectAbsorbedClosures $ours */ + reg::packed(7473, 0, 523), /* collectAbsorbedClosures $theirs */ reg::packed(738, MAY_BE_NULL, 672), /* collectAbsorbedClosures return */ - reg::packed(7298, MAY_BE_NULL, 523), /* mergeWithVariableState $otherScope */ - reg::packed(7309, MAY_BE_BOOL), /* mergeWithVariableState $preserveVacuousConditionals */ - reg::packed(7337, MAY_BE_BOOL), /* mergeWithVariableState $joinsIterations */ + reg::packed(7263, MAY_BE_NULL, 523), /* mergeWithVariableState $otherScope */ + reg::packed(7274, MAY_BE_BOOL), /* mergeWithVariableState $preserveVacuousConditionals */ + reg::packed(7302, MAY_BE_BOOL), /* mergeWithVariableState $joinsIterations */ reg::packed(738, 0, 523), /* mergeWithVariableState return */ - reg::packed(7562, MAY_BE_ARRAY), /* findMergedCallCandidates $differingExpressionKeys */ - reg::packed(7586, MAY_BE_ARRAY), /* findMergedCallCandidates $mergedExpressionTypes */ + reg::packed(7527, MAY_BE_ARRAY), /* findMergedCallCandidates $differingExpressionKeys */ + reg::packed(7551, MAY_BE_ARRAY), /* findMergedCallCandidates $mergedExpressionTypes */ reg::packed(738, MAY_BE_ARRAY), /* findMergedCallCandidates return */ - reg::packed(7633, 0, 7638), /* hasNarrowableArgument $call */ + reg::packed(7598, 0, 7603), /* hasNarrowableArgument $call */ reg::packed(738, MAY_BE_BOOL), /* hasNarrowableArgument return */ - reg::packed(7751, MAY_BE_ARRAY), /* findUninformativeMergedCalls $candidates */ - reg::packed(7762, MAY_BE_ARRAY), /* findUninformativeMergedCalls $mergedNativeTypes */ + reg::packed(7716, MAY_BE_ARRAY), /* findUninformativeMergedCalls $candidates */ + reg::packed(7727, MAY_BE_ARRAY), /* findUninformativeMergedCalls $mergedNativeTypes */ reg::packed(738, MAY_BE_ARRAY), /* findUninformativeMergedCalls return */ - reg::packed(7562, MAY_BE_ARRAY), /* withoutPreciseClassConstantFetches $differingExpressionKeys */ - reg::packed(7809, MAY_BE_ARRAY), /* withoutPreciseClassConstantFetches $ourExpressionTypes */ - reg::packed(7828, MAY_BE_ARRAY), /* withoutPreciseClassConstantFetches $theirExpressionTypes */ + reg::packed(7527, MAY_BE_ARRAY), /* withoutPreciseClassConstantFetches $differingExpressionKeys */ + reg::packed(7774, MAY_BE_ARRAY), /* withoutPreciseClassConstantFetches $ourExpressionTypes */ + reg::packed(7793, MAY_BE_ARRAY), /* withoutPreciseClassConstantFetches $theirExpressionTypes */ reg::packed(738, MAY_BE_ARRAY), /* withoutPreciseClassConstantFetches return */ - reg::packed(7884, MAY_BE_ARRAY), /* preserveVacuousConditionalExpressions $currentConditionalExpressions */ - reg::packed(7914, MAY_BE_ARRAY), /* preserveVacuousConditionalExpressions $sourceConditionalExpressions */ - reg::packed(7943, MAY_BE_ARRAY), /* preserveVacuousConditionalExpressions $otherExpressionTypes */ - reg::packed(7337, MAY_BE_BOOL), /* preserveVacuousConditionalExpressions $joinsIterations */ + reg::packed(7849, MAY_BE_ARRAY), /* preserveVacuousConditionalExpressions $currentConditionalExpressions */ + reg::packed(7879, MAY_BE_ARRAY), /* preserveVacuousConditionalExpressions $sourceConditionalExpressions */ + reg::packed(7908, MAY_BE_ARRAY), /* preserveVacuousConditionalExpressions $otherExpressionTypes */ + reg::packed(7302, MAY_BE_BOOL), /* preserveVacuousConditionalExpressions $joinsIterations */ reg::packed(738, MAY_BE_ARRAY), /* preserveVacuousConditionalExpressions return */ - reg::packed(7454, 0, 8002), /* isAboutCall $holder */ + reg::packed(7419, 0, 7967), /* isAboutCall $holder */ reg::packed(738, MAY_BE_BOOL), /* isAboutCall return */ - reg::packed(7884, MAY_BE_ARRAY), /* mergeSameGuardConditionalExpressions $currentConditionalExpressions */ - reg::packed(8059, MAY_BE_ARRAY), /* mergeSameGuardConditionalExpressions $ourConditionalExpressions */ - reg::packed(8085, MAY_BE_ARRAY), /* mergeSameGuardConditionalExpressions $theirConditionalExpressions */ + reg::packed(7849, MAY_BE_ARRAY), /* mergeSameGuardConditionalExpressions $currentConditionalExpressions */ + reg::packed(8024, MAY_BE_ARRAY), /* mergeSameGuardConditionalExpressions $ourConditionalExpressions */ + reg::packed(8050, MAY_BE_ARRAY), /* mergeSameGuardConditionalExpressions $theirConditionalExpressions */ reg::packed(738, MAY_BE_ARRAY), /* mergeSameGuardConditionalExpressions return */ - reg::packed(8150, MAY_BE_ARRAY), /* mergeConditionalExpressions $newConditionalExpressions */ - reg::packed(8176, MAY_BE_ARRAY), /* mergeConditionalExpressions $existingConditionalExpressions */ + reg::packed(8115, MAY_BE_ARRAY), /* mergeConditionalExpressions $newConditionalExpressions */ + reg::packed(8141, MAY_BE_ARRAY), /* mergeConditionalExpressions $existingConditionalExpressions */ reg::packed(738, MAY_BE_ARRAY), /* mergeConditionalExpressions return */ - reg::packed(8235, 0, 523), /* mergeInitializedProperties $calledMethodScope */ + reg::packed(8200, 0, 523), /* mergeInitializedProperties $calledMethodScope */ reg::packed(738, 0, 523), /* mergeInitializedProperties return */ - reg::packed(8280, 0, 523), /* processFinallyScope $finallyScope */ - reg::packed(8293, 0, 523), /* processFinallyScope $originalFinallyScope */ + reg::packed(8245, 0, 523), /* processFinallyScope $finallyScope */ + reg::packed(8258, 0, 523), /* processFinallyScope $originalFinallyScope */ reg::packed(738, 0, 523), /* processFinallyScope return */ - reg::packed(8334, MAY_BE_ARRAY), /* processFinallyScopeVariableTypeHolders $ourVariableTypeHolders */ - reg::packed(8357, MAY_BE_ARRAY), /* processFinallyScopeVariableTypeHolders $finallyVariableTypeHolders */ - reg::packed(8384, MAY_BE_ARRAY), /* processFinallyScopeVariableTypeHolders $originalVariableTypeHolders */ + reg::packed(8299, MAY_BE_ARRAY), /* processFinallyScopeVariableTypeHolders $ourVariableTypeHolders */ + reg::packed(8322, MAY_BE_ARRAY), /* processFinallyScopeVariableTypeHolders $finallyVariableTypeHolders */ + reg::packed(8349, MAY_BE_ARRAY), /* processFinallyScopeVariableTypeHolders $originalVariableTypeHolders */ reg::packed(738, MAY_BE_ARRAY), /* processFinallyScopeVariableTypeHolders return */ - reg::packed(8451, 0, 523), /* processClosureScope $closureScope */ - reg::packed(8464, MAY_BE_NULL, 523), /* processClosureScope $prevScope */ - reg::packed(8474, MAY_BE_ARRAY), /* processClosureScope $byRefUses */ + reg::packed(8416, 0, 523), /* processClosureScope $closureScope */ + reg::packed(8429, MAY_BE_NULL, 523), /* processClosureScope $prevScope */ + reg::packed(8439, MAY_BE_ARRAY), /* processClosureScope $byRefUses */ reg::packed(738, 0, 523), /* processClosureScope return */ - reg::packed(8504, 0, 523), /* processAlwaysIterableForeachScopeWithoutPollute $finalScope */ + reg::packed(8469, 0, 523), /* processAlwaysIterableForeachScopeWithoutPollute $finalScope */ reg::packed(738, 0, 523), /* processAlwaysIterableForeachScopeWithoutPollute return */ - reg::packed(8563, MAY_BE_NULL | MAY_BE_ARRAY), /* forgetLoopWrittenVariables $writtenVariableNames */ + reg::packed(8528, MAY_BE_NULL | MAY_BE_ARRAY), /* forgetLoopWrittenVariables $writtenVariableNames */ reg::packed(738, 0, 523), /* forgetLoopWrittenVariables return */ - reg::packed(8611, 0, 523), /* forgetChangedLoopVariables $previousScope */ - reg::packed(8563, MAY_BE_NULL | MAY_BE_ARRAY), /* forgetChangedLoopVariables $writtenVariableNames */ + reg::packed(8576, 0, 523), /* forgetChangedLoopVariables $previousScope */ + reg::packed(8528, MAY_BE_NULL | MAY_BE_ARRAY), /* forgetChangedLoopVariables $writtenVariableNames */ reg::packed(738, MAY_BE_NULL, 523), /* forgetChangedLoopVariables return */ - reg::packed(7298, 0, 523), /* getChangedVariableNames $otherScope */ + reg::packed(7263, 0, 523), /* getChangedVariableNames $otherScope */ reg::packed(738, MAY_BE_ARRAY), /* getChangedVariableNames return */ - reg::packed(8676, 0, 1454), /* generalizeIteratedType $previousType */ - reg::packed(3958, 0, 1454), /* generalizeIteratedType $type */ + reg::packed(8641, 0, 1454), /* generalizeIteratedType $previousType */ + reg::packed(3978, 0, 1454), /* generalizeIteratedType $type */ reg::packed(738, 0, 1454), /* generalizeIteratedType return */ - reg::packed(7298, 0, 523), /* generalizeWith $otherScope */ - reg::packed(8712, MAY_BE_NULL | MAY_BE_ARRAY, reg::NoString, false, false, 222), /* generalizeWith $writableVariableNames */ - reg::packed(8734, MAY_BE_NULL, 523, false, false, 222), /* generalizeWith $loopEntryScope */ + reg::packed(7263, 0, 523), /* generalizeWith $otherScope */ + reg::packed(8677, MAY_BE_NULL | MAY_BE_ARRAY, reg::NoString, false, false, 222), /* generalizeWith $writableVariableNames */ + reg::packed(8699, MAY_BE_NULL, 523, false, false, 222), /* generalizeWith $loopEntryScope */ reg::packed(738, 0, 523), /* generalizeWith return */ - reg::packed(7298, 0, 523), /* generalizeWithVariableState $otherScope */ - reg::packed(8712, MAY_BE_NULL | MAY_BE_ARRAY), /* generalizeWithVariableState $writableVariableNames */ - reg::packed(8734, MAY_BE_NULL, 523), /* generalizeWithVariableState $loopEntryScope */ + reg::packed(7263, 0, 523), /* generalizeWithVariableState $otherScope */ + reg::packed(8677, MAY_BE_NULL | MAY_BE_ARRAY), /* generalizeWithVariableState $writableVariableNames */ + reg::packed(8699, MAY_BE_NULL, 523), /* generalizeWithVariableState $loopEntryScope */ reg::packed(738, 0, 523), /* generalizeWithVariableState return */ reg::packed(278, MAY_BE_ARRAY), /* withoutWidenedConditionalExpressions $conditionalExpressions */ reg::packed(237, MAY_BE_ARRAY), /* withoutWidenedConditionalExpressions $expressionTypes */ - reg::packed(8792, MAY_BE_ARRAY), /* withoutWidenedConditionalExpressions $generalizedExpressionTypes */ + reg::packed(8757, MAY_BE_ARRAY), /* withoutWidenedConditionalExpressions $generalizedExpressionTypes */ reg::packed(738, MAY_BE_ARRAY), /* withoutWidenedConditionalExpressions return */ - reg::packed(8856, MAY_BE_ARRAY), /* generalizeVariableTypeHolders $variableTypeHolders */ - reg::packed(8876, MAY_BE_ARRAY), /* generalizeVariableTypeHolders $otherVariableTypeHolders */ - reg::packed(8712, MAY_BE_NULL | MAY_BE_ARRAY), /* generalizeVariableTypeHolders $writableVariableNames */ - reg::packed(8901, MAY_BE_ARRAY), /* generalizeVariableTypeHolders $entryVariableTypeHolders */ + reg::packed(8821, MAY_BE_ARRAY), /* generalizeVariableTypeHolders $variableTypeHolders */ + reg::packed(8841, MAY_BE_ARRAY), /* generalizeVariableTypeHolders $otherVariableTypeHolders */ + reg::packed(8677, MAY_BE_NULL | MAY_BE_ARRAY), /* generalizeVariableTypeHolders $writableVariableNames */ + reg::packed(8866, MAY_BE_ARRAY), /* generalizeVariableTypeHolders $entryVariableTypeHolders */ reg::packed(738, MAY_BE_ARRAY), /* generalizeVariableTypeHolders return */ - reg::packed(3958, 0, 1454), /* flattenUnionForGeneralization $type */ + reg::packed(3978, 0, 1454), /* flattenUnionForGeneralization $type */ reg::packed(738, MAY_BE_ARRAY), /* flattenUnionForGeneralization return */ - reg::packed(8986, 0, 1454), /* generalizeType $a */ - reg::packed(8988, 0, 1454), /* generalizeType $b */ - reg::packed(8990, MAY_BE_LONG), /* generalizeType $depth */ - reg::packed(8996, MAY_BE_NULL, 1454, false, false, 222), /* generalizeType $entryType */ + reg::packed(8951, 0, 1454), /* generalizeType $a */ + reg::packed(8953, 0, 1454), /* generalizeType $b */ + reg::packed(8955, MAY_BE_LONG), /* generalizeType $depth */ + reg::packed(8961, MAY_BE_NULL, 1454, false, false, 222), /* generalizeType $entryType */ reg::packed(738, 0, 1454), /* generalizeType return */ - reg::packed(8986, MAY_BE_ARRAY), /* generalizeConstantFloats $a */ - reg::packed(8988, MAY_BE_ARRAY), /* generalizeConstantFloats $b */ - reg::packed(9021, MAY_BE_DOUBLE), /* generalizeConstantFloats $entryMin */ - reg::packed(9030, MAY_BE_DOUBLE), /* generalizeConstantFloats $entryMax */ + reg::packed(8951, MAY_BE_ARRAY), /* generalizeConstantFloats $a */ + reg::packed(8953, MAY_BE_ARRAY), /* generalizeConstantFloats $b */ + reg::packed(8986, MAY_BE_DOUBLE), /* generalizeConstantFloats $entryMin */ + reg::packed(8995, MAY_BE_DOUBLE), /* generalizeConstantFloats $entryMax */ reg::packed(738, 0, 1454), /* generalizeConstantFloats return */ - reg::packed(8986, 0, 1454), /* generalizeShapesKeyByKey $a */ - reg::packed(8988, 0, 1454), /* generalizeShapesKeyByKey $b */ - reg::packed(8990, MAY_BE_LONG), /* generalizeShapesKeyByKey $depth */ - reg::packed(9064, 0, 1454), /* generalizeShapesKeyByKey $allA */ - reg::packed(9069, 0, 1454), /* generalizeShapesKeyByKey $allB */ + reg::packed(8951, 0, 1454), /* generalizeShapesKeyByKey $a */ + reg::packed(8953, 0, 1454), /* generalizeShapesKeyByKey $b */ + reg::packed(8955, MAY_BE_LONG), /* generalizeShapesKeyByKey $depth */ + reg::packed(9029, 0, 1454), /* generalizeShapesKeyByKey $allA */ + reg::packed(9034, 0, 1454), /* generalizeShapesKeyByKey $allB */ reg::packed(738, 0, 1454), /* generalizeShapesKeyByKey return */ - reg::packed(8986, 0, 1454), /* pairShapes $a */ - reg::packed(8988, 0, 1454), /* pairShapes $b */ + reg::packed(8951, 0, 1454), /* pairShapes $a */ + reg::packed(8953, 0, 1454), /* pairShapes $b */ reg::packed(738, MAY_BE_NULL | MAY_BE_ARRAY), /* pairShapes return */ - reg::packed(9110, 0, 9116), /* getRequiredKeysSignature $shape */ + reg::packed(9075, 0, 9081), /* getRequiredKeysSignature $shape */ reg::packed(738, MAY_BE_STRING), /* getRequiredKeysSignature return */ - reg::packed(3958, 0, 1454), /* getArrayDepth $type */ + reg::packed(3978, 0, 1454), /* getArrayDepth $type */ reg::packed(738, MAY_BE_LONG), /* getArrayDepth return */ - reg::packed(7298, 0, 523), /* equals $otherScope */ + reg::packed(7263, 0, 523), /* equals $otherScope */ reg::packed(738, MAY_BE_BOOL), /* equals return */ reg::packed(278, MAY_BE_ARRAY), /* compareConditionalExpressions $conditionalExpressions */ - reg::packed(9202, MAY_BE_ARRAY), /* compareConditionalExpressions $otherConditionalExpressions */ + reg::packed(9167, MAY_BE_ARRAY), /* compareConditionalExpressions $otherConditionalExpressions */ reg::packed(738, MAY_BE_BOOL), /* compareConditionalExpressions return */ - reg::packed(8856, MAY_BE_ARRAY), /* compareVariableTypeHolders $variableTypeHolders */ - reg::packed(8876, MAY_BE_ARRAY), /* compareVariableTypeHolders $otherVariableTypeHolders */ + reg::packed(8821, MAY_BE_ARRAY), /* compareVariableTypeHolders $variableTypeHolders */ + reg::packed(8841, MAY_BE_ARRAY), /* compareVariableTypeHolders $otherVariableTypeHolders */ reg::packed(738, MAY_BE_BOOL), /* compareVariableTypeHolders return */ - reg::packed(9287, 0, 9306), /* canAccessProperty $propertyReflection */ + reg::packed(9252, 0, 9271), /* canAccessProperty $propertyReflection */ reg::packed(738, MAY_BE_BOOL), /* canAccessProperty return */ - reg::packed(9287, 0, 9362), /* canReadProperty $propertyReflection */ + reg::packed(9252, 0, 9327), /* canReadProperty $propertyReflection */ reg::packed(738, MAY_BE_BOOL), /* canReadProperty return */ - reg::packed(9287, 0, 9362), /* canWriteProperty $propertyReflection */ + reg::packed(9252, 0, 9327), /* canWriteProperty $propertyReflection */ reg::packed(738, MAY_BE_BOOL), /* canWriteProperty return */ - reg::packed(9441, 0, 9458), /* canCallMethod $methodReflection */ + reg::packed(9406, 0, 9423), /* canCallMethod $methodReflection */ reg::packed(738, MAY_BE_BOOL), /* canCallMethod return */ - reg::packed(9508, 0, 9527), /* canAccessConstant $constantReflection */ + reg::packed(9473, 0, 9492), /* canAccessConstant $constantReflection */ reg::packed(738, MAY_BE_BOOL), /* canAccessConstant return */ - reg::packed(9588, 0, 9610), /* canAccessClassMember $classMemberReflection */ + reg::packed(9553, 0, 9575), /* canAccessClassMember $classMemberReflection */ reg::packed(738, MAY_BE_BOOL), /* canAccessClassMember return */ reg::packed(738, MAY_BE_ARRAY), /* debug return */ - reg::packed(9678, 0, 1454), /* filterTypeWithMethod $typeWithMethod */ - reg::packed(9693, MAY_BE_STRING), /* filterTypeWithMethod $methodName */ + reg::packed(9643, 0, 1454), /* filterTypeWithMethod $typeWithMethod */ + reg::packed(9658, MAY_BE_STRING), /* filterTypeWithMethod $methodName */ reg::packed(738, MAY_BE_NULL, 1454), /* filterTypeWithMethod return */ - reg::packed(9678, 0, 1454), /* getMethodReflection $typeWithMethod */ - reg::packed(9693, MAY_BE_STRING), /* getMethodReflection $methodName */ - reg::packed(738, MAY_BE_NULL, 9725), /* getMethodReflection return */ - reg::packed(9678, 0, 1454), /* getNakedMethod $typeWithMethod */ - reg::packed(9693, MAY_BE_STRING), /* getNakedMethod $methodName */ - reg::packed(738, MAY_BE_NULL, 9725), /* getNakedMethod return */ - reg::packed(9804, 0, 1454), /* getPropertyReflection $typeWithProperty */ - reg::packed(3812, MAY_BE_STRING), /* getPropertyReflection $propertyName */ - reg::packed(738, MAY_BE_NULL, 9362), /* getPropertyReflection return */ - reg::packed(9804, 0, 1454), /* getInstancePropertyReflection $typeWithProperty */ - reg::packed(3812, MAY_BE_STRING), /* getInstancePropertyReflection $propertyName */ - reg::packed(738, MAY_BE_NULL, 9362), /* getInstancePropertyReflection return */ - reg::packed(9804, 0, 1454), /* getStaticPropertyReflection $typeWithProperty */ - reg::packed(3812, MAY_BE_STRING), /* getStaticPropertyReflection $propertyName */ - reg::packed(738, MAY_BE_NULL, 9362), /* getStaticPropertyReflection return */ - reg::packed(9901, 0, 1454), /* getConstantReflection $typeWithConstant */ - reg::packed(9918, MAY_BE_STRING), /* getConstantReflection $constantName */ - reg::packed(738, MAY_BE_NULL, 9527), /* getConstantReflection return */ - reg::packed(9918, MAY_BE_STRING), /* getConstantExplicitTypeFromConfig $constantName */ - reg::packed(9953, 0, 1454), /* getConstantExplicitTypeFromConfig $constantType */ + reg::packed(9643, 0, 1454), /* getMethodReflection $typeWithMethod */ + reg::packed(9658, MAY_BE_STRING), /* getMethodReflection $methodName */ + reg::packed(738, MAY_BE_NULL, 9690), /* getMethodReflection return */ + reg::packed(9643, 0, 1454), /* getNakedMethod $typeWithMethod */ + reg::packed(9658, MAY_BE_STRING), /* getNakedMethod $methodName */ + reg::packed(738, MAY_BE_NULL, 9690), /* getNakedMethod return */ + reg::packed(9769, 0, 1454), /* getPropertyReflection $typeWithProperty */ + reg::packed(3832, MAY_BE_STRING), /* getPropertyReflection $propertyName */ + reg::packed(738, MAY_BE_NULL, 9327), /* getPropertyReflection return */ + reg::packed(9769, 0, 1454), /* getInstancePropertyReflection $typeWithProperty */ + reg::packed(3832, MAY_BE_STRING), /* getInstancePropertyReflection $propertyName */ + reg::packed(738, MAY_BE_NULL, 9327), /* getInstancePropertyReflection return */ + reg::packed(9769, 0, 1454), /* getStaticPropertyReflection $typeWithProperty */ + reg::packed(3832, MAY_BE_STRING), /* getStaticPropertyReflection $propertyName */ + reg::packed(738, MAY_BE_NULL, 9327), /* getStaticPropertyReflection return */ + reg::packed(9866, 0, 1454), /* getConstantReflection $typeWithConstant */ + reg::packed(9883, MAY_BE_STRING), /* getConstantReflection $constantName */ + reg::packed(738, MAY_BE_NULL, 9492), /* getConstantReflection return */ + reg::packed(9883, MAY_BE_STRING), /* getConstantExplicitTypeFromConfig $constantName */ + reg::packed(9918, 0, 1454), /* getConstantExplicitTypeFromConfig $constantType */ reg::packed(738, 0, 1454), /* getConstantExplicitTypeFromConfig return */ reg::packed(738, MAY_BE_ARRAY), /* getConstantTypes return */ reg::packed(1550, 0, 1555), /* getGlobalConstantType $name */ reg::packed(738, MAY_BE_NULL, 1454), /* getGlobalConstantType return */ reg::packed(1550, 0, 1555), /* createGlobalConstantFetches $name */ - reg::packed(10039, MAY_BE_STRING), /* createGlobalConstantFetches $nameString */ + reg::packed(10004, MAY_BE_STRING), /* createGlobalConstantFetches $nameString */ reg::packed(227, MAY_BE_NULL | MAY_BE_STRING), /* createGlobalConstantFetches $namespace */ reg::packed(738, MAY_BE_ARRAY), /* createGlobalConstantFetches return */ reg::packed(738, MAY_BE_ARRAY), /* getNativeConstantTypes return */ - reg::packed(5421, 0, 1454), /* getIterableKeyType $iteratee */ + reg::packed(5386, 0, 1454), /* getIterableKeyType $iteratee */ reg::packed(738, 0, 1454), /* getIterableKeyType return */ - reg::packed(5421, 0, 1454), /* getIterableValueType $iteratee */ + reg::packed(5386, 0, 1454), /* getIterableValueType $iteratee */ reg::packed(738, 0, 1454), /* getIterableValueType return */ - reg::packed(738, 0, 10141), /* getPhpVersion return */ - reg::packed(738, 0, 10141), /* resolvePhpVersion return */ + reg::packed(738, 0, 10106), /* getPhpVersion return */ + reg::packed(738, 0, 10106), /* resolvePhpVersion return */ reg::packed(738, MAY_BE_NULL, 1454), /* getConfiguredPhpVersionRange return */ - reg::packed(3958, 0, 1454), /* isOverallPhpVersionRange $type */ + reg::packed(3978, 0, 1454), /* isOverallPhpVersionRange $type */ reg::packed(738, MAY_BE_BOOL), /* isOverallPhpVersionRange return */ - reg::packed(1737, 0, 10251), /* invokeNodeCallback $node */ + reg::packed(1737, 0, 10216), /* invokeNodeCallback $node */ reg::packed(738, MAY_BE_VOID), /* invokeNodeCallback return */ - reg::packed(10285, MAY_BE_STRING), /* emitCollectedData $collectorType */ - reg::packed(10299, MAY_BE_ANY), /* emitCollectedData $data */ + reg::packed(10250, MAY_BE_STRING), /* emitCollectedData $collectorType */ + reg::packed(10264, MAY_BE_ANY), /* emitCollectedData $data */ reg::packed(738, MAY_BE_VOID), /* emitCollectedData return */ - reg::packed(10322, MAY_BE_STRING), /* trackValueDependency $extensionClass */ - reg::packed(2604, MAY_BE_STRING), /* trackValueDependency $key */ + reg::packed(10287, MAY_BE_STRING), /* trackValueDependency $extensionClass */ + reg::packed(2624, MAY_BE_STRING), /* trackValueDependency $key */ reg::packed(738, MAY_BE_VOID), /* trackValueDependency return */ - reg::packed(10358, MAY_BE_STRING), /* trackFileDependency $file */ + reg::packed(10323, MAY_BE_STRING), /* trackFileDependency $file */ reg::packed(738, MAY_BE_VOID), /* trackFileDependency return */ - reg::packed(10383, MAY_BE_STRING), /* trackDirectoryDependency $directory */ - reg::packed(10393, MAY_BE_STRING, reg::NoString, false, false, 10401), /* trackDirectoryDependency $pattern */ + reg::packed(10348, MAY_BE_STRING), /* trackDirectoryDependency $directory */ + reg::packed(10358, MAY_BE_STRING, reg::NoString, false, false, 10366), /* trackDirectoryDependency $pattern */ reg::packed(738, MAY_BE_VOID), /* trackDirectoryDependency return */ - reg::packed(3061, MAY_BE_STRING), /* trackClassDependency $className */ + reg::packed(3081, MAY_BE_STRING), /* trackClassDependency $className */ reg::packed(738, MAY_BE_VOID), /* trackClassDependency return */ }; using Sig = reg::Sig; @@ -1290,186 +1290,187 @@ inline constexpr sigtab::Sig findSettledStoredResult = { { 2289 /* findSettledSt inline constexpr sigtab::Sig getCurrentExpressionResultStorage = { { 2313 /* getCurrentExpressionResultStorage */, 0, 107, 0, 107, ZEND_ACC_PUBLIC } }; inline constexpr sigtab::Sig withTemplateArgumentFrame = { { 2353 /* withTemplateArgumentFrame */, 1, 108, 1, 109, ZEND_ACC_PUBLIC } }; inline constexpr sigtab::Sig getCurrentTemplateArgumentFrame = { { 2379 /* getCurrentTemplateArgumentFrame */, 0, 110, 0, 110, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig getTemplateArgumentConstraints = { { 2411 /* getTemplateArgumentConstraints */, 0, 111, 0, 111, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig withTemplateArgumentConstraints = { { 2454 /* withTemplateArgumentConstraints */, 1, 112, 1, 113, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig addTemplateArgumentConstraints = { { 2486 /* addTemplateArgumentConstraints */, 1, 114, 1, 115, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig withoutMemoizedTypes = { { 2517 /* withoutMemoizedTypes */, 0, 116, 0, 116, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig getDifferingVariableRoots = { { 2544 /* getDifferingVariableRoots */, 1, 117, 1, 118, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig getDifferingConditionalGuardRoots = { { 2570 /* getDifferingConditionalGuardRoots */, 1, 119, 1, 120, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig getVariablesOfExpressionKey = { { 2608 /* getVariablesOfExpressionKey */, 1, 121, 1, 122, ZEND_ACC_PRIVATE | ZEND_ACC_STATIC } }; -inline constexpr sigtab::Sig withRecordedStatementDelta = { { 2663 /* withRecordedStatementDelta */, 2, 123, 2, 125, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig applyRecordedHolderDelta = { { 2698 /* applyRecordedHolderDelta */, 3, 126, 3, 129, ZEND_ACC_PRIVATE | ZEND_ACC_STATIC } }; -inline constexpr sigtab::Sig getNativeType = { { 2723 /* getNativeType */, 1, 130, 1, 131, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig getKeepVoidType = { { 2737 /* getKeepVoidType */, 1, 132, 1, 133, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig doNotTreatPhpDocTypesAsCertain = { { 2753 /* doNotTreatPhpDocTypesAsCertain */, 0, 134, 0, 134, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig promoteNativeTypes = { { 2784 /* promoteNativeTypes */, 0, 135, 0, 135, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig resolveName = { { 2803 /* resolveName */, 1, 136, 1, 137, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig resolveTypeByName = { { 2846 /* resolveTypeByName */, 1, 138, 1, 139, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig getTypeFromValue = { { 2870 /* getTypeFromValue */, 1, 140, 1, 141, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig hasExpressionType = { { 2887 /* hasExpressionType */, 1, 142, 1, 143, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig getTrackedExpressionType = { { 2905 /* getTrackedExpressionType */, 1, 144, 1, 145, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig getNarrowedFromType = { { 2930 /* getNarrowedFromType */, 1, 146, 1, 147, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig pushInFunctionCall = { { 3024 /* pushInFunctionCall */, 3, 148, 3, 151, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig popInFunctionCall = { { 3043 /* popInFunctionCall */, 0, 152, 0, 152, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig isInClassExists = { { 3071 /* isInClassExists */, 1, 153, 1, 154, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig getFunctionCallStack = { { 3087 /* getFunctionCallStack */, 0, 155, 0, 155, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig getFunctionCallStackWithParameters = { { 3108 /* getFunctionCallStackWithParameters */, 0, 156, 0, 156, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig isInFunctionExists = { { 3156 /* isInFunctionExists */, 1, 157, 1, 158, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig enterClass = { { 3191 /* enterClass */, 1, 159, 1, 160, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig enterTrait = { { 3218 /* enterTrait */, 1, 161, 1, 162, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig enterClassMethod = { { 3762 /* enterClassMethod */, 9, 163, 21, 184, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig enterPropertyHook = { { 3940 /* enterPropertyHook */, 10, 185, 11, 196, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig transformStaticType = { { 3963 /* transformStaticType */, 1, 197, 1, 198, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig getRealParameterTypes = { { 4024 /* getRealParameterTypes */, 1, 199, 1, 200, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig getRealParameterDefaultValues = { { 4046 /* getRealParameterDefaultValues */, 1, 201, 1, 202, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig getParameterAttributes = { { 4166 /* getParameterAttributes */, 1, 203, 1, 204, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig enterFunction = { { 4292 /* enterFunction */, 8, 205, 17, 222, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig enterFunctionLike = { { 4350 /* enterFunctionLike */, 2, 223, 2, 225, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig enterNamespace = { { 4382 /* enterNamespace */, 1, 226, 1, 227, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig enterClosureBind = { { 4434 /* enterClosureBind */, 3, 228, 3, 231, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig restoreOriginalScopeAfterClosureBind = { { 4465 /* restoreOriginalScopeAfterClosureBind */, 1, 232, 1, 233, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig restoreThis = { { 4519 /* restoreThis */, 1, 234, 1, 235, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig enterClosureCall = { { 4531 /* enterClosureCall */, 2, 236, 2, 238, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig isInClosureBind = { { 4548 /* isInClosureBind */, 0, 239, 0, 239, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig withClosureBindScopeClasses = { { 4564 /* withClosureBindScopeClasses */, 1, 240, 1, 241, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig enterAnonymousFunction = { { 4672 /* enterAnonymousFunction */, 2, 242, 3, 245, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig enterAnonymousFunctionWithoutReflection = { { 4695 /* enterAnonymousFunctionWithoutReflection */, 3, 246, 3, 249, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig isInvokedWhereCreated = { { 4797 /* isInvokedWhereCreated */, 1, 250, 1, 251, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig containsMutablePropertyFetch = { { 4819 /* containsMutablePropertyFetch */, 1, 252, 1, 253, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig invalidateMutablePropertyFetches = { { 4848 /* invalidateMutablePropertyFetches */, 1, 254, 1, 255, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig invalidateMutablePropertyFetchConditionalExpressions = { { 4881 /* invalidateMutablePropertyFetchConditionalExpressions */, 1, 256, 1, 257, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig expressionTypeIsUnchangeable = { { 4983 /* expressionTypeIsUnchangeable */, 1, 258, 1, 259, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig invalidateStaticExpressions = { { 5012 /* invalidateStaticExpressions */, 1, 260, 1, 261, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig enterArrowFunction = { { 5088 /* enterArrowFunction */, 2, 262, 3, 265, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig enterArrowFunctionWithoutReflection = { { 5107 /* enterArrowFunctionWithoutReflection */, 3, 266, 3, 269, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig isParameterValueNullable = { { 5164 /* isParameterValueNullable */, 1, 270, 1, 271, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig getFunctionType = { { 5211 /* getFunctionType */, 3, 272, 3, 275, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig getCallableParameterType = { { 5233 /* getCallableParameterType */, 3, 276, 3, 279, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig buildVariadicArrayTypeFromCallableParameters = { { 5269 /* buildVariadicArrayTypeFromCallableParameters */, 2, 280, 2, 282, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig intersectButNotNever = { { 5338 /* intersectButNotNever */, 2, 283, 2, 285, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC } }; -inline constexpr sigtab::Sig enterMatch = { { 5410 /* enterMatch */, 3, 286, 3, 289, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig enterForeach = { { 5491 /* enterForeach */, 7, 290, 7, 297, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig enterForeachKey = { { 5504 /* enterForeachKey */, 5, 298, 5, 303, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig enterCatchType = { { 5530 /* enterCatchType */, 2, 304, 2, 306, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig enterExpressionAssign = { { 5558 /* enterExpressionAssign */, 1, 307, 2, 309, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig exitExpressionAssign = { { 5580 /* exitExpressionAssign */, 1, 310, 1, 311, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig isInExpressionAssign = { { 5601 /* isInExpressionAssign */, 1, 312, 1, 313, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig isInWriteExpressionAssign = { { 5622 /* isInWriteExpressionAssign */, 1, 314, 1, 315, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig setAllowedUndefinedExpression = { { 5648 /* setAllowedUndefinedExpression */, 1, 316, 1, 317, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig unsetAllowedUndefinedExpression = { { 5678 /* unsetAllowedUndefinedExpression */, 1, 318, 1, 319, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig isUndefinedExpressionAllowed = { { 5710 /* isUndefinedExpressionAllowed */, 1, 320, 1, 321, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig assignVariable = { { 5775 /* assignVariable */, 4, 322, 5, 327, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig overwriteExpression = { { 5790 /* overwriteExpression */, 3, 328, 3, 331, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig resolveIntertwinedAssignedType = { { 5862 /* resolveIntertwinedAssignedType */, 5, 332, 5, 337, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig isDimFetchPathReachable = { { 5936 /* isDimFetchPathReachable */, 2, 338, 2, 340, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig unsetExpression = { { 5960 /* unsetExpression */, 1, 341, 1, 342, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig getStateType = { { 5976 /* getStateType */, 1, 343, 1, 344, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig getScopeStateType = { { 5989 /* getScopeStateType */, 1, 345, 1, 346, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig getScopeStateNativeType = { { 6007 /* getScopeStateNativeType */, 1, 347, 1, 348, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig resolveScopeStateType = { { 6031 /* resolveScopeStateType */, 2, 349, 2, 351, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig specifyExpressionType = { { 6053 /* specifyExpressionType */, 4, 352, 4, 356, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig openSpecificationScope = { { 6075 /* openSpecificationScope */, 0, 357, 0, 357, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig isSpecifyExpressionTypeNoop = { { 6098 /* isSpecifyExpressionTypeNoop */, 2, 358, 2, 360, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig specifyExpressionTypeInPlace = { { 6158 /* specifyExpressionTypeInPlace */, 4, 361, 6, 367, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig assignExpression = { { 6187 /* assignExpression */, 3, 368, 3, 371, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig specifyAssignedExpressionType = { { 6204 /* specifyAssignedExpressionType */, 3, 372, 3, 375, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig assignInitializedProperty = { { 6248 /* assignInitializedProperty */, 2, 376, 2, 378, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig invalidateExpression = { { 6380 /* invalidateExpression */, 1, 379, 5, 384, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig assignObjectAlias = { { 6401 /* assignObjectAlias */, 2, 385, 3, 388, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig assignNarrowedFrom = { { 6419 /* assignNarrowedFrom */, 2, 389, 2, 391, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig holdsSameObject = { { 6448 /* holdsSameObject */, 2, 392, 2, 394, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig specifyObjectAlias = { { 6476 /* specifyObjectAlias */, 3, 395, 3, 398, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig getObjectAliasRootVariableName = { { 6495 /* getObjectAliasRootVariableName */, 1, 399, 1, 400, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig getObjectAliasEdges = { { 6526 /* getObjectAliasEdges */, 0, 401, 0, 401, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig getPropertyFetchChainPrefixes = { { 6558 /* getPropertyFetchChainPrefixes */, 2, 402, 2, 404, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig findObjectAliasClass = { { 6594 /* findObjectAliasClass */, 2, 405, 2, 407, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig findObjectAliasInvalidationTargets = { { 6615 /* findObjectAliasInvalidationTargets */, 3, 408, 3, 411, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig reconnectObjectAliases = { { 6658 /* reconnectObjectAliases */, 2, 412, 2, 414, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig invalidateExpressionWithoutAliases = { { 6681 /* invalidateExpressionWithoutAliases */, 5, 415, 5, 420, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig isPrivatePropertyOfDifferentClass = { { 6716 /* isPrivatePropertyOfDifferentClass */, 2, 421, 2, 423, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig invalidateMethodsOnExpression = { { 6750 /* invalidateMethodsOnExpression */, 1, 424, 1, 425, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig setExpressionCertaintyKeepingType = { { 6780 /* setExpressionCertaintyKeepingType */, 2, 426, 2, 428, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig removeArraysWithoutOffsetValueType = { { 6846 /* removeArraysWithoutOffsetValueType */, 3, 429, 3, 432, ZEND_ACC_PRIVATE | ZEND_ACC_STATIC } }; -inline constexpr sigtab::Sig isComplexUnionType = { { 6881 /* isComplexUnionType */, 1, 433, 1, 434, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig addTypeToExpression = { { 6900 /* addTypeToExpression */, 2, 435, 2, 437, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig removeTypeFromExpression = { { 6933 /* removeTypeFromExpression */, 2, 438, 2, 440, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig filterByTruthyValue = { { 6958 /* filterByTruthyValue */, 1, 441, 1, 442, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig filterByFalseyValue = { { 6978 /* filterByFalseyValue */, 1, 443, 1, 444, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig applySpecifiedTypes = { { 7013 /* applySpecifiedTypes */, 1, 445, 1, 446, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig respecifyRelationalFacts = { { 7052 /* respecifyRelationalFacts */, 1, 447, 1, 448, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig applySpecifiedTypesBatch = { { 7077 /* applySpecifiedTypesBatch */, 1, 449, 1, 450, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig processConditionalExpressionsAfterSpecifying = { { 7123 /* processConditionalExpressionsAfterSpecifying */, 1, 451, 1, 452, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig getConditionalExpressions = { { 7168 /* getConditionalExpressions */, 0, 453, 0, 453, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig addConditionalExpressions = { { 7223 /* addConditionalExpressions */, 2, 454, 2, 456, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig exitFirstLevelStatements = { { 7249 /* exitFirstLevelStatements */, 0, 457, 0, 457, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig isInFirstLevelStatement = { { 7274 /* isInFirstLevelStatement */, 0, 458, 0, 458, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig mergeWith = { { 7353 /* mergeWith */, 1, 459, 3, 462, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig completeOffsetWriteBases = { { 7429 /* completeOffsetWriteBases */, 5, 463, 5, 468, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig completeOffsetWriteBase = { { 7479 /* completeOffsetWriteBase */, 4, 469, 4, 473, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig collectAbsorbedClosures = { { 7515 /* collectAbsorbedClosures */, 2, 474, 2, 476, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig mergeWithVariableState = { { 7539 /* mergeWithVariableState */, 3, 477, 3, 480, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig findMergedCallCandidates = { { 7608 /* findMergedCallCandidates */, 2, 481, 2, 483, ZEND_ACC_PRIVATE | ZEND_ACC_STATIC } }; -inline constexpr sigtab::Sig hasNarrowableArgument = { { 7729 /* hasNarrowableArgument */, 1, 484, 1, 485, ZEND_ACC_PRIVATE | ZEND_ACC_STATIC } }; -inline constexpr sigtab::Sig findUninformativeMergedCalls = { { 7780 /* findUninformativeMergedCalls */, 2, 486, 2, 488, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig withoutPreciseClassConstantFetches = { { 7849 /* withoutPreciseClassConstantFetches */, 3, 489, 3, 492, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig preserveVacuousConditionalExpressions = { { 7964 /* preserveVacuousConditionalExpressions */, 4, 493, 4, 497, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig isAboutCall = { { 8047 /* isAboutCall */, 1, 498, 1, 499, ZEND_ACC_PRIVATE | ZEND_ACC_STATIC } }; -inline constexpr sigtab::Sig mergeSameGuardConditionalExpressions = { { 8113 /* mergeSameGuardConditionalExpressions */, 3, 500, 3, 503, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig mergeConditionalExpressions = { { 8207 /* mergeConditionalExpressions */, 2, 504, 2, 506, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig mergeInitializedProperties = { { 8253 /* mergeInitializedProperties */, 1, 507, 1, 508, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig processFinallyScope = { { 8314 /* processFinallyScope */, 2, 509, 2, 511, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig processFinallyScopeVariableTypeHolders = { { 8412 /* processFinallyScopeVariableTypeHolders */, 3, 512, 3, 515, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig processClosureScope = { { 8484 /* processClosureScope */, 3, 516, 3, 519, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig processAlwaysIterableForeachScopeWithoutPollute = { { 8515 /* processAlwaysIterableForeachScopeWithoutPollute */, 1, 520, 1, 521, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig forgetLoopWrittenVariables = { { 8584 /* forgetLoopWrittenVariables */, 1, 522, 1, 523, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig forgetChangedLoopVariables = { { 8625 /* forgetChangedLoopVariables */, 2, 524, 2, 526, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig getChangedVariableNames = { { 8652 /* getChangedVariableNames */, 1, 527, 1, 528, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig generalizeIteratedType = { { 8689 /* generalizeIteratedType */, 2, 529, 2, 531, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig generalizeWith = { { 8749 /* generalizeWith */, 1, 532, 3, 535, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig generalizeWithVariableState = { { 8764 /* generalizeWithVariableState */, 3, 536, 3, 539, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig withoutWidenedConditionalExpressions = { { 8819 /* withoutWidenedConditionalExpressions */, 3, 540, 3, 543, ZEND_ACC_PRIVATE | ZEND_ACC_STATIC } }; -inline constexpr sigtab::Sig generalizeVariableTypeHolders = { { 8926 /* generalizeVariableTypeHolders */, 4, 544, 4, 548, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig flattenUnionForGeneralization = { { 8956 /* flattenUnionForGeneralization */, 1, 549, 1, 550, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig generalizeType = { { 9006 /* generalizeType */, 3, 551, 4, 555, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig generalizeConstantFloats = { { 9039 /* generalizeConstantFloats */, 4, 556, 4, 560, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig generalizeShapesKeyByKey = { { 9074 /* generalizeShapesKeyByKey */, 5, 561, 5, 566, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig pairShapes = { { 9099 /* pairShapes */, 2, 567, 2, 569, ZEND_ACC_PRIVATE | ZEND_ACC_STATIC } }; -inline constexpr sigtab::Sig getRequiredKeysSignature = { { 9156 /* getRequiredKeysSignature */, 1, 570, 1, 571, ZEND_ACC_PRIVATE | ZEND_ACC_STATIC } }; -inline constexpr sigtab::Sig getArrayDepth = { { 9181 /* getArrayDepth */, 1, 572, 1, 573, ZEND_ACC_PRIVATE | ZEND_ACC_STATIC } }; -inline constexpr sigtab::Sig equals = { { 9195 /* equals */, 1, 574, 1, 575, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig compareConditionalExpressions = { { 9230 /* compareConditionalExpressions */, 2, 576, 2, 578, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig compareVariableTypeHolders = { { 9260 /* compareVariableTypeHolders */, 2, 579, 2, 581, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig canAccessProperty = { { 9344 /* canAccessProperty */, 1, 582, 1, 583, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig canReadProperty = { { 9408 /* canReadProperty */, 1, 584, 1, 585, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig canWriteProperty = { { 9424 /* canWriteProperty */, 1, 586, 1, 587, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig canCallMethod = { { 9494 /* canCallMethod */, 1, 588, 1, 589, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig canAccessConstant = { { 9570 /* canAccessConstant */, 1, 590, 1, 591, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig canAccessClassMember = { { 9651 /* canAccessClassMember */, 1, 592, 1, 593, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig debug = { { 9672 /* debug */, 0, 594, 0, 594, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig filterTypeWithMethod = { { 9704 /* filterTypeWithMethod */, 2, 595, 2, 597, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig getMethodReflection = { { 9769 /* getMethodReflection */, 2, 598, 2, 600, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig getNakedMethod = { { 9789 /* getNakedMethod */, 2, 601, 2, 603, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig getPropertyReflection = { { 9821 /* getPropertyReflection */, 2, 604, 2, 606, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig getInstancePropertyReflection = { { 9843 /* getInstancePropertyReflection */, 2, 607, 2, 609, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig getStaticPropertyReflection = { { 9873 /* getStaticPropertyReflection */, 2, 610, 2, 612, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig getConstantReflection = { { 9931 /* getConstantReflection */, 2, 613, 2, 615, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig getConstantExplicitTypeFromConfig = { { 9966 /* getConstantExplicitTypeFromConfig */, 2, 616, 2, 618, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig getConstantTypes = { { 10000 /* getConstantTypes */, 0, 619, 0, 619, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig getGlobalConstantType = { { 10017 /* getGlobalConstantType */, 1, 620, 1, 621, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig createGlobalConstantFetches = { { 10050 /* createGlobalConstantFetches */, 3, 622, 3, 625, ZEND_ACC_PRIVATE | ZEND_ACC_STATIC } }; -inline constexpr sigtab::Sig getNativeConstantTypes = { { 10078 /* getNativeConstantTypes */, 0, 626, 0, 626, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig getIterableKeyType = { { 10101 /* getIterableKeyType */, 1, 627, 1, 628, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig getIterableValueType = { { 10120 /* getIterableValueType */, 1, 629, 1, 630, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig getPhpVersion = { { 10165 /* getPhpVersion */, 0, 631, 0, 631, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig resolvePhpVersion = { { 10179 /* resolvePhpVersion */, 0, 632, 0, 632, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig getConfiguredPhpVersionRange = { { 10197 /* getConfiguredPhpVersionRange */, 0, 633, 0, 633, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig isOverallPhpVersionRange = { { 10226 /* isOverallPhpVersionRange */, 1, 634, 1, 635, ZEND_ACC_PRIVATE } }; -inline constexpr sigtab::Sig invokeNodeCallback = { { 10266 /* invokeNodeCallback */, 1, 636, 1, 637, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig emitCollectedData = { { 10304 /* emitCollectedData */, 2, 638, 2, 640, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig trackValueDependency = { { 10337 /* trackValueDependency */, 2, 641, 2, 643, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig trackFileDependency = { { 10363 /* trackFileDependency */, 1, 644, 1, 645, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig trackDirectoryDependency = { { 10405 /* trackDirectoryDependency */, 1, 646, 2, 648, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig trackClassDependency = { { 10430 /* trackClassDependency */, 1, 649, 1, 650, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig getCurrentBodyFrame = { { 2411 /* getCurrentBodyFrame */, 0, 111, 0, 111, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig getTemplateArgumentConstraints = { { 2431 /* getTemplateArgumentConstraints */, 0, 112, 0, 112, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig withTemplateArgumentConstraints = { { 2474 /* withTemplateArgumentConstraints */, 1, 113, 1, 114, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig addTemplateArgumentConstraints = { { 2506 /* addTemplateArgumentConstraints */, 1, 115, 1, 116, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig withoutMemoizedTypes = { { 2537 /* withoutMemoizedTypes */, 0, 117, 0, 117, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig getDifferingVariableRoots = { { 2564 /* getDifferingVariableRoots */, 1, 118, 1, 119, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig getDifferingConditionalGuardRoots = { { 2590 /* getDifferingConditionalGuardRoots */, 1, 120, 1, 121, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig getVariablesOfExpressionKey = { { 2628 /* getVariablesOfExpressionKey */, 1, 122, 1, 123, ZEND_ACC_PRIVATE | ZEND_ACC_STATIC } }; +inline constexpr sigtab::Sig withRecordedStatementDelta = { { 2683 /* withRecordedStatementDelta */, 2, 124, 2, 126, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig applyRecordedHolderDelta = { { 2718 /* applyRecordedHolderDelta */, 3, 127, 3, 130, ZEND_ACC_PRIVATE | ZEND_ACC_STATIC } }; +inline constexpr sigtab::Sig getNativeType = { { 2743 /* getNativeType */, 1, 131, 1, 132, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig getKeepVoidType = { { 2757 /* getKeepVoidType */, 1, 133, 1, 134, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig doNotTreatPhpDocTypesAsCertain = { { 2773 /* doNotTreatPhpDocTypesAsCertain */, 0, 135, 0, 135, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig promoteNativeTypes = { { 2804 /* promoteNativeTypes */, 0, 136, 0, 136, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig resolveName = { { 2823 /* resolveName */, 1, 137, 1, 138, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig resolveTypeByName = { { 2866 /* resolveTypeByName */, 1, 139, 1, 140, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig getTypeFromValue = { { 2890 /* getTypeFromValue */, 1, 141, 1, 142, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig hasExpressionType = { { 2907 /* hasExpressionType */, 1, 143, 1, 144, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig getTrackedExpressionType = { { 2925 /* getTrackedExpressionType */, 1, 145, 1, 146, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig getNarrowedFromType = { { 2950 /* getNarrowedFromType */, 1, 147, 1, 148, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig pushInFunctionCall = { { 3044 /* pushInFunctionCall */, 3, 149, 3, 152, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig popInFunctionCall = { { 3063 /* popInFunctionCall */, 0, 153, 0, 153, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig isInClassExists = { { 3091 /* isInClassExists */, 1, 154, 1, 155, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig getFunctionCallStack = { { 3107 /* getFunctionCallStack */, 0, 156, 0, 156, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig getFunctionCallStackWithParameters = { { 3128 /* getFunctionCallStackWithParameters */, 0, 157, 0, 157, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig isInFunctionExists = { { 3176 /* isInFunctionExists */, 1, 158, 1, 159, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig enterClass = { { 3211 /* enterClass */, 1, 160, 1, 161, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig enterTrait = { { 3238 /* enterTrait */, 1, 162, 1, 163, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig enterClassMethod = { { 3782 /* enterClassMethod */, 9, 164, 21, 185, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig enterPropertyHook = { { 3960 /* enterPropertyHook */, 10, 186, 11, 197, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig transformStaticType = { { 3983 /* transformStaticType */, 1, 198, 1, 199, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig getRealParameterTypes = { { 4044 /* getRealParameterTypes */, 1, 200, 1, 201, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig getRealParameterDefaultValues = { { 4066 /* getRealParameterDefaultValues */, 1, 202, 1, 203, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig getParameterAttributes = { { 4186 /* getParameterAttributes */, 1, 204, 1, 205, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig enterFunction = { { 4312 /* enterFunction */, 8, 206, 17, 223, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig enterFunctionLike = { { 4370 /* enterFunctionLike */, 2, 224, 2, 226, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig enterNamespace = { { 4402 /* enterNamespace */, 1, 227, 1, 228, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig enterClosureBind = { { 4454 /* enterClosureBind */, 3, 229, 3, 232, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig restoreOriginalScopeAfterClosureBind = { { 4485 /* restoreOriginalScopeAfterClosureBind */, 1, 233, 1, 234, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig restoreThis = { { 4539 /* restoreThis */, 1, 235, 1, 236, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig enterClosureCall = { { 4551 /* enterClosureCall */, 2, 237, 2, 239, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig isInClosureBind = { { 4568 /* isInClosureBind */, 0, 240, 0, 240, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig withClosureBindScopeClasses = { { 4584 /* withClosureBindScopeClasses */, 1, 241, 1, 242, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig enterAnonymousFunction = { { 4692 /* enterAnonymousFunction */, 2, 243, 3, 246, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig enterAnonymousFunctionWithoutReflection = { { 4715 /* enterAnonymousFunctionWithoutReflection */, 3, 247, 3, 250, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig forgetMutablePropertyFetches = { { 4755 /* forgetMutablePropertyFetches */, 0, 251, 0, 251, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig containsMutablePropertyFetch = { { 4784 /* containsMutablePropertyFetch */, 1, 252, 1, 253, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig invalidateMutablePropertyFetches = { { 4813 /* invalidateMutablePropertyFetches */, 1, 254, 1, 255, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig invalidateMutablePropertyFetchConditionalExpressions = { { 4846 /* invalidateMutablePropertyFetchConditionalExpressions */, 1, 256, 1, 257, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig expressionTypeIsUnchangeable = { { 4948 /* expressionTypeIsUnchangeable */, 1, 258, 1, 259, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig invalidateStaticExpressions = { { 4977 /* invalidateStaticExpressions */, 1, 260, 1, 261, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig enterArrowFunction = { { 5053 /* enterArrowFunction */, 2, 262, 3, 265, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig enterArrowFunctionWithoutReflection = { { 5072 /* enterArrowFunctionWithoutReflection */, 3, 266, 3, 269, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig isParameterValueNullable = { { 5129 /* isParameterValueNullable */, 1, 270, 1, 271, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig getFunctionType = { { 5176 /* getFunctionType */, 3, 272, 3, 275, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig getCallableParameterType = { { 5198 /* getCallableParameterType */, 3, 276, 3, 279, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig buildVariadicArrayTypeFromCallableParameters = { { 5234 /* buildVariadicArrayTypeFromCallableParameters */, 2, 280, 2, 282, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig intersectButNotNever = { { 5303 /* intersectButNotNever */, 2, 283, 2, 285, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC } }; +inline constexpr sigtab::Sig enterMatch = { { 5375 /* enterMatch */, 3, 286, 3, 289, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig enterForeach = { { 5456 /* enterForeach */, 7, 290, 7, 297, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig enterForeachKey = { { 5469 /* enterForeachKey */, 5, 298, 5, 303, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig enterCatchType = { { 5495 /* enterCatchType */, 2, 304, 2, 306, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig enterExpressionAssign = { { 5523 /* enterExpressionAssign */, 1, 307, 2, 309, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig exitExpressionAssign = { { 5545 /* exitExpressionAssign */, 1, 310, 1, 311, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig isInExpressionAssign = { { 5566 /* isInExpressionAssign */, 1, 312, 1, 313, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig isInWriteExpressionAssign = { { 5587 /* isInWriteExpressionAssign */, 1, 314, 1, 315, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig setAllowedUndefinedExpression = { { 5613 /* setAllowedUndefinedExpression */, 1, 316, 1, 317, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig unsetAllowedUndefinedExpression = { { 5643 /* unsetAllowedUndefinedExpression */, 1, 318, 1, 319, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig isUndefinedExpressionAllowed = { { 5675 /* isUndefinedExpressionAllowed */, 1, 320, 1, 321, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig assignVariable = { { 5740 /* assignVariable */, 4, 322, 5, 327, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig overwriteExpression = { { 5755 /* overwriteExpression */, 3, 328, 3, 331, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig resolveIntertwinedAssignedType = { { 5827 /* resolveIntertwinedAssignedType */, 5, 332, 5, 337, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig isDimFetchPathReachable = { { 5901 /* isDimFetchPathReachable */, 2, 338, 2, 340, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig unsetExpression = { { 5925 /* unsetExpression */, 1, 341, 1, 342, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig getStateType = { { 5941 /* getStateType */, 1, 343, 1, 344, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig getScopeStateType = { { 5954 /* getScopeStateType */, 1, 345, 1, 346, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig getScopeStateNativeType = { { 5972 /* getScopeStateNativeType */, 1, 347, 1, 348, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig resolveScopeStateType = { { 5996 /* resolveScopeStateType */, 2, 349, 2, 351, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig specifyExpressionType = { { 6018 /* specifyExpressionType */, 4, 352, 4, 356, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig openSpecificationScope = { { 6040 /* openSpecificationScope */, 0, 357, 0, 357, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig isSpecifyExpressionTypeNoop = { { 6063 /* isSpecifyExpressionTypeNoop */, 2, 358, 2, 360, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig specifyExpressionTypeInPlace = { { 6123 /* specifyExpressionTypeInPlace */, 4, 361, 6, 367, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig assignExpression = { { 6152 /* assignExpression */, 3, 368, 3, 371, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig specifyAssignedExpressionType = { { 6169 /* specifyAssignedExpressionType */, 3, 372, 3, 375, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig assignInitializedProperty = { { 6213 /* assignInitializedProperty */, 2, 376, 2, 378, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig invalidateExpression = { { 6345 /* invalidateExpression */, 1, 379, 5, 384, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig assignObjectAlias = { { 6366 /* assignObjectAlias */, 2, 385, 3, 388, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig assignNarrowedFrom = { { 6384 /* assignNarrowedFrom */, 2, 389, 2, 391, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig holdsSameObject = { { 6413 /* holdsSameObject */, 2, 392, 2, 394, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig specifyObjectAlias = { { 6441 /* specifyObjectAlias */, 3, 395, 3, 398, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig getObjectAliasRootVariableName = { { 6460 /* getObjectAliasRootVariableName */, 1, 399, 1, 400, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig getObjectAliasEdges = { { 6491 /* getObjectAliasEdges */, 0, 401, 0, 401, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig getPropertyFetchChainPrefixes = { { 6523 /* getPropertyFetchChainPrefixes */, 2, 402, 2, 404, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig findObjectAliasClass = { { 6559 /* findObjectAliasClass */, 2, 405, 2, 407, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig findObjectAliasInvalidationTargets = { { 6580 /* findObjectAliasInvalidationTargets */, 3, 408, 3, 411, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig reconnectObjectAliases = { { 6623 /* reconnectObjectAliases */, 2, 412, 2, 414, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig invalidateExpressionWithoutAliases = { { 6646 /* invalidateExpressionWithoutAliases */, 5, 415, 5, 420, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig isPrivatePropertyOfDifferentClass = { { 6681 /* isPrivatePropertyOfDifferentClass */, 2, 421, 2, 423, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig invalidateMethodsOnExpression = { { 6715 /* invalidateMethodsOnExpression */, 1, 424, 1, 425, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig setExpressionCertaintyKeepingType = { { 6745 /* setExpressionCertaintyKeepingType */, 2, 426, 2, 428, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig removeArraysWithoutOffsetValueType = { { 6811 /* removeArraysWithoutOffsetValueType */, 3, 429, 3, 432, ZEND_ACC_PRIVATE | ZEND_ACC_STATIC } }; +inline constexpr sigtab::Sig isComplexUnionType = { { 6846 /* isComplexUnionType */, 1, 433, 1, 434, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig addTypeToExpression = { { 6865 /* addTypeToExpression */, 2, 435, 2, 437, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig removeTypeFromExpression = { { 6898 /* removeTypeFromExpression */, 2, 438, 2, 440, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig filterByTruthyValue = { { 6923 /* filterByTruthyValue */, 1, 441, 1, 442, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig filterByFalseyValue = { { 6943 /* filterByFalseyValue */, 1, 443, 1, 444, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig applySpecifiedTypes = { { 6978 /* applySpecifiedTypes */, 1, 445, 1, 446, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig respecifyRelationalFacts = { { 7017 /* respecifyRelationalFacts */, 1, 447, 1, 448, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig applySpecifiedTypesBatch = { { 7042 /* applySpecifiedTypesBatch */, 1, 449, 1, 450, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig processConditionalExpressionsAfterSpecifying = { { 7088 /* processConditionalExpressionsAfterSpecifying */, 1, 451, 1, 452, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig getConditionalExpressions = { { 7133 /* getConditionalExpressions */, 0, 453, 0, 453, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig addConditionalExpressions = { { 7188 /* addConditionalExpressions */, 2, 454, 2, 456, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig exitFirstLevelStatements = { { 7214 /* exitFirstLevelStatements */, 0, 457, 0, 457, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig isInFirstLevelStatement = { { 7239 /* isInFirstLevelStatement */, 0, 458, 0, 458, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig mergeWith = { { 7318 /* mergeWith */, 1, 459, 3, 462, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig completeOffsetWriteBases = { { 7394 /* completeOffsetWriteBases */, 5, 463, 5, 468, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig completeOffsetWriteBase = { { 7444 /* completeOffsetWriteBase */, 4, 469, 4, 473, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig collectAbsorbedClosures = { { 7480 /* collectAbsorbedClosures */, 2, 474, 2, 476, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig mergeWithVariableState = { { 7504 /* mergeWithVariableState */, 3, 477, 3, 480, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig findMergedCallCandidates = { { 7573 /* findMergedCallCandidates */, 2, 481, 2, 483, ZEND_ACC_PRIVATE | ZEND_ACC_STATIC } }; +inline constexpr sigtab::Sig hasNarrowableArgument = { { 7694 /* hasNarrowableArgument */, 1, 484, 1, 485, ZEND_ACC_PRIVATE | ZEND_ACC_STATIC } }; +inline constexpr sigtab::Sig findUninformativeMergedCalls = { { 7745 /* findUninformativeMergedCalls */, 2, 486, 2, 488, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig withoutPreciseClassConstantFetches = { { 7814 /* withoutPreciseClassConstantFetches */, 3, 489, 3, 492, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig preserveVacuousConditionalExpressions = { { 7929 /* preserveVacuousConditionalExpressions */, 4, 493, 4, 497, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig isAboutCall = { { 8012 /* isAboutCall */, 1, 498, 1, 499, ZEND_ACC_PRIVATE | ZEND_ACC_STATIC } }; +inline constexpr sigtab::Sig mergeSameGuardConditionalExpressions = { { 8078 /* mergeSameGuardConditionalExpressions */, 3, 500, 3, 503, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig mergeConditionalExpressions = { { 8172 /* mergeConditionalExpressions */, 2, 504, 2, 506, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig mergeInitializedProperties = { { 8218 /* mergeInitializedProperties */, 1, 507, 1, 508, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig processFinallyScope = { { 8279 /* processFinallyScope */, 2, 509, 2, 511, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig processFinallyScopeVariableTypeHolders = { { 8377 /* processFinallyScopeVariableTypeHolders */, 3, 512, 3, 515, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig processClosureScope = { { 8449 /* processClosureScope */, 3, 516, 3, 519, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig processAlwaysIterableForeachScopeWithoutPollute = { { 8480 /* processAlwaysIterableForeachScopeWithoutPollute */, 1, 520, 1, 521, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig forgetLoopWrittenVariables = { { 8549 /* forgetLoopWrittenVariables */, 1, 522, 1, 523, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig forgetChangedLoopVariables = { { 8590 /* forgetChangedLoopVariables */, 2, 524, 2, 526, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig getChangedVariableNames = { { 8617 /* getChangedVariableNames */, 1, 527, 1, 528, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig generalizeIteratedType = { { 8654 /* generalizeIteratedType */, 2, 529, 2, 531, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig generalizeWith = { { 8714 /* generalizeWith */, 1, 532, 3, 535, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig generalizeWithVariableState = { { 8729 /* generalizeWithVariableState */, 3, 536, 3, 539, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig withoutWidenedConditionalExpressions = { { 8784 /* withoutWidenedConditionalExpressions */, 3, 540, 3, 543, ZEND_ACC_PRIVATE | ZEND_ACC_STATIC } }; +inline constexpr sigtab::Sig generalizeVariableTypeHolders = { { 8891 /* generalizeVariableTypeHolders */, 4, 544, 4, 548, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig flattenUnionForGeneralization = { { 8921 /* flattenUnionForGeneralization */, 1, 549, 1, 550, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig generalizeType = { { 8971 /* generalizeType */, 3, 551, 4, 555, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig generalizeConstantFloats = { { 9004 /* generalizeConstantFloats */, 4, 556, 4, 560, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig generalizeShapesKeyByKey = { { 9039 /* generalizeShapesKeyByKey */, 5, 561, 5, 566, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig pairShapes = { { 9064 /* pairShapes */, 2, 567, 2, 569, ZEND_ACC_PRIVATE | ZEND_ACC_STATIC } }; +inline constexpr sigtab::Sig getRequiredKeysSignature = { { 9121 /* getRequiredKeysSignature */, 1, 570, 1, 571, ZEND_ACC_PRIVATE | ZEND_ACC_STATIC } }; +inline constexpr sigtab::Sig getArrayDepth = { { 9146 /* getArrayDepth */, 1, 572, 1, 573, ZEND_ACC_PRIVATE | ZEND_ACC_STATIC } }; +inline constexpr sigtab::Sig equals = { { 9160 /* equals */, 1, 574, 1, 575, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig compareConditionalExpressions = { { 9195 /* compareConditionalExpressions */, 2, 576, 2, 578, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig compareVariableTypeHolders = { { 9225 /* compareVariableTypeHolders */, 2, 579, 2, 581, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig canAccessProperty = { { 9309 /* canAccessProperty */, 1, 582, 1, 583, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig canReadProperty = { { 9373 /* canReadProperty */, 1, 584, 1, 585, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig canWriteProperty = { { 9389 /* canWriteProperty */, 1, 586, 1, 587, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig canCallMethod = { { 9459 /* canCallMethod */, 1, 588, 1, 589, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig canAccessConstant = { { 9535 /* canAccessConstant */, 1, 590, 1, 591, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig canAccessClassMember = { { 9616 /* canAccessClassMember */, 1, 592, 1, 593, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig debug = { { 9637 /* debug */, 0, 594, 0, 594, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig filterTypeWithMethod = { { 9669 /* filterTypeWithMethod */, 2, 595, 2, 597, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig getMethodReflection = { { 9734 /* getMethodReflection */, 2, 598, 2, 600, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig getNakedMethod = { { 9754 /* getNakedMethod */, 2, 601, 2, 603, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig getPropertyReflection = { { 9786 /* getPropertyReflection */, 2, 604, 2, 606, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig getInstancePropertyReflection = { { 9808 /* getInstancePropertyReflection */, 2, 607, 2, 609, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig getStaticPropertyReflection = { { 9838 /* getStaticPropertyReflection */, 2, 610, 2, 612, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig getConstantReflection = { { 9896 /* getConstantReflection */, 2, 613, 2, 615, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig getConstantExplicitTypeFromConfig = { { 9931 /* getConstantExplicitTypeFromConfig */, 2, 616, 2, 618, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig getConstantTypes = { { 9965 /* getConstantTypes */, 0, 619, 0, 619, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig getGlobalConstantType = { { 9982 /* getGlobalConstantType */, 1, 620, 1, 621, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig createGlobalConstantFetches = { { 10015 /* createGlobalConstantFetches */, 3, 622, 3, 625, ZEND_ACC_PRIVATE | ZEND_ACC_STATIC } }; +inline constexpr sigtab::Sig getNativeConstantTypes = { { 10043 /* getNativeConstantTypes */, 0, 626, 0, 626, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig getIterableKeyType = { { 10066 /* getIterableKeyType */, 1, 627, 1, 628, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig getIterableValueType = { { 10085 /* getIterableValueType */, 1, 629, 1, 630, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig getPhpVersion = { { 10130 /* getPhpVersion */, 0, 631, 0, 631, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig resolvePhpVersion = { { 10144 /* resolvePhpVersion */, 0, 632, 0, 632, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig getConfiguredPhpVersionRange = { { 10162 /* getConfiguredPhpVersionRange */, 0, 633, 0, 633, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig isOverallPhpVersionRange = { { 10191 /* isOverallPhpVersionRange */, 1, 634, 1, 635, ZEND_ACC_PRIVATE } }; +inline constexpr sigtab::Sig invokeNodeCallback = { { 10231 /* invokeNodeCallback */, 1, 636, 1, 637, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig emitCollectedData = { { 10269 /* emitCollectedData */, 2, 638, 2, 640, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig trackValueDependency = { { 10302 /* trackValueDependency */, 2, 641, 2, 643, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig trackFileDependency = { { 10328 /* trackFileDependency */, 1, 644, 1, 645, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig trackDirectoryDependency = { { 10370 /* trackDirectoryDependency */, 1, 646, 2, 648, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig trackClassDependency = { { 10395 /* trackClassDependency */, 1, 649, 1, 650, ZEND_ACC_PUBLIC } }; } // namespace sig } // namespace ptdecl::MutatingScope diff --git a/turbo-ext/src/generated/TemplateArgumentFrame.h b/turbo-ext/src/generated/TemplateArgumentFrame.h index 36c4b178245..8133d91f2b1 100644 --- a/turbo-ext/src/generated/TemplateArgumentFrame.h +++ b/turbo-ext/src/generated/TemplateArgumentFrame.h @@ -20,6 +20,7 @@ inline constexpr uint32_t observingClosures = 6; inline constexpr uint32_t byRefSites = 7; inline constexpr uint32_t staticVariableTypes = 8; inline constexpr uint32_t staticVariableConditionalExpressions = 9; +inline constexpr uint32_t resolvesTemplateArguments = 10; } // namespace slot inline void declareClass(reg::Class &cls) @@ -40,6 +41,7 @@ inline void declareProperties(reg::Class &cls) cls.property("byRefSites", ZEND_ACC_PRIVATE | ZEND_ACC_READONLY, reg::PropertyKind::Typed, MAY_BE_ARRAY); cls.property("staticVariableTypes", ZEND_ACC_PRIVATE | ZEND_ACC_READONLY, reg::PropertyKind::Typed, MAY_BE_ARRAY); cls.property("staticVariableConditionalExpressions", ZEND_ACC_PRIVATE | ZEND_ACC_READONLY, reg::PropertyKind::Typed, MAY_BE_ARRAY); + cls.property("resolvesTemplateArguments", ZEND_ACC_PRIVATE | ZEND_ACC_READONLY, reg::PropertyKind::Typed, MAY_BE_BOOL); } /* the string and parameter tables the signatures below index into (see reg::Sig) */ @@ -70,39 +72,41 @@ inline constexpr char strings[] = "byRefSites\0" /* 359 */ "staticVariableTypes\0" /* 370 */ "staticVariableConditionalExpressions\0" /* 390 */ - "__construct\0" /* 427 */ - "var\0" /* 439 */ - "PhpParser\\Node\\Expr\\Variable\0" /* 443 */ - "getStaticVariableTypes\0" /* 472 */ - "stmt\0" /* 495 */ - "PhpParser\\Node\\Stmt\\Static_\0" /* 500 */ - "getStaticVariableConditionalExpressions\0" /* 528 */ - "statementIndexes\0" /* 568 */ - "conditionalExpressions\0" /* 585 */ - "withStaticVariableTypes\0" /* 608 */ - "getByRefSiteMode\0" /* 632 */ - "getLocalByRefSites\0" /* 649 */ - "closureResolutions\0" /* 668 */ - "closureSiteStatementIndexes\0" /* 687 */ - "withObservedClosures\0" /* 715 */ - "isSettledClosureSite\0" /* 736 */ - "getParent\0" /* 757 */ - "getClosureSignatureBody\0" /* 767 */ - "getClosureSignatureStmts\0" /* 791 */ - "isObserving\0" /* 816 */ - "isObservingClosures\0" /* 828 */ - "firstSiteStatementIndex\0" /* 848 */ - "statementIndex\0" /* 872 */ - "ownsSiteInStatement\0" /* 887 */ - "hasSiteAtOrAfter\0" /* 907 */ - "template\0" /* 924 */ - "PHPStan\\Type\\Generic\\TemplateType\0" /* 933 */ - "resolveOrUnconstrained\0" /* 967 */ - "resolve\0" /* 990 */ - "resolveUnconstrained\0" /* 998 */ - "templateName\0" /* 1019 */ - "getResolutionCacheKeySuffix\0" /* 1032 */ - "key"; /* 1060 */ + "resolvesTemplateArguments\0" /* 427 */ + "true\0" /* 453 */ + "__construct\0" /* 458 */ + "var\0" /* 470 */ + "PhpParser\\Node\\Expr\\Variable\0" /* 474 */ + "getStaticVariableTypes\0" /* 503 */ + "stmt\0" /* 526 */ + "PhpParser\\Node\\Stmt\\Static_\0" /* 531 */ + "getStaticVariableConditionalExpressions\0" /* 559 */ + "statementIndexes\0" /* 599 */ + "conditionalExpressions\0" /* 616 */ + "withStaticVariableTypes\0" /* 639 */ + "getByRefSiteMode\0" /* 663 */ + "getLocalByRefSites\0" /* 680 */ + "closureResolutions\0" /* 699 */ + "closureSiteStatementIndexes\0" /* 718 */ + "withObservedClosures\0" /* 746 */ + "isSettledClosureSite\0" /* 767 */ + "getParent\0" /* 788 */ + "getClosureSignatureBody\0" /* 798 */ + "getClosureSignatureStmts\0" /* 822 */ + "isObserving\0" /* 847 */ + "isObservingClosures\0" /* 859 */ + "firstSiteStatementIndex\0" /* 879 */ + "statementIndex\0" /* 903 */ + "ownsSiteInStatement\0" /* 918 */ + "hasSiteAtOrAfter\0" /* 938 */ + "template\0" /* 955 */ + "PHPStan\\Type\\Generic\\TemplateType\0" /* 964 */ + "resolveOrUnconstrained\0" /* 998 */ + "resolve\0" /* 1021 */ + "resolveUnconstrained\0" /* 1029 */ + "templateName\0" /* 1050 */ + "getResolutionCacheKeySuffix\0" /* 1063 */ + "key"; /* 1091 */ inline constexpr reg::PackedArg args[] = { reg::packed(0, 0, 9), /* returnTypeOfCall $acceptor */ reg::packed(47, 0, 53), /* returnTypeOfCall $scope */ @@ -119,19 +123,21 @@ inline constexpr reg::PackedArg args[] = { reg::packed(359, MAY_BE_ARRAY, reg::NoString, false, false, 254), /* __construct $byRefSites */ reg::packed(370, MAY_BE_ARRAY, reg::NoString, false, false, 254), /* __construct $staticVariableTypes */ reg::packed(390, MAY_BE_ARRAY, reg::NoString, false, false, 254), /* __construct $staticVariableConditionalExpressions */ - reg::packed(439, 0, 443), /* getStaticVariableTypes $var */ + reg::packed(427, MAY_BE_BOOL, reg::NoString, false, false, 453), /* __construct $resolvesTemplateArguments */ + reg::packed(130, MAY_BE_BOOL), /* resolvesTemplateArguments return */ + reg::packed(470, 0, 474), /* getStaticVariableTypes $var */ reg::packed(130, MAY_BE_NULL | MAY_BE_ARRAY), /* getStaticVariableTypes return */ - reg::packed(495, 0, 500), /* getStaticVariableConditionalExpressions $stmt */ + reg::packed(526, 0, 531), /* getStaticVariableConditionalExpressions $stmt */ reg::packed(130, MAY_BE_ARRAY), /* getStaticVariableConditionalExpressions return */ reg::packed(370, MAY_BE_ARRAY), /* withStaticVariableTypes $staticVariableTypes */ - reg::packed(568, MAY_BE_ARRAY), /* withStaticVariableTypes $statementIndexes */ - reg::packed(585, MAY_BE_ARRAY, reg::NoString, false, false, 254), /* withStaticVariableTypes $conditionalExpressions */ + reg::packed(599, MAY_BE_ARRAY), /* withStaticVariableTypes $statementIndexes */ + reg::packed(616, MAY_BE_ARRAY, reg::NoString, false, false, 254), /* withStaticVariableTypes $conditionalExpressions */ reg::packed(130, 0, 173), /* withStaticVariableTypes return */ reg::packed(84, 0, 89), /* getByRefSiteMode $site */ reg::packed(130, MAY_BE_NULL | MAY_BE_STRING), /* getByRefSiteMode return */ reg::packed(130, MAY_BE_ARRAY), /* getLocalByRefSites return */ - reg::packed(668, MAY_BE_ARRAY), /* withObservedClosures $closureResolutions */ - reg::packed(687, MAY_BE_ARRAY), /* withObservedClosures $closureSiteStatementIndexes */ + reg::packed(699, MAY_BE_ARRAY), /* withObservedClosures $closureResolutions */ + reg::packed(718, MAY_BE_ARRAY), /* withObservedClosures $closureSiteStatementIndexes */ reg::packed(315, MAY_BE_ARRAY), /* withObservedClosures $settledClosureSites */ reg::packed(359, MAY_BE_ARRAY, reg::NoString, false, false, 254), /* withObservedClosures $byRefSites */ reg::packed(130, 0, 173), /* withObservedClosures return */ @@ -143,23 +149,23 @@ inline constexpr reg::PackedArg args[] = { reg::packed(130, MAY_BE_BOOL), /* isObserving return */ reg::packed(130, MAY_BE_BOOL), /* isObservingClosures return */ reg::packed(130, MAY_BE_NULL | MAY_BE_LONG), /* firstSiteStatementIndex return */ - reg::packed(872, MAY_BE_LONG), /* ownsSiteInStatement $statementIndex */ + reg::packed(903, MAY_BE_LONG), /* ownsSiteInStatement $statementIndex */ reg::packed(130, MAY_BE_BOOL), /* ownsSiteInStatement return */ - reg::packed(872, MAY_BE_LONG), /* hasSiteAtOrAfter $statementIndex */ + reg::packed(903, MAY_BE_LONG), /* hasSiteAtOrAfter $statementIndex */ reg::packed(130, MAY_BE_BOOL), /* hasSiteAtOrAfter return */ reg::packed(84, 0, 89), /* resolveOrUnconstrained $site */ - reg::packed(924, 0, 933), /* resolveOrUnconstrained $template */ + reg::packed(955, 0, 964), /* resolveOrUnconstrained $template */ reg::packed(130, 0, 131), /* resolveOrUnconstrained return */ reg::packed(84, 0, 89), /* resolveUnconstrained $site */ - reg::packed(924, 0, 933), /* resolveUnconstrained $template */ - reg::packed(990, MAY_BE_CALLABLE), /* resolveUnconstrained $resolve */ + reg::packed(955, 0, 964), /* resolveUnconstrained $template */ + reg::packed(1021, MAY_BE_CALLABLE), /* resolveUnconstrained $resolve */ reg::packed(130, 0, 131), /* resolveUnconstrained return */ reg::packed(84, 0, 89), /* resolve $site */ - reg::packed(1019, MAY_BE_STRING), /* resolve $templateName */ + reg::packed(1050, MAY_BE_STRING), /* resolve $templateName */ reg::packed(130, MAY_BE_NULL, 131), /* resolve return */ reg::packed(130, MAY_BE_STRING), /* getResolutionCacheKeySuffix return */ reg::packed(84, 0, 89), /* key $site */ - reg::packed(1019, MAY_BE_STRING), /* key $templateName */ + reg::packed(1050, MAY_BE_STRING), /* key $templateName */ reg::packed(130, MAY_BE_STRING), /* key return */ }; using Sig = reg::Sig; @@ -168,27 +174,28 @@ using Sig = reg::Sig; /* the signatures of the methods the class declares itself (a used trait's are in the trait's header) */ namespace sig { inline constexpr sigtab::Sig returnTypeOfCall = { { 149 /* returnTypeOfCall */, 3, 0, 4, 4, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC } }; -inline constexpr sigtab::Sig __construct = { { 427 /* __construct */, 1, 5, 10, reg::NoArg, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig getStaticVariableTypes = { { 472 /* getStaticVariableTypes */, 1, 15, 1, 16, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig getStaticVariableConditionalExpressions = { { 528 /* getStaticVariableConditionalExpressions */, 1, 17, 1, 18, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig withStaticVariableTypes = { { 608 /* withStaticVariableTypes */, 2, 19, 3, 22, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig getByRefSiteMode = { { 632 /* getByRefSiteMode */, 1, 23, 1, 24, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig getLocalByRefSites = { { 649 /* getLocalByRefSites */, 0, 25, 0, 25, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig withObservedClosures = { { 715 /* withObservedClosures */, 3, 26, 4, 30, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig isSettledClosureSite = { { 736 /* isSettledClosureSite */, 1, 31, 1, 32, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig getParent = { { 757 /* getParent */, 0, 33, 0, 33, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig getClosureSignatureBody = { { 767 /* getClosureSignatureBody */, 0, 34, 0, 34, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig getClosureSignatureStmts = { { 791 /* getClosureSignatureStmts */, 0, 35, 0, 35, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig isObserving = { { 816 /* isObserving */, 0, 36, 0, 36, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig isObservingClosures = { { 828 /* isObservingClosures */, 0, 37, 0, 37, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig firstSiteStatementIndex = { { 848 /* firstSiteStatementIndex */, 0, 38, 0, 38, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig ownsSiteInStatement = { { 887 /* ownsSiteInStatement */, 1, 39, 1, 40, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig hasSiteAtOrAfter = { { 907 /* hasSiteAtOrAfter */, 1, 41, 1, 42, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig resolveOrUnconstrained = { { 967 /* resolveOrUnconstrained */, 2, 43, 2, 45, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig resolveUnconstrained = { { 998 /* resolveUnconstrained */, 3, 46, 3, 49, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC } }; -inline constexpr sigtab::Sig resolve = { { 990 /* resolve */, 2, 50, 2, 52, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig getResolutionCacheKeySuffix = { { 1032 /* getResolutionCacheKeySuffix */, 0, 53, 0, 53, ZEND_ACC_PUBLIC } }; -inline constexpr sigtab::Sig key = { { 1060 /* key */, 2, 54, 2, 56, ZEND_ACC_PRIVATE | ZEND_ACC_STATIC } }; +inline constexpr sigtab::Sig __construct = { { 458 /* __construct */, 1, 5, 11, reg::NoArg, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig resolvesTemplateArguments = { { 427 /* resolvesTemplateArguments */, 0, 16, 0, 16, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig getStaticVariableTypes = { { 503 /* getStaticVariableTypes */, 1, 17, 1, 18, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig getStaticVariableConditionalExpressions = { { 559 /* getStaticVariableConditionalExpressions */, 1, 19, 1, 20, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig withStaticVariableTypes = { { 639 /* withStaticVariableTypes */, 2, 21, 3, 24, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig getByRefSiteMode = { { 663 /* getByRefSiteMode */, 1, 25, 1, 26, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig getLocalByRefSites = { { 680 /* getLocalByRefSites */, 0, 27, 0, 27, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig withObservedClosures = { { 746 /* withObservedClosures */, 3, 28, 4, 32, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig isSettledClosureSite = { { 767 /* isSettledClosureSite */, 1, 33, 1, 34, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig getParent = { { 788 /* getParent */, 0, 35, 0, 35, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig getClosureSignatureBody = { { 798 /* getClosureSignatureBody */, 0, 36, 0, 36, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig getClosureSignatureStmts = { { 822 /* getClosureSignatureStmts */, 0, 37, 0, 37, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig isObserving = { { 847 /* isObserving */, 0, 38, 0, 38, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig isObservingClosures = { { 859 /* isObservingClosures */, 0, 39, 0, 39, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig firstSiteStatementIndex = { { 879 /* firstSiteStatementIndex */, 0, 40, 0, 40, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig ownsSiteInStatement = { { 918 /* ownsSiteInStatement */, 1, 41, 1, 42, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig hasSiteAtOrAfter = { { 938 /* hasSiteAtOrAfter */, 1, 43, 1, 44, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig resolveOrUnconstrained = { { 998 /* resolveOrUnconstrained */, 2, 45, 2, 47, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig resolveUnconstrained = { { 1029 /* resolveUnconstrained */, 3, 48, 3, 51, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC } }; +inline constexpr sigtab::Sig resolve = { { 1021 /* resolve */, 2, 52, 2, 54, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig getResolutionCacheKeySuffix = { { 1063 /* getResolutionCacheKeySuffix */, 0, 55, 0, 55, ZEND_ACC_PUBLIC } }; +inline constexpr sigtab::Sig key = { { 1091 /* key */, 2, 56, 2, 58, ZEND_ACC_PRIVATE | ZEND_ACC_STATIC } }; } // namespace sig } // namespace ptdecl::TemplateArgumentFrame diff --git a/turbo-ext/src/support.h b/turbo-ext/src/support.h index 5da61dddb93..cdc9d6356fe 100644 --- a/turbo-ext/src/support.h +++ b/turbo-ext/src/support.h @@ -2193,7 +2193,9 @@ zv::Val pt_template_argument_frame_return_type_of_call(zval *acceptor, zval *sco /* new TemplateArgumentFrame($parent, $resolutions, $siteStatementIndexes) * ($parent / $resolutions NULL or IS_NULL for null, $siteStatementIndexes * NULL for []) */ -zv::Val pt_template_argument_frame_new(zval *parent, zval *resolutions = NULL, zval *siteStatementIndexes = NULL, zval *closureSignatureBody = NULL, zval *closureSignatureStmts = NULL, zval *settledClosureSites = NULL, bool observingClosures = false, zval *byRefSites = NULL); +zv::Val pt_template_argument_frame_new(zval *parent, zval *resolutions = NULL, zval *siteStatementIndexes = NULL, zval *closureSignatureBody = NULL, zval *closureSignatureStmts = NULL, zval *settledClosureSites = NULL, bool observingClosures = false, zval *byRefSites = NULL, bool resolvesTemplateArguments = true); +/* $frame->resolvesTemplateArguments(); false = pending exception */ +[[nodiscard]] bool pt_template_argument_frame_resolves_template_arguments(zval *frame, bool &out); /* $frame->withObservedClosures($closureResolutions, $closureSiteStatementIndexes, $settledClosureSites); UNDEF = pending exception */ zv::Val pt_template_argument_frame_with_observed_closures(zval *frame, zval *closureResolutions, zval *closureSiteStatementIndexes, zval *settledClosureSites, zval *byRefSites = NULL); /* TemplateArgumentFrame::getByRefSiteMode(): 'local' / 'escaped' / PHP null; UNDEF = pending exception */ @@ -2234,6 +2236,9 @@ zv::Val pt_template_argument_frame_resolution_cache_key_suffix(zval *frame); /* MutatingScope.cpp — $scope->getCurrentTemplateArgumentFrame() / the * $scope->nativeTypesPromoted property */ zv::Val pt_mutating_scope_get_current_template_argument_frame(zend_object *scope); +/* $scope->getCurrentBodyFrame() / ->forgetMutablePropertyFetches() */ +zv::Val pt_mutating_scope_get_current_body_frame(zend_object *scope); +zv::Val pt_mutating_scope_forget_mutable_property_fetches(zend_object *scope); [[nodiscard]] bool pt_mutating_scope_native_types_promoted(zend_object *scope, bool &out); extern zend_class_entry *pt_ce_assign_target_walk_mode; @@ -3433,14 +3438,18 @@ zv::Val pt_closure_type_get_by_ref_use_types(zval *closureType); /* $closureType->hasUnresolvedTemplateArgumentType(); false = pending * exception */ [[nodiscard]] bool pt_closure_type_has_unresolved_template_argument(zval *closureType, bool &out); -/* $closureTypeResolver->getClosureType($scope, $expr, $shallow, $storage, $passedToType) / - * ->buildClosureTypeForClosure(...) / ->buildClosureTypeForArrowFunction(...) +/* $closureTypeResolver->getShallowClosureType($scope, $expr, $storage, $passedToType) / + * ->findCachedClosureType(...) (null or the type) / ->getWalkPassedToTypes(...) + * ([phpdoc, native]); NULL / null for null, NULL for [] */ +zv::Val pt_closure_type_resolver_get_shallow_closure_type(zval *resolver, zval *scope, zval *expr, zval *storage, zval *passedToType = NULL); +zv::Val pt_closure_type_resolver_find_cached_closure_type(zval *resolver, zval *scope, zval *expr, zval *storage, zval *passedToType, zval *nativePassedToType, zval *byRefUseTypes, zend_string *templateSuffix); +zv::Val pt_closure_type_resolver_get_walk_passed_to_types(zval *resolver, zval *scope, zval *passedToType, zend_string *templateSuffix); +/* ->buildClosureTypeForClosure(...) / ->buildClosureTypeForArrowFunction(...) * / ->getDeclaredClosureType($scope, $expr) — the native bodies for the * shadowing class, the methods otherwise (the nullable ones NULL or IS_NULL * for null, everything borrowed); UNDEF = pending exception */ -zv::Val pt_closure_type_resolver_get_closure_type(zval *resolver, zval *scope, zval *expr, bool shallow, zval *storage, zval *passedToType = NULL, zval *byRefUseTypes = NULL); -zv::Val pt_closure_type_resolver_build_closure_type_for_closure(zval *resolver, zval *scope, zval *expr, zval *returnStatements, zval *yieldStatements, zval *executionEnds, zval *throwPoints, zval *impurePoints, zval *invalidateExpressions, bool native = false, zval *storage = NULL, zval *passedToType = NULL, zval *nativePassedToType = NULL); -zv::Val pt_closure_type_resolver_build_closure_type_for_arrow_function(zval *resolver, zval *scope, zval *expr, zval *arrowScope, zval *throwPoints, zval *impurePoints, zval *invalidateExpressions, bool native = false, zval *storage = NULL, zval *passedToType = NULL, zval *nativePassedToType = NULL); +zv::Val pt_closure_type_resolver_build_closure_type_for_closure(zval *resolver, zval *scope, zval *expr, zval *returnStatements, zval *yieldStatements, zval *executionEnds, zval *throwPoints, zval *impurePoints, zval *invalidateExpressions, bool native = false, zval *storage = NULL, zval *passedToType = NULL, zval *nativePassedToType = NULL, zval *byRefUseTypes = NULL); +zv::Val pt_closure_type_resolver_build_closure_type_for_arrow_function(zval *resolver, zval *scope, zval *expr, zval *arrowScope, zval *throwPoints, zval *impurePoints, zval *invalidateExpressions, bool native = false, zval *storage = NULL, zval *passedToType = NULL, zval *nativePassedToType = NULL, zval *byRefUseTypes = NULL); zv::Val pt_closure_type_resolver_get_declared_closure_type(zval *resolver, zval *scope, zval *expr); /* MutatingScope.cpp — the scope calls of the closure ports: * ->getFunctionType($type, $isNullable, $isVariadic) / @@ -3488,6 +3497,11 @@ zv::Val pt_process_arrow_function_result_new(zval *expressionResult, zval *arrow * the native bodies for the shadowing class, the methods otherwise (the * nullable ones NULL or IS_NULL for null, everything borrowed); UNDEF = * pending exception */ +/* $closureProcessor->getClosureType($scope, $expr, $storage, $passedToType, + * $byRefUseTypes) (NULL / null for null, NULL for []) / + * ClosureProcessor::markCallbackArgument($expr, $invokedDuringCall) */ +zv::Val pt_closure_processor_get_closure_type(zval *processor, zval *scope, zval *expr, zval *storage, zval *passedToType = NULL, zval *byRefUseTypes = NULL); +void pt_closure_processor_mark_callback_argument(zval *expr, bool invokedDuringCall); zv::Val pt_closure_processor_process_closure_node(zval *processor, zval *nodeScopeResolver, zval *stmt, zval *expr, zval *scope, zval *storage, zval *nodeCallback, zval *context, zval *passedToType, zval *nativePassedToType = NULL); zv::Val pt_closure_processor_process_arrow_function_node(zval *processor, zval *nodeScopeResolver, zval *stmt, zval *expr, zval *scope, zval *storage, zval *nodeCallback, zval *passedToType, zval *nativePassedToType = NULL, zval *context = NULL); zv::Val pt_closure_processor_process_immediately_called_callable(zval *processor, zval *scope, zval *invalidatedExpressions, zval *uses); diff --git a/turbo-ext/tests/parser-visitors.php b/turbo-ext/tests/parser-visitors.php index 442b5effdc8..3e2796fab25 100644 --- a/turbo-ext/tests/parser-visitors.php +++ b/turbo-ext/tests/parser-visitors.php @@ -27,7 +27,6 @@ 'ArrayOffsetNormalizingVisitor', 'ArrayWalkArgVisitor', 'ArrowFunctionArgVisitor', - 'CallbackArgVisitor', 'ClosureArgVisitor', 'ClosureBindArgVisitor', 'ClosureBindToVarVisitor', @@ -73,13 +72,6 @@ array_filter($a, ?); array_find(?, $cb); array_map($cb, ?); array_map(?, $a, ...); array_map($cb, $a, ...);', ' $x)(?, 2); $c->bindTo(?); Closure::bind($c, ?);', - // closures and arrow functions written as arguments of every kind of call, - // and the ones that are not (nested in another expression, partial - // function applications) - ' 1, $x); $o->m(fn () => 1); $o?->m(function () {}); C::m(fn () => 1); - new C(function () {}); f(cb: fn () => 1); f(...[fn () => 1]); f([fn () => 1]); f($g = fn () => 1); - f(fn () => g(fn () => 1)); f(?, fn () => 1); $o->m(fn () => 1, ...); f(...);', - // closures and arrow functions called where they are written ' $x)(1); (fn () => 1)(); ($f = fn ($x) => $x)(2);', diff --git a/turbo-ext/tests/scope-family.php b/turbo-ext/tests/scope-family.php index c940853ae37..0c5a5df8826 100644 --- a/turbo-ext/tests/scope-family.php +++ b/turbo-ext/tests/scope-family.php @@ -677,8 +677,8 @@ public function exprRef(Node\Expr $expr): mixed ->assignExpression(new \PhpParser\Node\Expr\ConstFetch(new \PhpParser\Node\Name('PHP_VERSION_ID')), new \PHPStan\Type\Constant\ConstantIntegerType($sfVersionId), new \PHPStan\Type\IntegerType()) // $this for isReadonlyPropertyFetch() over the readonly Holder::$name ->assignVariable('this', new \PHPStan\Type\ObjectType(\ScopeFamilyFixture\Holder::class), new \PHPStan\Type\ObjectType(\ScopeFamilyFixture\Holder::class), \PHPStan\TrinaryLogic::createYes()) - // a narrowed readonly and a narrowed mutable property: an arrow function - // that does not run where it is written keeps only the readonly one + // a narrowed readonly and a narrowed mutable property: + // forgetMutablePropertyFetches() keeps only the readonly one ->assignExpression($sfVersionReadonlyFetch = new \PhpParser\Node\Expr\PropertyFetch(new \PhpParser\Node\Expr\Variable('this'), 'name'), new \PHPStan\Type\Constant\ConstantStringType('n'), new \PHPStan\Type\StringType()) ->assignExpression($sfVersionMutableFetch = new \PhpParser\Node\Expr\PropertyFetch(new \PhpParser\Node\Expr\Variable('this'), 'counter'), new \PHPStan\Type\Constant\ConstantIntegerType(1), new \PHPStan\Type\IntegerType()); $sfScopes[spl_object_id($sfVersionScope)] = [$sfVersionScope, [new \PhpParser\Node\Expr\ConstFetch(new \PhpParser\Node\Name('PHP_VERSION_ID')), $sfVersionReadonlyFetch, $sfVersionMutableFetch], null]; @@ -1276,9 +1276,6 @@ public function exprRef(Node\Expr $expr): mixed ]), 'uses' => [], 'stmts' => []]); $sfProbeArrowFunction = new \PhpParser\Node\Expr\ArrowFunction(['params' => $sfProbeClosureParams, 'expr' => new \PhpParser\Node\Expr\Variable('a')]); $sfProbeStaticArrowFunction = new \PhpParser\Node\Expr\ArrowFunction(['static' => true, 'params' => $sfProbeClosureParams, 'expr' => new \PhpParser\Node\Expr\Variable('a')]); -// runs where it is written, so it keeps the narrowed property fetches without -// asking isReadonlyPropertyFetch() (see $sfTracksPhpVersionId) -$sfProbeImmediatelyInvokedArrowFunction = new \PhpParser\Node\Expr\ArrowFunction(['params' => $sfProbeClosureParams, 'expr' => new \PhpParser\Node\Expr\Variable('a')], [\PHPStan\Parser\ImmediatelyInvokedClosureVisitor::ATTRIBUTE_NAME => true]); $sfProbeVariadicArrowFunction = new \PhpParser\Node\Expr\ArrowFunction(['params' => array_merge($sfProbeClosureParams, [ new \PhpParser\Node\Param(new \PhpParser\Node\Expr\Variable('rest'), null, new \PhpParser\Node\Identifier('string'), false, true), ]), 'expr' => new \PhpParser\Node\Expr\Variable('a')]); @@ -1808,7 +1805,7 @@ public function exprRef(Node\Expr $expr): mixed 'enterArrowFunctionWithoutReflection(static)' => static fn () => $scope->enterArrowFunctionWithoutReflection($sfProbeStaticArrowFunction, null, null), 'enterArrowFunctionWithoutReflection(callable params)' => static fn () => $scope->enterArrowFunctionWithoutReflection($sfProbeArrowFunction, [$sfPushParameter], null), 'enterArrowFunctionWithoutReflection(variadic callable params)' => static fn () => $scope->enterArrowFunctionWithoutReflection($sfProbeVariadicArrowFunction, [$sfPushParameter, $sfPushVariadicParameter], null), - 'enterArrowFunctionWithoutReflection(immediately invoked)' => static fn () => $scope->enterArrowFunctionWithoutReflection($sfProbeImmediatelyInvokedArrowFunction, null, null), + 'forgetMutablePropertyFetches' => static fn () => $scope->forgetMutablePropertyFetches(), // the ClosureTypeResolver's MutatingScope parameter is the real // class name: these two cross the prefix type barrier 'enterAnonymousFunction' => static fn () => $scope->enterAnonymousFunction($sfProbeClosure, null), @@ -2240,7 +2237,7 @@ public function exprRef(Node\Expr $expr): mixed foreach ($chainingRuns as $label => $fn) { if ( str_starts_with($label, 'enterAnonymousFunctionWithoutReflection') - || (str_starts_with($label, 'enterArrowFunction') && $label !== 'enterArrowFunctionWithoutReflection(immediately invoked)') + || $label === 'forgetMutablePropertyFetches' || str_starts_with($label, 'invalidateExpression(') ) { unset($chainingRuns[$label]); diff --git a/turbo-ext/tests/smoke.php b/turbo-ext/tests/smoke.php index f3bb89aa9b7..1f76020192c 100644 --- a/turbo-ext/tests/smoke.php +++ b/turbo-ext/tests/smoke.php @@ -641,7 +641,6 @@ public function enterNode(\PhpParser\Node $node) $covered[\PHPStan\Parser\ArrayOffsetNormalizingVisitor::class] = true; $covered[\PHPStan\Parser\ArrayWalkArgVisitor::class] = true; $covered[\PHPStan\Parser\ArrowFunctionArgVisitor::class] = true; -$covered[\PHPStan\Parser\CallbackArgVisitor::class] = true; $covered[\PHPStan\Parser\ClosureArgVisitor::class] = true; $covered[\PHPStan\Parser\ClosureBindArgVisitor::class] = true; $covered[\PHPStan\Parser\ClosureBindToVarVisitor::class] = true; From a3583db9c873105cf047cf0f4c3be0f47f0c949e Mon Sep 17 00:00:00 2001 From: "ondrej@mirtes.cz" Date: Thu, 3 Dec 2026 12:43:49 +0000 Subject: [PATCH 4/4] Add regression test for narrowed properties in an immediately invoked callable Amp-Thread-ID: https://ampcode.com/threads/T-01a22b9a-ea57-769d-966d-00063668bb3b --- tests/PHPStan/Analyser/nsrt/bug-11394.php | 42 +++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 tests/PHPStan/Analyser/nsrt/bug-11394.php diff --git a/tests/PHPStan/Analyser/nsrt/bug-11394.php b/tests/PHPStan/Analyser/nsrt/bug-11394.php new file mode 100644 index 00000000000..6f384c1040f --- /dev/null +++ b/tests/PHPStan/Analyser/nsrt/bug-11394.php @@ -0,0 +1,42 @@ +self) { + assertType('Bug11394\HelloWorld', $this->self); + + $i->callImmediately(function() { + assertType('Bug11394\HelloWorld', $this->self); + }); + + $i->callLater(function() { + assertType('Bug11394\HelloWorld|null', $this->self); + }); + } + } + +} + +class Invoker { + /** + * @param-immediately-invoked-callable $cb + */ + public function callImmediately(callable $cb): void { + $cb(); + } + + /** + * @param-later-invoked-callable $cb + */ + public function callLater(callable $cb): void { + } +}