Skip to content

Commit ea00ff3

Browse files
committed
Remove unused code
1 parent 0bac574 commit ea00ff3

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

Zend/zend_API.c

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4562,25 +4562,6 @@ ZEND_API zend_property_info *zend_declare_typed_property(zend_class_entry *ce, z
45624562
}
45634563
}
45644564

4565-
/* Virtual properties have no backing storage, the offset should never be used. However, the
4566-
* virtual flag cannot be definitively determined at compile time. Allow using default values
4567-
* anyway, and assert after inheritance that the property is not actually virtual. */
4568-
if (access_type & ZEND_ACC_VIRTUAL) {
4569-
if (Z_TYPE_P(property) == IS_UNDEF) {
4570-
property_info->offset = OBJ_PROP_TO_OFFSET(ce->default_properties_count);
4571-
ce->default_properties_count++;
4572-
ce->default_properties_table = perealloc(ce->default_properties_table, sizeof(zval) * ce->default_properties_count, ce->type == ZEND_INTERNAL_CLASS);
4573-
zval *property_default_ptr = &ce->default_properties_table[OBJ_PROP_TO_NUM(property_info->offset)];
4574-
ZVAL_UNDEF(property_default_ptr);
4575-
Z_PROP_FLAG_P(property_default_ptr) = IS_PROP_UNINIT;
4576-
/* For user classes this is handled during linking */
4577-
if (ce->type == ZEND_INTERNAL_CLASS) {
4578-
ce->properties_info_table = perealloc(ce->properties_info_table, sizeof(zend_property_info *) * ce->default_properties_count, 1);
4579-
ce->properties_info_table[ce->default_properties_count - 1] = property_info;
4580-
}
4581-
goto skip_property_storage;
4582-
}
4583-
}
45844565
if (access_type & ZEND_ACC_STATIC) {
45854566
if ((property_info_ptr = zend_hash_find_ptr(&ce->properties_info, name)) != NULL) {
45864567
ZEND_ASSERT(property_info_ptr->flags & ZEND_ACC_STATIC);
@@ -4630,7 +4611,6 @@ ZEND_API zend_property_info *zend_declare_typed_property(zend_class_entry *ce, z
46304611
ZVAL_COPY_VALUE(property_default_ptr, property);
46314612
Z_PROP_FLAG_P(property_default_ptr) = Z_ISUNDEF_P(property) ? IS_PROP_UNINIT : 0;
46324613
}
4633-
skip_property_storage:
46344614
if (ce->type & ZEND_INTERNAL_CLASS) {
46354615
/* Must be interned to avoid ZTS data races */
46364616
if (is_persistent_class(ce)) {

0 commit comments

Comments
 (0)