Merge branch 'PHP-7.4'

This commit is contained in:
Nikita Popov 2019-08-14 17:53:38 +02:00
commit ded28e2435
2 changed files with 4 additions and 3 deletions

View file

@ -405,7 +405,8 @@ static void gc_trace_ref(zend_refcounted *ref) {
fprintf(stderr, "[%p] rc=%d addr=%d %s %s ",
ref, GC_REFCOUNT(ref), GC_REF_ADDRESS(ref),
gc_color_name(GC_REF_COLOR(ref)),
zend_get_type_by_const(GC_TYPE(ref)));
GC_TYPE(ref) == IS_REFERENCE
? "reference" : zend_get_type_by_const(GC_TYPE(ref)));
}
}
#endif

View file

@ -268,7 +268,7 @@ static uint32_t calc_gc_buffer_size(zend_generator *generator) /* {{{ */
if (EX_CALL_INFO() & ZEND_CALL_FREE_EXTRA_ARGS) {
size += EX_NUM_ARGS() - op_array->num_args;
}
size += Z_TYPE(execute_data->This) == IS_OBJECT; /* $this */
size += (EX_CALL_INFO() & ZEND_CALL_RELEASE_THIS) != 0; /* $this */
size += (EX_CALL_INFO() & ZEND_CALL_CLOSURE) != 0; /* Closure object */
/* Live vars */
@ -349,7 +349,7 @@ static HashTable *zend_generator_get_gc(zend_object *object, zval **table, int *
}
}
if (Z_TYPE(execute_data->This) == IS_OBJECT) {
if (EX_CALL_INFO() & ZEND_CALL_RELEASE_THIS) {
ZVAL_OBJ(gc_buffer++, Z_OBJ(execute_data->This));
}
if (EX_CALL_INFO() & ZEND_CALL_CLOSURE) {