diff options
author | Anatol Belski <ab@php.net> | 2015-07-10 12:05:35 +0200 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2015-07-10 12:05:35 +0200 |
commit | 6cdf47725485cb5f2993a488aeb2df7fb4b287f6 (patch) | |
tree | d86e5516f2c33c8d7687b084e128e5de85d6e03d | |
parent | 5784b8f8e6b4a3b31a7e5529d7a55b98626c51e2 (diff) | |
download | php-git-6cdf47725485cb5f2993a488aeb2df7fb4b287f6.tar.gz |
Revert "Add assertion in liveliness computation"
This reverts commit 62062dcd0e3228830c7a6af5c689747151828f11.
-rw-r--r-- | Zend/zend_opcode.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/Zend/zend_opcode.c b/Zend/zend_opcode.c index ae2b4bf353..f8d040468f 100644 --- a/Zend/zend_opcode.c +++ b/Zend/zend_opcode.c @@ -941,12 +941,9 @@ static zend_always_inline uint32_t *generate_var_liveliness_info_ex(zend_op_arra && opline->opcode != ZEND_BOOL && opline->opcode != ZEND_JMPZ_EX && opline->opcode != ZEND_JMPNZ_EX - /* These opcodes write the result of the true branch of a ternary, short - * ternary or coalesce and are immediately followed by the instructions - * for the false branch (where this result is not live) */ + /* these two consecutive ops appear on ternary, + * the result of true branch is undefined for false branch */ && (opline->opcode != ZEND_QM_ASSIGN || (opline + 1)->opcode != ZEND_JMP) - && opline->opcode != ZEND_JMP_SET - && opline->opcode != ZEND_COALESCE /* exception for opcache, it might nowhere use the temporary * (anyway bool, so no need to free) */ && opline->opcode != ZEND_CASE @@ -962,17 +959,14 @@ static zend_always_inline uint32_t *generate_var_liveliness_info_ex(zend_op_arra && opline->opcode != ZEND_DECLARE_INHERITED_CLASS && opline->opcode != ZEND_DECLARE_INHERITED_CLASS_DELAYED && opline->opcode != ZEND_DECLARE_ANON_CLASS - && opline->opcode != ZEND_DECLARE_ANON_INHERITED_CLASS - ) { + && opline->opcode != ZEND_DECLARE_ANON_INHERITED_CLASS) { if (done_pass_two) { var = EX_VAR_TO_NUM(opline->result.var) - op_array->last_var; } else { var = opline->result.var; } - ZEND_ASSERT(Tstart[var] == (unsigned) -1); + /* Objects created via ZEND_NEW are only fully initialized after the DO_FCALL (constructor call) */ if (opline->opcode == ZEND_NEW) { - /* Objects created via ZEND_NEW are only fully initialized - * after the DO_FCALL (constructor call) */ Tstart[var] = opline->op2.opline_num - 1; } else { Tstart[var] = opline - op_array->opcodes; |