cvs: ZendEngine2(PHP_5_3) / zend_vm_def.h zend_vm_execute.h
[email protected] ("Dmitry Stogov")
| Newsgroups | php.zend-engine.cvs |
|---|---|
| Message-ID | <cvsdmitry1209552252@cvsserver> |
dmitry Wed Apr 30 10:44:12 2008 UTC
Modified files: (Branch: PHP_5_3)
/ZendEngine2 zend_vm_def.h zend_vm_execute.h
Log:
IS_CONST operands are always have is_ref==1 and refcount==2, so we can eliminate unnecessary checks at specialization/compilation stage
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_vm_def.h?r1=1.59.2.29.2.48.2.50&r2=1.59.2.29.2.48.2.51&diff_format=u
Index: ZendEngine2/zend_vm_def.h
diff -u ZendEngine2/zend_vm_def.h:1.59.2.29.2.48.2.50 ZendEngine2/zend_vm_def.h:1.59.2.29.2.48.2.51
--- ZendEngine2/zend_vm_def.h:1.59.2.29.2.48.2.50 Tue Apr 29 08:15:17 2008
+++ ZendEngine2/zend_vm_def.h Wed Apr 30 10:44:08 2008
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_vm_def.h,v 1.59.2.29.2.48.2.50 2008/04/29 08:15:17 dmitry Exp $ */
+/* $Id: zend_vm_def.h,v 1.59.2.29.2.48.2.51 2008/04/30 10:44:08 dmitry Exp $ */
/* If you change this file, please regenerate the zend_vm_execute.h and
* zend_vm_opcodes.h files by running:
@@ -2310,7 +2310,8 @@
FREE_OP1();
}
} else if (!IS_OP1_TMP_FREE()) { /* Not a temp var */
- if (EG(active_op_array)->return_reference == ZEND_RETURN_REF ||
+ if (OP1_TYPE == IS_CONST ||
+ EG(active_op_array)->return_reference == ZEND_RETURN_REF ||
(PZVAL_IS_REF(retval_ptr) && Z_REFCOUNT_P(retval_ptr) > 0)) {
zval *ret;
@@ -2904,7 +2905,7 @@
Z_ADDREF_P(expr_ptr);
} else
#endif
- if (PZVAL_IS_REF(expr_ptr)) {
+ if (OP1_TYPE == IS_CONST || PZVAL_IS_REF(expr_ptr)) {
zval *new_expr;
ALLOC_ZVAL(new_expr);
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_vm_execute.h?r1=1.62.2.30.2.49.2.49&r2=1.62.2.30.2.49.2.50&diff_format=u
Index: ZendEngine2/zend_vm_execute.h
diff -u ZendEngine2/zend_vm_execute.h:1.62.2.30.2.49.2.49 ZendEngine2/zend_vm_execute.h:1.62.2.30.2.49.2.50
--- ZendEngine2/zend_vm_execute.h:1.62.2.30.2.49.2.49 Tue Apr 29 08:15:18 2008
+++ ZendEngine2/zend_vm_execute.h Wed Apr 30 10:44:08 2008
@@ -1436,7 +1436,8 @@
}
} else if (!0) { /* Not a temp var */
- if (EG(active_op_array)->return_reference == ZEND_RETURN_REF ||
+ if (IS_CONST == IS_CONST ||
+ EG(active_op_array)->return_reference == ZEND_RETURN_REF ||
(PZVAL_IS_REF(retval_ptr) && Z_REFCOUNT_P(retval_ptr) > 0)) {
zval *ret;
@@ -2639,7 +2640,7 @@
Z_ADDREF_P(expr_ptr);
} else
#endif
- if (PZVAL_IS_REF(expr_ptr)) {
+ if (IS_CONST == IS_CONST || PZVAL_IS_REF(expr_ptr)) {
zval *new_expr;
ALLOC_ZVAL(new_expr);
@@ -3138,7 +3139,7 @@
Z_ADDREF_P(expr_ptr);
} else
#endif
- if (PZVAL_IS_REF(expr_ptr)) {
+ if (IS_CONST == IS_CONST || PZVAL_IS_REF(expr_ptr)) {
zval *new_expr;
ALLOC_ZVAL(new_expr);
@@ -3603,7 +3604,7 @@
Z_ADDREF_P(expr_ptr);
} else
#endif
- if (PZVAL_IS_REF(expr_ptr)) {
+ if (IS_CONST == IS_CONST || PZVAL_IS_REF(expr_ptr)) {
zval *new_expr;
ALLOC_ZVAL(new_expr);
@@ -3793,7 +3794,7 @@
Z_ADDREF_P(expr_ptr);
} else
#endif
- if (PZVAL_IS_REF(expr_ptr)) {
+ if (IS_CONST == IS_CONST || PZVAL_IS_REF(expr_ptr)) {
zval *new_expr;
ALLOC_ZVAL(new_expr);
@@ -4257,7 +4258,7 @@
Z_ADDREF_P(expr_ptr);
} else
#endif
- if (PZVAL_IS_REF(expr_ptr)) {
+ if (IS_CONST == IS_CONST || PZVAL_IS_REF(expr_ptr)) {
zval *new_expr;
ALLOC_ZVAL(new_expr);
@@ -4647,7 +4648,8 @@
zval_dtor(free_op1.var);
}
} else if (!1) { /* Not a temp var */
- if (EG(active_op_array)->return_reference == ZEND_RETURN_REF ||
+ if (IS_TMP_VAR == IS_CONST ||
+ EG(active_op_array)->return_reference == ZEND_RETURN_REF ||
(PZVAL_IS_REF(retval_ptr) && Z_REFCOUNT_P(retval_ptr) > 0)) {
zval *ret;
@@ -5792,7 +5794,7 @@
Z_ADDREF_P(expr_ptr);
} else
#endif
- if (PZVAL_IS_REF(expr_ptr)) {
+ if (IS_TMP_VAR == IS_CONST || PZVAL_IS_REF(expr_ptr)) {
zval *new_expr;
ALLOC_ZVAL(new_expr);
@@ -6248,7 +6250,7 @@
Z_ADDREF_P(expr_ptr);
} else
#endif
- if (PZVAL_IS_REF(expr_ptr)) {
+ if (IS_TMP_VAR == IS_CONST || PZVAL_IS_REF(expr_ptr)) {
zval *new_expr;
ALLOC_ZVAL(new_expr);
@@ -6704,7 +6706,7 @@
Z_ADDREF_P(expr_ptr);
} else
#endif
- if (PZVAL_IS_REF(expr_ptr)) {
+ if (IS_TMP_VAR == IS_CONST || PZVAL_IS_REF(expr_ptr)) {
zval *new_expr;
ALLOC_ZVAL(new_expr);
@@ -6797,7 +6799,7 @@
Z_ADDREF_P(expr_ptr);
} else
#endif
- if (PZVAL_IS_REF(expr_ptr)) {
+ if (IS_TMP_VAR == IS_CONST || PZVAL_IS_REF(expr_ptr)) {
zval *new_expr;
ALLOC_ZVAL(new_expr);
@@ -7250,7 +7252,7 @@
Z_ADDREF_P(expr_ptr);
} else
#endif
- if (PZVAL_IS_REF(expr_ptr)) {
+ if (IS_TMP_VAR == IS_CONST || PZVAL_IS_REF(expr_ptr)) {
zval *new_expr;
ALLOC_ZVAL(new_expr);
@@ -7792,7 +7794,8 @@
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
}
} else if (!0) { /* Not a temp var */
- if (EG(active_op_array)->return_reference == ZEND_RETURN_REF ||
+ if (IS_VAR == IS_CONST ||
+ EG(active_op_array)->return_reference == ZEND_RETURN_REF ||
(PZVAL_IS_REF(retval_ptr) && Z_REFCOUNT_P(retval_ptr) > 0)) {
zval *ret;
@@ -10266,7 +10269,7 @@
Z_ADDREF_P(expr_ptr);
} else
#endif
- if (PZVAL_IS_REF(expr_ptr)) {
+ if (IS_VAR == IS_CONST || PZVAL_IS_REF(expr_ptr)) {
zval *new_expr;
ALLOC_ZVAL(new_expr);
@@ -12024,7 +12027,7 @@
Z_ADDREF_P(expr_ptr);
} else
#endif
- if (PZVAL_IS_REF(expr_ptr)) {
+ if (IS_VAR == IS_CONST || PZVAL_IS_REF(expr_ptr)) {
zval *new_expr;
ALLOC_ZVAL(new_expr);
@@ -13823,7 +13826,7 @@
Z_ADDREF_P(expr_ptr);
} else
#endif
- if (PZVAL_IS_REF(expr_ptr)) {
+ if (IS_VAR == IS_CONST || PZVAL_IS_REF(expr_ptr)) {
zval *new_expr;
ALLOC_ZVAL(new_expr);
@@ -14694,7 +14697,7 @@
Z_ADDREF_P(expr_ptr);
} else
#endif
- if (PZVAL_IS_REF(expr_ptr)) {
+ if (IS_VAR == IS_CONST || PZVAL_IS_REF(expr_ptr)) {
zval *new_expr;
ALLOC_ZVAL(new_expr);
@@ -16225,7 +16228,7 @@
Z_ADDREF_P(expr_ptr);
} else
#endif
- if (PZVAL_IS_REF(expr_ptr)) {
+ if (IS_VAR == IS_CONST || PZVAL_IS_REF(expr_ptr)) {
zval *new_expr;
ALLOC_ZVAL(new_expr);
@@ -21516,7 +21519,8 @@
}
} else if (!0) { /* Not a temp var */
- if (EG(active_op_array)->return_reference == ZEND_RETURN_REF ||
+ if (IS_CV == IS_CONST ||
+ EG(active_op_array)->return_reference == ZEND_RETURN_REF ||
(PZVAL_IS_REF(retval_ptr) && Z_REFCOUNT_P(retval_ptr) > 0)) {
zval *ret;
@@ -23656,7 +23660,7 @@
Z_ADDREF_P(expr_ptr);
} else
#endif
- if (PZVAL_IS_REF(expr_ptr)) {
+ if (IS_CV == IS_CONST || PZVAL_IS_REF(expr_ptr)) {
zval *new_expr;
ALLOC_ZVAL(new_expr);
@@ -25305,7 +25309,7 @@
Z_ADDREF_P(expr_ptr);
} else
#endif
- if (PZVAL_IS_REF(expr_ptr)) {
+ if (IS_CV == IS_CONST || PZVAL_IS_REF(expr_ptr)) {
zval *new_expr;
ALLOC_ZVAL(new_expr);
@@ -26994,7 +26998,7 @@
Z_ADDREF_P(expr_ptr);
} else
#endif
- if (PZVAL_IS_REF(expr_ptr)) {
+ if (IS_CV == IS_CONST || PZVAL_IS_REF(expr_ptr)) {
zval *new_expr;
ALLOC_ZVAL(new_expr);
@@ -27762,7 +27766,7 @@
Z_ADDREF_P(expr_ptr);
} else
#endif
- if (PZVAL_IS_REF(expr_ptr)) {
+ if (IS_CV == IS_CONST || PZVAL_IS_REF(expr_ptr)) {
zval *new_expr;
ALLOC_ZVAL(new_expr);
@@ -29187,7 +29191,7 @@
Z_ADDREF_P(expr_ptr);
} else
#endif
- if (PZVAL_IS_REF(expr_ptr)) {
+ if (IS_CV == IS_CONST || PZVAL_IS_REF(expr_ptr)) {
zval *new_expr;
ALLOC_ZVAL(new_expr);