mirror of
https://github.com/php/php-src.git
synced 2024-11-24 10:24:11 +08:00
parent
4369215b8f
commit
f71e64e53a
@ -137,7 +137,11 @@ ZEND_API void gc_init(void)
|
||||
|
||||
ZEND_API void gc_possible_root(zend_refcounted *ref)
|
||||
{
|
||||
ZEND_ASSERT(CG(unclean_shutdown) || (GC_TYPE(ref) == IS_ARRAY || GC_TYPE(ref) == IS_OBJECT));
|
||||
if (GC_TYPE(ref) == IS_NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
ZEND_ASSERT(GC_TYPE(ref) == IS_ARRAY || GC_TYPE(ref) == IS_OBJECT);
|
||||
GC_BENCH_INC(zval_possible_root);
|
||||
|
||||
if (EXPECTED(GC_GET_COLOR(GC_INFO(ref)) == GC_BLACK)) {
|
||||
|
@ -141,7 +141,7 @@ END_EXTERN_C()
|
||||
static zend_always_inline void gc_check_possible_root(zval *z)
|
||||
{
|
||||
ZVAL_DEREF(z);
|
||||
if (Z_COLLECTABLE_P(z) && UNEXPECTED(!Z_GC_INFO_P(z)) && EXPECTED(GC_TYPE(Z_COUNTED_P(z)) != IS_NULL)) {
|
||||
if (Z_COLLECTABLE_P(z) && UNEXPECTED(!Z_GC_INFO_P(z))) {
|
||||
gc_possible_root(Z_COUNTED_P(z));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user