com php-src: Added comments: Zend/zend_execute.h
| From: | Dmitry Stogov | Date: | Mon, 22 Jun 2015 13:39:07 +0000 |
| Subject: | com php-src: Added comments: Zend/zend_execute.h | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-87447@lists.php.net to get a copy of this message | ||
Commit: 567aa1783e30570140a21f94b98bc99a4aa1241b
Author: Dmitry Stogov <dmitry@zend.com> Mon, 22 Jun 2015 16:39:07 +0300
Parents: 4807b164fd801381ded0f13c3643f56ef427cda9
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=567aa1783e30570140a21f94b98bc99a4aa1241b
Log:
Added comments
Changed paths:
M Zend/zend_execute.h
Diff:
diff --git a/Zend/zend_execute.h b/Zend/zend_execute.h
index 0b54445..9719eda 100644
--- a/Zend/zend_execute.h
+++ b/Zend/zend_execute.h
@@ -148,6 +148,13 @@ struct _zend_vm_stack {
#define ZEND_VM_STACK_ELEMETS(stack) \
(((zval*)(stack)) + ZEND_VM_STACK_HEADER_SLOTS)
+/*
+ * In general in RELEASE build ZEND_ASSERT() must be zero-cost, but for some
+ * reason, GCC generated worse code, performing CSE on assertion code and the
+ * following "slow path" and moving memory read operatins from slow path into
+ * common header. This made a degradation for the fast path.
+ * The following "#if ZEND_DEBUG" eliminates it.
+ */
#if ZEND_DEBUG
# define ZEND_ASSERT_VM_STACK(stack) ZEND_ASSERT(stack->top > (zval *) stack &&
stack->end > (zval *) stack && stack->top <= stack->end)
# define ZEND_ASSERT_VM_STACK_GLOBAL ZEND_ASSERT(EG(vm_stack_top) > (zval *) EG(vm_stack)
&& EG(vm_stack_end) > (zval *) EG(vm_stack) && EG(vm_stack_top) <=
EG(vm_stack_end))