@@ -368,6 +368,10 @@ static void zend_file_cache_serialize_zval(zval *zv,
368
368
zend_file_cache_serialize_ast (GC_AST (ast ), script , info , buf );
369
369
}
370
370
break ;
371
+ case IS_INDIRECT :
372
+ /* Used by static properties. */
373
+ SERIALIZE_PTR (Z_INDIRECT_P (zv ));
374
+ break ;
371
375
}
372
376
}
373
377
@@ -626,7 +630,6 @@ static void zend_file_cache_serialize_class(zval *zv,
626
630
void * buf )
627
631
{
628
632
zend_class_entry * ce ;
629
- zend_class_entry * parent = NULL ;
630
633
631
634
SERIALIZE_PTR (Z_PTR_P (zv ));
632
635
ce = Z_PTR_P (zv );
@@ -637,7 +640,6 @@ static void zend_file_cache_serialize_class(zval *zv,
637
640
if (!(ce -> ce_flags & ZEND_ACC_LINKED )) {
638
641
SERIALIZE_STR (ce -> parent_name );
639
642
} else {
640
- parent = ce -> parent ;
641
643
SERIALIZE_PTR (ce -> parent );
642
644
}
643
645
}
@@ -655,16 +657,13 @@ static void zend_file_cache_serialize_class(zval *zv,
655
657
}
656
658
}
657
659
if (ce -> default_static_members_table ) {
658
- zval * table , * p , * end ;
660
+ zval * p , * end ;
659
661
660
662
SERIALIZE_PTR (ce -> default_static_members_table );
661
- table = ce -> default_static_members_table ;
662
- UNSERIALIZE_PTR (table );
663
+ p = ce -> default_static_members_table ;
664
+ UNSERIALIZE_PTR (p );
663
665
664
- /* Serialize only static properties in this class.
665
- * Static properties from parent classes will be handled in class_copy_ctor */
666
- p = table + (parent ? parent -> default_static_members_count : 0 );
667
- end = table + ce -> default_static_members_count ;
666
+ end = p + ce -> default_static_members_count ;
668
667
while (p < end ) {
669
668
zend_file_cache_serialize_zval (p , script , info , buf );
670
669
p ++ ;
@@ -1081,6 +1080,10 @@ static void zend_file_cache_unserialize_zval(zval *zv,
1081
1080
zend_file_cache_unserialize_ast (Z_ASTVAL_P (zv ), script , buf );
1082
1081
}
1083
1082
break ;
1083
+ case IS_INDIRECT :
1084
+ /* Used by static properties. */
1085
+ UNSERIALIZE_PTR (Z_INDIRECT_P (zv ));
1086
+ break ;
1084
1087
}
1085
1088
}
1086
1089
@@ -1325,7 +1328,6 @@ static void zend_file_cache_unserialize_class(zval *zv,
1325
1328
void * buf )
1326
1329
{
1327
1330
zend_class_entry * ce ;
1328
- zend_class_entry * parent = NULL ;
1329
1331
1330
1332
UNSERIALIZE_PTR (Z_PTR_P (zv ));
1331
1333
ce = Z_PTR_P (zv );
@@ -1336,7 +1338,6 @@ static void zend_file_cache_unserialize_class(zval *zv,
1336
1338
UNSERIALIZE_STR (ce -> parent_name );
1337
1339
} else {
1338
1340
UNSERIALIZE_PTR (ce -> parent );
1339
- parent = ce -> parent ;
1340
1341
}
1341
1342
}
1342
1343
zend_file_cache_unserialize_hash (& ce -> function_table ,
@@ -1353,14 +1354,10 @@ static void zend_file_cache_unserialize_class(zval *zv,
1353
1354
}
1354
1355
}
1355
1356
if (ce -> default_static_members_table ) {
1356
- zval * table , * p , * end ;
1357
-
1358
- /* Unserialize only static properties in this class.
1359
- * Static properties from parent classes will be handled in class_copy_ctor */
1357
+ zval * p , * end ;
1360
1358
UNSERIALIZE_PTR (ce -> default_static_members_table );
1361
- table = ce -> default_static_members_table ;
1362
- p = table + (parent ? parent -> default_static_members_count : 0 );
1363
- end = table + ce -> default_static_members_count ;
1359
+ p = ce -> default_static_members_table ;
1360
+ end = p + ce -> default_static_members_count ;
1364
1361
while (p < end ) {
1365
1362
zend_file_cache_unserialize_zval (p , script , buf );
1366
1363
p ++ ;
0 commit comments