diff options
| author | Dmitry Stogov <dmitry@zend.com> | 2020-01-31 16:01:09 +0300 |
|---|---|---|
| committer | Dmitry Stogov <dmitry@zend.com> | 2020-01-31 16:01:09 +0300 |
| commit | 2b279b428fb31f7b66555f9be7baac110730112e (patch) | |
| tree | 70d9d02722e336fcf507313ee9c91179c913597e | |
| parent | 6b862e82d9363c2b25ebb762cee7bf8efd3c5bc7 (diff) | |
| download | php-git-2b279b428fb31f7b66555f9be7baac110730112e.tar.gz | |
We don't need "safe" destruction anymore
| -rw-r--r-- | Zend/zend_execute.c | 10 | ||||
| -rw-r--r-- | Zend/zend_execute.h | 18 | ||||
| -rw-r--r-- | ext/opcache/jit/zend_jit_x86.dasc | 4 |
3 files changed, 5 insertions, 27 deletions
diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index b1bc3234ea..9203fa6eb5 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -3373,15 +3373,7 @@ static zend_always_inline void i_free_compiled_variables(zend_execute_data *exec zval *cv = EX_VAR_NUM(0); int count = EX(func)->op_array.last_var; while (EXPECTED(count != 0)) { - if (Z_REFCOUNTED_P(cv)) { - zend_refcounted *r = Z_COUNTED_P(cv); - if (!GC_DELREF(r)) { - ZVAL_NULL(cv); - rc_dtor_func(r); - } else { - gc_check_possible_root(r); - } - } + i_zval_ptr_dtor(cv); cv++; count--; } diff --git a/Zend/zend_execute.h b/Zend/zend_execute.h index e2782e2127..745830652a 100644 --- a/Zend/zend_execute.h +++ b/Zend/zend_execute.h @@ -230,15 +230,7 @@ static zend_always_inline void zend_vm_stack_free_extra_args_ex(uint32_t call_in uint32_t count = ZEND_CALL_NUM_ARGS(call) - call->func->op_array.num_args; zval *p = ZEND_CALL_VAR_NUM(call, call->func->op_array.last_var + call->func->op_array.T); do { - if (Z_REFCOUNTED_P(p)) { - zend_refcounted *r = Z_COUNTED_P(p); - if (!GC_DELREF(r)) { - ZVAL_NULL(p); - rc_dtor_func(r); - } else { - gc_check_possible_root(r); - } - } + i_zval_ptr_dtor(p); p++; } while (--count); } @@ -257,13 +249,7 @@ static zend_always_inline void zend_vm_stack_free_args(zend_execute_data *call) zval *p = ZEND_CALL_ARG(call, 1); do { - if (Z_REFCOUNTED_P(p)) { - zend_refcounted *r = Z_COUNTED_P(p); - if (!GC_DELREF(r)) { - ZVAL_NULL(p); - rc_dtor_func(r); - } - } + zval_ptr_dtor_nogc(p); p++; } while (--num_args); } diff --git a/ext/opcache/jit/zend_jit_x86.dasc b/ext/opcache/jit/zend_jit_x86.dasc index fd75d67929..b8e91f3846 100644 --- a/ext/opcache/jit/zend_jit_x86.dasc +++ b/ext/opcache/jit/zend_jit_x86.dasc @@ -7207,7 +7207,7 @@ static int zend_jit_do_fcall(dasm_State **Dst, const zend_op *opline, const zend if (func) { for (i = 0; i < call_info->num_args; i++ ) { uint32_t offset = (uint32_t)(uintptr_t)ZEND_CALL_VAR_NUM(NULL, i); - | ZVAL_PTR_DTOR ZEND_ADDR_MEM_ZVAL(ZREG_RX, offset), MAY_BE_ANY|MAY_BE_RC1|MAY_BE_RCN, 0, 1, 1, opline + | ZVAL_PTR_DTOR ZEND_ADDR_MEM_ZVAL(ZREG_RX, offset), MAY_BE_ANY|MAY_BE_RC1|MAY_BE_RCN, 0, 1, 0, opline } } else { | mov FCARG1a, RX @@ -7939,7 +7939,7 @@ static int zend_jit_free_compiled_variables(dasm_State **Dst, const zend_op *opl if (info & (MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_OBJECT|MAY_BE_RESOURCE|MAY_BE_REF)) { uint32_t offset = (uint32_t)(uintptr_t)ZEND_CALL_VAR_NUM(NULL, i); - | ZVAL_PTR_DTOR ZEND_ADDR_MEM_ZVAL(ZREG_FP, offset), info, 1, 1, 1, opline + | ZVAL_PTR_DTOR ZEND_ADDR_MEM_ZVAL(ZREG_FP, offset), info, 1, 1, 0, opline } } return 1; |
