diff options
author | Dmitry Stogov <dmitry@zend.com> | 2018-01-11 12:15:34 +0300 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2018-01-11 12:15:34 +0300 |
commit | 57e4be9cefa6edad4763dc26a01c74de922c8eba (patch) | |
tree | 13a39e68e769af3ca645d7df60bc5372b3efb6b2 /Zend | |
parent | c3717d9aecbe65cb2e5778a24a91e9eaf638639e (diff) | |
download | php-git-57e4be9cefa6edad4763dc26a01c74de922c8eba.tar.gz |
Avoid, most offten unnecessary, memory load.
Diffstat (limited to 'Zend')
-rw-r--r-- | Zend/zend_opcode.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Zend/zend_opcode.c b/Zend/zend_opcode.c index 288fbd0a02..4cb423d216 100644 --- a/Zend/zend_opcode.c +++ b/Zend/zend_opcode.c @@ -373,8 +373,6 @@ void zend_class_add_ref(zval *zv) ZEND_API void destroy_op_array(zend_op_array *op_array) { - zval *literal = op_array->literals; - zval *end; uint32_t i; if (op_array->static_variables && @@ -404,8 +402,9 @@ ZEND_API void destroy_op_array(zend_op_array *op_array) efree(op_array->vars); } - if (literal) { - end = literal + op_array->last_literal; + if (op_array->literals) { + zval *literal = op_array->literals; + zval *end = literal + op_array->last_literal; while (literal < end) { zval_ptr_dtor_nogc(literal); literal++; |