com php-src: Inlined "slow" CV lookup code (now it's cheap) Removed expectations for undefined CV acess for BP_VAR_W and BP _VAR_IS modes:
Zend/zend_execute.c

From: Date: Thu, 27 Mar 2014 07:19:34 +0000
Subject: com php-src: Inlined "slow" CV lookup code (now it's cheap) Removed expectations for undefined CV acess for BP_VAR_W and BP _VAR_IS modes:
Zend/zend_execute.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-77536@lists.php.net to get a copy of this message
Commit: 36f24c512ee5c1a8c81ed98dcbe27de2cb8f0eda Author: Dmitry Stogov <dmitry@zend.com> Thu, 27 Mar 2014 11:19:34 +0400 Parents: 92aef5279a32bcec250f72c755e60489939986ce Branches: phpng Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=36f24c512ee5c1a8c81ed98dcbe27de2cb8f0eda Log: Inlined "slow" CV lookup code (now it's cheap) Removed expectations for undefined CV acess for BP_VAR_W and BP_VAR_IS modes Changed paths: M Zend/zend_execute.c Diff: diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index 51f58cf..0bd3fd3 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -228,7 +228,7 @@ static zend_never_inline zval *_get_zval_cv_lookup(zval *ptr, zend_uint var, int return ptr; } -static zend_never_inline zval *_get_zval_cv_lookup_BP_VAR_R(zval *ptr, zend_uint var TSRMLS_DC) +static zend_always_inline zval *_get_zval_cv_lookup_BP_VAR_R(zval *ptr, zend_uint var TSRMLS_DC) { zend_string *cv = CV_DEF_OF(var); @@ -236,7 +236,7 @@ static zend_never_inline zval *_get_zval_cv_lookup_BP_VAR_R(zval *ptr, zend_uint return &EG(uninitialized_zval); } -static zend_never_inline zval *_get_zval_cv_lookup_BP_VAR_UNSET(zval *ptr, zend_uint var TSRMLS_DC) +static zend_always_inline zval *_get_zval_cv_lookup_BP_VAR_UNSET(zval *ptr, zend_uint var TSRMLS_DC) { zend_string *cv = CV_DEF_OF(var); @@ -244,12 +244,12 @@ static zend_never_inline zval *_get_zval_cv_lookup_BP_VAR_UNSET(zval *ptr, zend_ return &EG(uninitialized_zval); } -static zend_never_inline zval *_get_zval_cv_lookup_BP_VAR_IS(zval *ptr, zend_uint var TSRMLS_DC) +static zend_always_inline zval *_get_zval_cv_lookup_BP_VAR_IS(zval *ptr, zend_uint var TSRMLS_DC) { return &EG(uninitialized_zval); } -static zend_never_inline zval *_get_zval_cv_lookup_BP_VAR_RW(zval *ptr, zend_uint var TSRMLS_DC) +static zend_always_inline zval *_get_zval_cv_lookup_BP_VAR_RW(zval *ptr, zend_uint var TSRMLS_DC) { zend_string *cv = CV_DEF_OF(var); @@ -258,7 +258,7 @@ static zend_never_inline zval *_get_zval_cv_lookup_BP_VAR_RW(zval *ptr, zend_uin return ptr; } -static zend_never_inline zval *_get_zval_cv_lookup_BP_VAR_W(zval *ptr, zend_uint var TSRMLS_DC) +static zend_always_inline zval *_get_zval_cv_lookup_BP_VAR_W(zval *ptr, zend_uint var TSRMLS_DC) { ZVAL_NULL(ptr); return ptr; @@ -337,7 +337,7 @@ static zend_always_inline zval *_get_zval_ptr_cv_BP_VAR_IS(const zend_execute_da { zval *ret = EX_VAR_NUM(var); - if (UNEXPECTED(Z_TYPE_P(ret) == IS_UNDEF)) { + if (Z_TYPE_P(ret) == IS_UNDEF) { return _get_zval_cv_lookup_BP_VAR_IS(ret, var TSRMLS_CC); } return ret; @@ -347,7 +347,7 @@ static zend_always_inline zval *_get_zval_ptr_cv_deref_BP_VAR_IS(const zend_exec { zval *ret = EX_VAR_NUM(var); - if (UNEXPECTED(Z_TYPE_P(ret) == IS_UNDEF)) { + if (Z_TYPE_P(ret) == IS_UNDEF) { return _get_zval_cv_lookup_BP_VAR_IS(ret, var TSRMLS_CC); } if (UNEXPECTED(Z_TYPE_P(ret) == IS_REFERENCE)) { @@ -383,7 +383,7 @@ static zend_always_inline zval *_get_zval_ptr_cv_BP_VAR_W(const zend_execute_dat { zval *ret = EX_VAR_NUM(var); - if (UNEXPECTED(Z_TYPE_P(ret) == IS_UNDEF)) { + if (Z_TYPE_P(ret) == IS_UNDEF) { return _get_zval_cv_lookup_BP_VAR_W(ret, var TSRMLS_CC); } return ret; @@ -393,7 +393,7 @@ static zend_always_inline zval *_get_zval_ptr_cv_deref_BP_VAR_W(const zend_execu { zval *ret = EX_VAR_NUM(var); - if (UNEXPECTED(Z_TYPE_P(ret) == IS_UNDEF)) { + if (Z_TYPE_P(ret) == IS_UNDEF) { return _get_zval_cv_lookup_BP_VAR_W(ret, var TSRMLS_CC); } if (UNEXPECTED(Z_TYPE_P(ret) == IS_REFERENCE)) {

« previous php.cvs (#77536) next »