com php-src: Micro-optimization: Zend/zend_execute.h

From: Date: Tue, 09 Apr 2019 11:38:49 +0000
Subject: com php-src: Micro-optimization: Zend/zend_execute.h
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-105594@lists.php.net to get a copy of this message
Commit: 5fdee9394f5481459316c0e46a9ad8e25cab6134 Author: Dmitry Stogov <dmitry@zend.com> Tue, 9 Apr 2019 14:38:49 +0300 Parents: 8021d52fb6b36753ba1456acdae367c150a92e96 Branches: PHP-7.4 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=5fdee9394f5481459316c0e46a9ad8e25cab6134 Log: Micro-optimization Changed paths: M Zend/zend_execute.h Diff: diff --git a/Zend/zend_execute.h b/Zend/zend_execute.h index b825922..deb299a 100644 --- a/Zend/zend_execute.h +++ b/Zend/zend_execute.h @@ -96,20 +96,19 @@ static zend_always_inline zval* zend_assign_to_variable(zval *variable_ptr, zval if (UNEXPECTED(ZEND_REF_HAS_TYPE_SOURCES(Z_REF_P(variable_ptr)))) { zend_bool need_copy = ZEND_CONST_COND(value_type & (IS_CONST|IS_CV), 1) || ((value_type & IS_VAR) && UNEXPECTED(ref) && GC_REFCOUNT(ref) > 1); + zend_bool ret; if (need_copy) { ZVAL_COPY(&tmp, value); value = &tmp; } - if (!zend_verify_ref_assignable_zval(Z_REF_P(variable_ptr), value, strict)) { - if (need_copy) { - Z_TRY_DELREF_P(value); - } - zval_ptr_dtor(value); - return Z_REFVAL_P(variable_ptr); - } + ret = zend_verify_ref_assignable_zval(Z_REF_P(variable_ptr), value, strict); if (need_copy) { Z_TRY_DELREF_P(value); } + if (!ret) { + zval_ptr_dtor(value); + return Z_REFVAL_P(variable_ptr); + } } variable_ptr = Z_REFVAL_P(variable_ptr);

« previous php.cvs (#105594) next »