Skip to content
Merged
Prev Previous commit
Next Next commit
Shadow TypeCombinator natively
The static combinator: union(), intersect(), remove() and the null/falsey
helpers with every private helper of the twin as C++ members, the twin's
$cacheEnabled slot routing through the memo, and TypeCombinatorCache
computing a miss through the native doUnion()/doIntersect()/doRemove()
directly. The typeCombinator class-map key is gone: the 37 native call
sites go through pt_type_combinator_call()/_call_spread() (support.h);
turboExtensionEnabler, templateTypeFactory and templateBenevolentUnionType
keys added. pt_type_result_trinary() now starts its rv slot UNDEF (the
release of an unwritten slot crashed on a PHP-twin result object). The
type-family differential gains 110k combinator observations.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FSCEwuXjDzsNw2wSNsDW6D
  • Loading branch information
ondrejmirtes and claude committed Sep 22, 2026
commit 2c72a51406f3901ccc11da0d65c61434ddba3b71
1 change: 1 addition & 0 deletions src/Turbo/TurboExtensionEnabler.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
* enforced by the phar.yml turbo-version job; the native classes must
* behave exactly like the PHP implementations, hence the gate.
*/
#[ReferencedByTurboExtension(key: 'turboExtensionEnabler')]
final class TurboExtensionEnabler
{

Expand Down
2 changes: 2 additions & 0 deletions src/Type/Generic/TemplateTypeFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace PHPStan\Type\Generic;

use PHPStan\PhpDoc\Tag\TemplateTag;
use PHPStan\Turbo\ReferencedByTurboExtension;
use PHPStan\Type\ArrayType;
use PHPStan\Type\BenevolentUnionType;
use PHPStan\Type\BooleanType;
Expand All @@ -25,6 +26,7 @@
use PHPStan\Type\UnionType;
use function get_class;

#[ReferencedByTurboExtension(key: 'templateTypeFactory')]
final class TemplateTypeFactory
{

Expand Down
4 changes: 2 additions & 2 deletions src/Type/TypeCombinator.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace PHPStan\Type;

use PHPStan\TrinaryLogic;
use PHPStan\Turbo\ReferencedByTurboExtension;
use PHPStan\Turbo\ShadowedByTurboExtension;
use PHPStan\Turbo\TurboExtensionEnabler;
use PHPStan\Type\Accessory\AccessoryArrayListType;
use PHPStan\Type\Accessory\AccessoryDecimalIntegerStringType;
Expand Down Expand Up @@ -52,7 +52,7 @@
/**
* @api
*/
#[ReferencedByTurboExtension(key: 'typeCombinator')]
#[ShadowedByTurboExtension(implementation: __DIR__ . '/../../turbo-ext/src/TypeCombinator.cpp')]
final class TypeCombinator
{

Expand Down
2 changes: 1 addition & 1 deletion turbo-ext/config.w32
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ if (PHP_PHPSTAN_TURBO != "no") {
// directory by splitting on backslashes only — with forward slashes the
// objects compile flat while the link list expects the subpath
EXTENSION("phpstan_turbo",
"src\\main.cpp src\\support.cpp src\\AbsorbedTemplateArgumentType.cpp src\\AcceptsResult.cpp src\\AccessoryArrayListType.cpp src\\AccessoryDecimalIntegerStringType.cpp src\\AccessoryLiteralStringType.cpp src\\AccessoryLowercaseStringType.cpp src\\AccessoryNonEmptyStringType.cpp src\\AccessoryNonFalsyStringType.cpp src\\AccessoryNumericStringType.cpp src\\AccessoryUppercaseStringType.cpp src\\ArenaCache.cpp src\\ArrayType.cpp src\\BenevolentUnionType.cpp src\\BooleanType.cpp src\\CallableType.cpp src\\CircularTypeAliasErrorType.cpp src\\ClassStringType.cpp src\\ClosureType.cpp src\\CombinationsHelper.cpp src\\ConditionalExpressionHolder.cpp src\\ConstantArrayType.cpp src\\ConstantBooleanType.cpp src\\ConstantFloatType.cpp src\\ConstantIntegerType.cpp src\\ConstantStringType.cpp src\\EnumCaseObjectType.cpp src\\ErrorType.cpp src\\ExpressionResultStorage.cpp src\\ExpressionTypeHolder.cpp src\\FiniteTypeSet.cpp src\\FloatType.cpp src\\GenericClassStringType.cpp src\\GenericObjectType.cpp src\\GenericStaticType.cpp src\\HasMethodType.cpp src\\HasOffsetType.cpp src\\HasOffsetValueType.cpp src\\HasPropertyType.cpp src\\IntegerRangeType.cpp src\\IntegerType.cpp src\\IntersectionType.cpp src\\IsSuperTypeOfResult.cpp src\\IterableType.cpp src\\MixedType.cpp src\\NeverType.cpp src\\NodeScanner.cpp src\\NodeTraverser.cpp src\\NonAcceptingNeverType.cpp src\\NonEmptyArrayType.cpp src\\NonexistentParentClassType.cpp src\\NullType.cpp src\\ObjectShapeType.cpp src\\ObjectType.cpp src\\ObjectWithoutClassType.cpp src\\OversizedArrayType.cpp src\\PharForkGuard.cpp src\\PhpFileCleaner.cpp src\\RecursionGuard.cpp src\\ResourceType.cpp src\\ScopeContext.cpp src\\ScopeOps.cpp src\\Shadow.cpp src\\StaticType.cpp src\\StrictMixedType.cpp src\\StringAlwaysAcceptingObjectWithToStringType.cpp src\\StringNeverAcceptingObjectWithToStringType.cpp src\\StringType.cpp src\\SymbolFinderInFiles.cpp src\\ThisType.cpp src\\TrinaryLogic.cpp src\\TrustedTypes.cpp src\\TypeCombinatorCache.cpp src\\TypeTraits.cpp src\\TypeTraverser.cpp src\\TypeUtils.cpp src\\TypehintHelper.cpp src\\UnionType.cpp src\\VerbosityLevel.cpp src\\VoidType.cpp",
"src\\main.cpp src\\support.cpp src\\AbsorbedTemplateArgumentType.cpp src\\AcceptsResult.cpp src\\AccessoryArrayListType.cpp src\\AccessoryDecimalIntegerStringType.cpp src\\AccessoryLiteralStringType.cpp src\\AccessoryLowercaseStringType.cpp src\\AccessoryNonEmptyStringType.cpp src\\AccessoryNonFalsyStringType.cpp src\\AccessoryNumericStringType.cpp src\\AccessoryUppercaseStringType.cpp src\\ArenaCache.cpp src\\ArrayType.cpp src\\BenevolentUnionType.cpp src\\BooleanType.cpp src\\CallableType.cpp src\\CircularTypeAliasErrorType.cpp src\\ClassStringType.cpp src\\ClosureType.cpp src\\CombinationsHelper.cpp src\\ConditionalExpressionHolder.cpp src\\ConstantArrayType.cpp src\\ConstantBooleanType.cpp src\\ConstantFloatType.cpp src\\ConstantIntegerType.cpp src\\ConstantStringType.cpp src\\EnumCaseObjectType.cpp src\\ErrorType.cpp src\\ExpressionResultStorage.cpp src\\ExpressionTypeHolder.cpp src\\FiniteTypeSet.cpp src\\FloatType.cpp src\\GenericClassStringType.cpp src\\GenericObjectType.cpp src\\GenericStaticType.cpp src\\HasMethodType.cpp src\\HasOffsetType.cpp src\\HasOffsetValueType.cpp src\\HasPropertyType.cpp src\\IntegerRangeType.cpp src\\IntegerType.cpp src\\IntersectionType.cpp src\\IsSuperTypeOfResult.cpp src\\IterableType.cpp src\\MixedType.cpp src\\NeverType.cpp src\\NodeScanner.cpp src\\NodeTraverser.cpp src\\NonAcceptingNeverType.cpp src\\NonEmptyArrayType.cpp src\\NonexistentParentClassType.cpp src\\NullType.cpp src\\ObjectShapeType.cpp src\\ObjectType.cpp src\\ObjectWithoutClassType.cpp src\\OversizedArrayType.cpp src\\PharForkGuard.cpp src\\PhpFileCleaner.cpp src\\RecursionGuard.cpp src\\ResourceType.cpp src\\ScopeContext.cpp src\\ScopeOps.cpp src\\Shadow.cpp src\\StaticType.cpp src\\StrictMixedType.cpp src\\StringAlwaysAcceptingObjectWithToStringType.cpp src\\StringNeverAcceptingObjectWithToStringType.cpp src\\StringType.cpp src\\SymbolFinderInFiles.cpp src\\ThisType.cpp src\\TrinaryLogic.cpp src\\TrustedTypes.cpp src\\TypeCombinator.cpp src\\TypeCombinatorCache.cpp src\\TypeTraits.cpp src\\TypeTraverser.cpp src\\TypeUtils.cpp src\\TypehintHelper.cpp src\\UnionType.cpp src\\VerbosityLevel.cpp src\\VoidType.cpp",
true,
flags);
ADD_SOURCES(configure_module_dirname + "/src/parser",
Expand Down
2 changes: 1 addition & 1 deletion turbo-ext/src/AccessoryDecimalIntegerStringType.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ class AccessoryDecimalIntegerStringType
zv::Val boolean = isExact() ? toBoolean() : pt_type_call(self, PT_LC("toboolean"), 0, NULL);
if (UNEXPECTED(boolean.isUndef())) return zv::Val();
zv::Args args{integer.raw(), floating.raw(), self, boolean.raw()};
return pt_type_call_static(PT_CLASS_TYPE_COMBINATOR, PT_LC("union"), 4, args);
return pt_type_combinator_call(PT_LC("union"), 4, args);
}

/* maybe when inverted, no otherwise; -1 = pending exception */
Expand Down
2 changes: 1 addition & 1 deletion turbo-ext/src/AccessoryLiteralStringType.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ class AccessoryLiteralStringType
zv::Val boolean = isExact() ? toBoolean() : pt_type_call(self, PT_LC("toboolean"), 0, NULL);
if (UNEXPECTED(boolean.isUndef())) return zv::Val();
zv::Args args{integer.raw(), floating.raw(), self, boolean.raw()};
return pt_type_call_static(PT_CLASS_TYPE_COMBINATOR, PT_LC("union"), 4, args);
return pt_type_combinator_call(PT_LC("union"), 4, args);
}

/* new StringType() */
Expand Down
2 changes: 1 addition & 1 deletion turbo-ext/src/AccessoryLowercaseStringType.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ class AccessoryLowercaseStringType
zv::Val boolean = isExact() ? toBoolean() : pt_type_call(self, PT_LC("toboolean"), 0, NULL);
if (UNEXPECTED(boolean.isUndef())) return zv::Val();
zv::Args args{integer.raw(), floating.raw(), self, boolean.raw()};
return pt_type_call_static(PT_CLASS_TYPE_COMBINATOR, PT_LC("union"), 4, args);
return pt_type_combinator_call(PT_LC("union"), 4, args);
}

/* new ConstantBooleanType(false) for a string that is not lowercase
Expand Down
2 changes: 1 addition & 1 deletion turbo-ext/src/AccessoryNonEmptyStringType.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ class AccessoryNonEmptyStringType
zv::Val boolean = pt_type_call(self, PT_LC("toboolean"), 0, NULL);
if (UNEXPECTED(boolean.isUndef())) return zv::Val();
zv::Args args{integer.raw(), floating.raw(), self, boolean.raw()};
return pt_type_call_static(PT_CLASS_TYPE_COMBINATOR, PT_LC("union"), 4, args);
return pt_type_combinator_call(PT_LC("union"), 4, args);
}

/* new ConstantBooleanType(false) for null and for a string that is not
Expand Down
4 changes: 2 additions & 2 deletions turbo-ext/src/AccessoryNonFalsyStringType.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ class AccessoryNonFalsyStringType
zv::Val boolean = pt_type_call(self, PT_LC("toboolean"), 0, NULL);
if (UNEXPECTED(boolean.isUndef())) return zv::Val();
zv::Args args{integer.raw(), floating.raw(), self, boolean.raw()};
return pt_type_call_static(PT_CLASS_TYPE_COMBINATOR, PT_LC("union"), 4, args);
return pt_type_combinator_call(PT_LC("union"), 4, args);
}

/* new ConstantBooleanType(false) when null|false|''|array{} covers the
Expand All @@ -179,7 +179,7 @@ class AccessoryNonFalsyStringType
zv::Val emptyArray = pt_constant_array_type_new(&emptyArrayRaw, &emptyArrayArgs[0], &emptyArrayArgs[1]) ? zv::Val::adopt(emptyArrayRaw) : zv::Val();
if (UNEXPECTED(emptyArray.isUndef())) return zv::Val();
zv::Args args{nullType.raw(), falseType.raw(), emptyString.raw(), emptyArray.raw()};
zv::Val dominated = pt_type_call_static(PT_CLASS_TYPE_COMBINATOR, PT_LC("union"), 4, args);
zv::Val dominated = pt_type_combinator_call(PT_LC("union"), 4, args);
if (UNEXPECTED(dominated.isUndef())) return zv::Val();
if (UNEXPECTED(!zv::Ref(dominated.raw()).isObject())) {
zend_type_error("phpstan_turbo: TypeCombinator::union() must return %s", ptcls::type);
Expand Down
2 changes: 1 addition & 1 deletion turbo-ext/src/AccessoryNumericStringType.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ class AccessoryNumericStringType
zv::Val boolean = pt_type_call(self, PT_LC("toboolean"), 0, NULL);
if (UNEXPECTED(boolean.isUndef())) return zv::Val();
zv::Args args{integer.raw(), floating.raw(), self, boolean.raw()};
return pt_type_call_static(PT_CLASS_TYPE_COMBINATOR, PT_LC("union"), 4, args);
return pt_type_combinator_call(PT_LC("union"), 4, args);
}

/* new ConstantBooleanType(false) for null and for a string that is not
Expand Down
2 changes: 1 addition & 1 deletion turbo-ext/src/AccessoryUppercaseStringType.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ class AccessoryUppercaseStringType
zv::Val boolean = isExact() ? toBoolean() : pt_type_call(self, PT_LC("toboolean"), 0, NULL);
if (UNEXPECTED(boolean.isUndef())) return zv::Val();
zv::Args args{integer.raw(), floating.raw(), self, boolean.raw()};
return pt_type_call_static(PT_CLASS_TYPE_COMBINATOR, PT_LC("union"), 4, args);
return pt_type_combinator_call(PT_LC("union"), 4, args);
}

/* new ConstantBooleanType(false) for a string that is not uppercase
Expand Down
16 changes: 8 additions & 8 deletions turbo-ext/src/ArrayType.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ static bool isInstance(zval *value, zend_class_entry *ce, bool &out)
static zv::Val combinator2(const char *lcname, size_t len, zval *a, zval *b)
{
zv::Args args{a, b};
return pt_type_call_static(PT_CLASS_TYPE_COMBINATOR, lcname, len, 2, args);
return pt_type_combinator_call(lcname, len, 2, args);
}

/* new ConstantArrayType([], []) */
Expand Down Expand Up @@ -643,7 +643,7 @@ class ArrayType
if (UNEXPECTED(next.isUndef())) return zv::Val();
all.push(std::move(next));
}
offsetType = pt_type_call_static_spread(PT_CLASS_TYPE_COMBINATOR, PT_LC("union"), all.table());
offsetType = pt_type_combinator_call_spread(PT_LC("union"), all.table());
} else {
offsetType = zv::Val::copyOf(zv::Ref(k));
}
Expand All @@ -653,7 +653,7 @@ class ArrayType
if (zend_hash_num_elements(Z_ARRVAL_P(integerTypes.raw())) == 0) {
offsetType = zv::Val::copyOf(zv::Ref(k));
} else {
offsetType = pt_type_call_static_spread(PT_CLASS_TYPE_COMBINATOR, PT_LC("union"), Z_ARRVAL_P(integerTypes.raw()));
offsetType = pt_type_combinator_call_spread(PT_LC("union"), Z_ARRVAL_P(integerTypes.raw()));
}
}
} else {
Expand Down Expand Up @@ -776,7 +776,7 @@ class ArrayType
for (zv::ArrayEntry accessoryEntry : zv::ArrRef(accessories.raw())) {
intersectArgs.push(accessoryEntry.value());
}
zv::Val intersected = pt_type_call_static_spread(PT_CLASS_TYPE_COMBINATOR, PT_LC("intersect"), intersectArgs.table());
zv::Val intersected = pt_type_combinator_call_spread(PT_LC("intersect"), intersectArgs.table());
if (UNEXPECTED(intersected.isUndef())) return zv::Val();
newItemTypes.push(std::move(intersected));
continue;
Expand Down Expand Up @@ -813,7 +813,7 @@ class ArrayType
}
newItemTypes.push(std::move(newItemType));
}
zv::Val newItemType = pt_type_call_static_spread(PT_CLASS_TYPE_COMBINATOR, PT_LC("union"), newItemTypes.table());
zv::Val newItemType = pt_type_combinator_call_spread(PT_LC("union"), newItemTypes.table());
if (UNEXPECTED(newItemType.isUndef())) return zv::Val();
/* $newItemType !== $this->itemType */
if (!zv::Ref(newItemType.raw()).isObject() || Z_OBJ_P(newItemType.raw()) != Z_OBJ_P(i)) {
Expand Down Expand Up @@ -940,7 +940,7 @@ class ArrayType
if (UNEXPECTED(result.isUndef())) return zv::Val();
results.push(std::move(result));
}
return pt_type_call_static_spread(PT_CLASS_TYPE_COMBINATOR, PT_LC("union"), results.table());
return pt_type_combinator_call_spread(PT_LC("union"), results.table());
}
}

Expand Down Expand Up @@ -1233,7 +1233,7 @@ class ArrayType
intersectionTypes.push(zv::Val::adopt(accessory));
added++;
}
return pt_type_call_static_spread(PT_CLASS_TYPE_COMBINATOR, PT_LC("intersect"), intersectionTypes.table());
return pt_type_combinator_call_spread(PT_LC("intersect"), intersectionTypes.table());
}

/* $this->withTypes($this->keyType, $cb($this->getItemType())) */
Expand Down Expand Up @@ -1926,7 +1926,7 @@ class ArrayType
if (UNEXPECTED(one.isUndef())) return;
folded.push(std::move(one));
}
zv::Val unionType = pt_type_call_static_spread(PT_CLASS_TYPE_COMBINATOR, PT_LC("union"), folded.table());
zv::Val unionType = pt_type_combinator_call_spread(PT_LC("union"), folded.table());
if (UNEXPECTED(unionType.isUndef())) return;
unionType.intoReturnValue(return_value);
return;
Expand Down
2 changes: 1 addition & 1 deletion turbo-ext/src/BenevolentUnionType.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ static zv::Val callType(zend_object *object, const char *lcname, size_t len, uin
/* TypeCombinator::union(...$types) over a PHP array of types */
static zv::Val combinatorUnion(HashTable *types)
{
return pt_type_call_static_spread(PT_CLASS_TYPE_COMBINATOR, PT_LC("union"), types);
return pt_type_combinator_call_spread(PT_LC("union"), types);
}

/* Mirrors PHPStan\Type\BenevolentUnionType. State is the parent's. */
Expand Down
2 changes: 1 addition & 1 deletion turbo-ext/src/BooleanType.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ class BooleanType
zv::Val string = isExact() ? toString() : pt_type_call(self, PT_LC("tostring"), 0, NULL);
if (UNEXPECTED(string.isUndef())) return zv::Val();
zv::Args args{integer.raw(), floatType.raw(), string.raw(), self};
return pt_type_call_static(PT_CLASS_TYPE_COMBINATOR, PT_LC("union"), 4, args);
return pt_type_combinator_call(PT_LC("union"), 4, args);
}
return thisValue();
}
Expand Down
2 changes: 1 addition & 1 deletion turbo-ext/src/CallableType.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ class CallableType
if (UNEXPECTED(!created)) return zv::Val();
zv::Val closure = zv::Val::adopt(closureRaw);
zv::Args args{self, nonEmptyString.raw(), array.raw(), closure.raw()};
return pt_type_call_static(PT_CLASS_TYPE_COMBINATOR, PT_LC("union"), 4, args);
return pt_type_combinator_call(PT_LC("union"), 4, args);
}

/* the union or intersection's inferTemplateTypesOn($this); nothing for
Expand Down
2 changes: 1 addition & 1 deletion turbo-ext/src/ClosureType.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ class ClosureType
if (UNEXPECTED(!pt_callable_type_new(&callableRaw))) return zv::Val();
zv::Val callable = zv::Val::adopt(callableRaw);
zv::Args args{self, callable.raw()};
return pt_type_call_static(PT_CLASS_TYPE_COMBINATOR, PT_LC("union"), 2, args);
return pt_type_combinator_call(PT_LC("union"), 2, args);
}

/* the union or intersection's inferTemplateTypesOn($this); nothing for
Expand Down
4 changes: 2 additions & 2 deletions turbo-ext/src/ConstantArrayType.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,13 @@ static bool isInstance(zval *value, zend_class_entry *ce, bool &out)
static zv::Val combinator2(const char *lcname, size_t len, zval *a, zval *b)
{
zv::Args args{a, b};
return pt_type_call_static(PT_CLASS_TYPE_COMBINATOR, lcname, len, 2, args);
return pt_type_combinator_call(lcname, len, 2, args);
}

/* TypeCombinator::<method>(...$types) over an owned array */
static zv::Val combinatorSpread(const char *lcname, size_t len, HashTable *types)
{
return pt_type_call_static_spread(PT_CLASS_TYPE_COMBINATOR, lcname, len, types);
return pt_type_combinator_call_spread(lcname, len, types);
}

/* new IntersectionType($types) ($types consumed) */
Expand Down
2 changes: 1 addition & 1 deletion turbo-ext/src/ConstantBooleanType.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ class ConstantBooleanType
zv::Val string = isExact() ? toString() : pt_type_call(self, PT_LC("tostring"), 0, NULL);
if (UNEXPECTED(string.isUndef())) return zv::Val();
zv::Args args{integer.raw(), floatType.raw(), string.raw(), self};
return pt_type_call_static(PT_CLASS_TYPE_COMBINATOR, PT_LC("union"), 4, args);
return pt_type_combinator_call(PT_LC("union"), 4, args);
}
return thisValue();
}
Expand Down
4 changes: 2 additions & 2 deletions turbo-ext/src/ConstantIntegerType.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,9 @@ class ConstantIntegerType
}
ZVAL_COPY_VALUE(&args[2], string.raw());
ZVAL_COPY_VALUE(&args[3], boolean.raw());
return pt_type_call_static(PT_CLASS_TYPE_COMBINATOR, PT_LC("union"), 4, args);
return pt_type_combinator_call(PT_LC("union"), 4, args);
}
return pt_type_call_static(PT_CLASS_TYPE_COMBINATOR, PT_LC("union"), 2, args);
return pt_type_combinator_call(PT_LC("union"), 2, args);
}

/* new IntegerType() */
Expand Down
4 changes: 2 additions & 2 deletions turbo-ext/src/ConstantStringType.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -807,7 +807,7 @@ class ConstantStringType
}

zv::Args args{strLenType.raw(), offsetType};
zv::Val intersected = pt_type_call_static(PT_CLASS_TYPE_COMBINATOR, PT_LC("intersect"), 2, args);
zv::Val intersected = pt_type_combinator_call(PT_LC("intersect"), 2, args);
if (UNEXPECTED(intersected.isUndef())) return zv::Val();
if (zv::Ref(intersected.raw()).instanceOf(pt_ce_integer_range_type)) {
zv::Val finiteTypes = pt_type_call(Z_OBJ_P(intersected.raw()), PT_LC("getfinitetypes"), 0, NULL);
Expand Down Expand Up @@ -839,7 +839,7 @@ class ConstantStringType
chars.push(std::move(empty));
}

return pt_type_call_static_spread(PT_CLASS_TYPE_COMBINATOR, PT_LC("union"), chars.table());
return pt_type_combinator_call_spread(PT_LC("union"), chars.table());
}
}

Expand Down
2 changes: 1 addition & 1 deletion turbo-ext/src/FloatType.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ class FloatType
if (UNEXPECTED(boolean.isUndef())) return zv::Val();
}
zv::Args args{integer.raw(), self, string.raw(), boolean.raw()};
return pt_type_call_static(PT_CLASS_TYPE_COMBINATOR, PT_LC("union"), 4, args);
return pt_type_combinator_call(PT_LC("union"), 4, args);
}
return thisValue();
}
Expand Down
8 changes: 4 additions & 4 deletions turbo-ext/src/GenericClassStringType.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class GenericClassStringType
if (UNEXPECTED(generic.isUndef())) return zv::Val();
if (allowString) {
zv::Args args{generic.raw(), self};
zv::Val unionType = pt_type_call_static(PT_CLASS_TYPE_COMBINATOR, PT_LC("union"), 2, args);
zv::Val unionType = pt_type_combinator_call(PT_LC("union"), 2, args);
if (UNEXPECTED(unionType.isUndef())) return zv::Val();
return classNameToObjectTypeResult(unionType.raw(), false);
}
Expand Down Expand Up @@ -297,7 +297,7 @@ class GenericClassStringType
zv::Val objectWithoutClass = pt_type_new_object_without_class_type();
if (UNEXPECTED(objectWithoutClass.isUndef())) return zv::Val();
zv::Args args{typeToInfer.raw(), objectWithoutClass.raw()};
typeToInfer = pt_type_call_static(PT_CLASS_TYPE_COMBINATOR, PT_LC("intersect"), 2, args);
typeToInfer = pt_type_combinator_call(PT_LC("intersect"), 2, args);
}
if (UNEXPECTED(typeToInfer.isUndef())) return zv::Val();

Expand Down Expand Up @@ -402,7 +402,7 @@ class GenericClassStringType
zv::Val objectTypeToRemove = pt_type_new_object_type(removedValue.raw());
if (UNEXPECTED(objectTypeToRemove.isUndef())) return zv::Val();
zv::Args args{generic.raw(), objectTypeToRemove.raw()};
zv::Val remainingType = pt_type_call_static(PT_CLASS_TYPE_COMBINATOR, PT_LC("remove"), 2, args);
zv::Val remainingType = pt_type_combinator_call(PT_LC("remove"), 2, args);
if (UNEXPECTED(remainingType.isUndef())) return zv::Val();
if (zv::Ref(remainingType.raw()).instanceOf(pt_ce_never_type)) return pt_type_new_never_type();

Expand All @@ -423,7 +423,7 @@ class GenericClassStringType
if (UNEXPECTED(isFinal.isUndef())) return zv::Val();
if (zend_is_true(isFinal.raw())) {
zv::Args args{generic.raw(), objectTypeToRemove.raw()};
zv::Val remainingType = pt_type_call_static(PT_CLASS_TYPE_COMBINATOR, PT_LC("remove"), 2, args);
zv::Val remainingType = pt_type_combinator_call(PT_LC("remove"), 2, args);
if (UNEXPECTED(remainingType.isUndef())) return zv::Val();
if (zv::Ref(remainingType.raw()).instanceOf(pt_ce_never_type)) return pt_type_new_never_type();

Expand Down
2 changes: 1 addition & 1 deletion turbo-ext/src/GenericStaticType.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ class GenericStaticType
if (!remaining.isNull()) return create(classReflection.raw(), ownTypes, remaining.raw(), ownVariances);
}
zv::Args args{self, objectType.raw()};
return pt_type_call_static(PT_CLASS_TYPE_COMBINATOR, PT_LC("intersect"), 2, args);
return pt_type_combinator_call(PT_LC("intersect"), 2, args);
}
}
zval *reflection = classReflection();
Expand Down
Loading