com php-src: Simplify previous fix: Zend/zend_compile.c
| From: | Nikita Popov | Date: | Sat, 13 Feb 2016 22:46:50 +0000 |
| Subject: | com php-src: Simplify previous fix: Zend/zend_compile.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-91009@lists.php.net to get a copy of this message | ||
Commit: d10911afde4dfb9d66c60a05b387491eb6c70236
Author: Nikita Popov <nikic@php.net> Sat, 13 Feb 2016 23:46:50 +0100
Parents: 502dd99a6ce5c70b6b75884a338610ea0cb4e452
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=d10911afde4dfb9d66c60a05b387491eb6c70236
Log:
Simplify previous fix
I didn't notice that there already is a var with the same value.
Changed paths:
M Zend/zend_compile.c
Diff:
diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c
index e318309..eb029d9 100644
--- a/Zend/zend_compile..c
+++ b/Zend/zend_compile.c
@@ -1960,7 +1960,6 @@ static void zend_find_live_range(zend_op *opline, zend_uchar type, uint32_t
var)
while (def != CG(active_op_array)->opcodes) {
def--;
if (def->result_type == type && def->result.var == var) {
- uint32_t var;
if (def->opcode == ZEND_ADD_ARRAY_ELEMENT ||
def->opcode == ZEND_ROPE_ADD) {
/* not a real definition */
@@ -1981,10 +1980,7 @@ static void zend_find_live_range(zend_op *opline, zend_uchar type, uint32_t
var)
} else if (def->opcode == ZEND_FAST_CALL) {
/* fast_calls don't have to be destroyed */
break;
- }
-
- var = def->result.var;
- if (def->opcode == ZEND_NEW) {
+ } else if (def->opcode == ZEND_NEW) {
/* Objects created via ZEND_NEW are only fully initialized
* after the DO_FCALL (constructor call) */
def = CG(active_op_array)->opcodes + def->op2.opline_num - 1;