@@ -372,6 +372,10 @@ static void zend_file_cache_serialize_zval(zval *zv,
372
372
zend_file_cache_serialize_ast (GC_AST (ast ), script , info , buf );
373
373
}
374
374
break ;
375
+ case IS_INDIRECT :
376
+ /* Used by static properties. */
377
+ SERIALIZE_PTR (Z_INDIRECT_P (zv ));
378
+ break ;
375
379
}
376
380
}
377
381
@@ -631,7 +635,6 @@ static void zend_file_cache_serialize_class(zval *zv,
631
635
void * buf )
632
636
{
633
637
zend_class_entry * ce ;
634
- zend_class_entry * parent = NULL ;
635
638
636
639
SERIALIZE_PTR (Z_PTR_P (zv ));
637
640
ce = Z_PTR_P (zv );
@@ -642,7 +645,6 @@ static void zend_file_cache_serialize_class(zval *zv,
642
645
if (!(ce -> ce_flags & ZEND_ACC_LINKED )) {
643
646
SERIALIZE_STR (ce -> parent_name );
644
647
} else {
645
- parent = ce -> parent ;
646
648
SERIALIZE_PTR (ce -> parent );
647
649
}
648
650
}
@@ -660,16 +662,13 @@ static void zend_file_cache_serialize_class(zval *zv,
660
662
}
661
663
}
662
664
if (ce -> default_static_members_table ) {
663
- zval * table , * p , * end ;
665
+ zval * p , * end ;
664
666
665
667
SERIALIZE_PTR (ce -> default_static_members_table );
666
- table = ce -> default_static_members_table ;
667
- UNSERIALIZE_PTR (table );
668
+ p = ce -> default_static_members_table ;
669
+ UNSERIALIZE_PTR (p );
668
670
669
- /* Serialize only static properties in this class.
670
- * Static properties from parent classes will be handled in class_copy_ctor */
671
- p = table + (parent ? parent -> default_static_members_count : 0 );
672
- end = table + ce -> default_static_members_count ;
671
+ end = p + ce -> default_static_members_count ;
673
672
while (p < end ) {
674
673
zend_file_cache_serialize_zval (p , script , info , buf );
675
674
p ++ ;
@@ -1093,6 +1092,10 @@ static void zend_file_cache_unserialize_zval(zval *zv,
1093
1092
zend_file_cache_unserialize_ast (Z_ASTVAL_P (zv ), script , buf );
1094
1093
}
1095
1094
break ;
1095
+ case IS_INDIRECT :
1096
+ /* Used by static properties. */
1097
+ UNSERIALIZE_PTR (Z_INDIRECT_P (zv ));
1098
+ break ;
1096
1099
}
1097
1100
}
1098
1101
@@ -1344,7 +1347,6 @@ static void zend_file_cache_unserialize_class(zval *zv,
1344
1347
void * buf )
1345
1348
{
1346
1349
zend_class_entry * ce ;
1347
- zend_class_entry * parent = NULL ;
1348
1350
1349
1351
UNSERIALIZE_PTR (Z_PTR_P (zv ));
1350
1352
ce = Z_PTR_P (zv );
@@ -1355,7 +1357,6 @@ static void zend_file_cache_unserialize_class(zval *zv,
1355
1357
UNSERIALIZE_STR (ce -> parent_name );
1356
1358
} else {
1357
1359
UNSERIALIZE_PTR (ce -> parent );
1358
- parent = ce -> parent ;
1359
1360
}
1360
1361
}
1361
1362
zend_file_cache_unserialize_hash (& ce -> function_table ,
@@ -1372,14 +1373,10 @@ static void zend_file_cache_unserialize_class(zval *zv,
1372
1373
}
1373
1374
}
1374
1375
if (ce -> default_static_members_table ) {
1375
- zval * table , * p , * end ;
1376
-
1377
- /* Unserialize only static properties in this class.
1378
- * Static properties from parent classes will be handled in class_copy_ctor */
1376
+ zval * p , * end ;
1379
1377
UNSERIALIZE_PTR (ce -> default_static_members_table );
1380
- table = ce -> default_static_members_table ;
1381
- p = table + (parent ? parent -> default_static_members_count : 0 );
1382
- end = table + ce -> default_static_members_count ;
1378
+ p = ce -> default_static_members_table ;
1379
+ end = p + ce -> default_static_members_count ;
1383
1380
while (p < end ) {
1384
1381
zend_file_cache_unserialize_zval (p , script , buf );
1385
1382
p ++ ;
0 commit comments