com php-src: We don't need to check for xlat entry twice: ext/opcache/zend_persist.c

From: Date: Mon, 08 Sep 2014 20:40:14 +0000
Subject: com php-src: We don't need to check for xlat entry twice: ext/opcache/zend_persist.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-81461@lists.php.net to get a copy of this message
Commit: a9d985263a8a3c0a654f466c32ff9b54b7a6116f Author: Dmitry Stogov <dmitry@zend.com> Tue, 9 Sep 2014 00:40:14 +0400 Parents: c59300ac86dd02bcdacd6c1460a5b43e91a5bf49 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=a9d985263a8a3c0a654f466c32ff9b54b7a6116f Log: We don't need to check for xlat entry twice Changed paths: M ext/opcache/zend_persist.c Diff: diff --git a/ext/opcache/zend_persist.c b/ext/opcache/zend_persist.c index b34e905..b2b863c 100644 --- a/ext/opcache/zend_persist.c +++ b/ext/opcache/zend_persist.c @@ -198,9 +198,7 @@ static void zend_persist_zval(zval *z TSRMLS_DC) Z_ARR_P(z) = zend_accel_memdup(Z_ARR_P(z), sizeof(zend_array)); zend_hash_persist_immutable(Z_ARRVAL_P(z) TSRMLS_CC); } else { - if (!zend_shared_alloc_get_xlat_entry(Z_ARR_P(z))) { - GC_REMOVE_FROM_BUFFER(Z_ARR_P(z)); - } + GC_REMOVE_FROM_BUFFER(Z_ARR_P(z)); zend_accel_store(Z_ARR_P(z), sizeof(zend_array)); zend_hash_persist(Z_ARRVAL_P(z), zend_persist_zval TSRMLS_CC); /* make immutable array */ @@ -254,9 +252,7 @@ static void zend_persist_zval_const(zval *z TSRMLS_DC) Z_ARR_P(z) = zend_accel_memdup(Z_ARR_P(z), sizeof(zend_array)); zend_hash_persist_immutable(Z_ARRVAL_P(z) TSRMLS_CC); } else { - if (!zend_shared_alloc_get_xlat_entry(Z_ARR_P(z))) { - GC_REMOVE_FROM_BUFFER(Z_ARR_P(z)); - } + GC_REMOVE_FROM_BUFFER(Z_ARR_P(z)); zend_accel_store(Z_ARR_P(z), sizeof(zend_array)); zend_hash_persist(Z_ARRVAL_P(z), zend_persist_zval TSRMLS_CC); /* make immutable array */

« previous php.cvs (#81461) next »