com php-src: Merge branch 'PHP-7.1': ext/opcache/Optimizer/dfa _pass.c

[email protected] (Nikita Popov)
Newsgroups php.cvs
Message-ID <[email protected]>
Commit:    81b4bfcb96e8a59492380552801ca3e33f7a8901
Author:    Nikita Popov <[email protected]>         Fri, 14 Apr 2017 22:04:07 +0200
Parents:   5440b69ef42559df5187e9cad9e556866696448b 3ffe2cd251731d68493becf8ebbe6312ee86bb8d
Branches:  master

Link:       http://git.php.net/?p=php-src.git;a=commitdiff;h=81b4bfcb96e8a59492380552801ca3e33f7a8901

Log:
Merge branch 'PHP-7.1'

Changed paths:
  MM  ext/opcache/Optimizer/dfa_pass.c


Diff:
diff --cc ext/opcache/Optimizer/dfa_pass.c
index 20fe1d6,4e42606..438d7b9
--- a/ext/opcache/Optimizer/dfa_pass.c
+++ b/ext/opcache/Optimizer/dfa_pass.c
@@@ -162,10 -162,44 +162,14 @@@ static void zend_ssa_remove_nops(zend_o
  				zend_op *opline;
  				zend_op *new_opline;
  
- 				opline = op_array->opcodes + end - 1;
  				b->len = target - b->start;
+ 				opline = op_array->opcodes + end - 1;
+ 				if (opline->opcode == ZEND_NOP) {
+ 					continue;
+ 				}
+ 
  				new_opline = op_array->opcodes + target - 1;
 -				switch (new_opline->opcode) {
 -					case ZEND_JMP:
 -					case ZEND_FAST_CALL:
 -						ZEND_SET_OP_JMP_ADDR(new_opline, new_opline->op1, ZEND_OP1_JMP_ADDR(opline));
 -						break;
 -					case ZEND_JMPZNZ:
 -						new_opline->extended_value = ZEND_OPLINE_NUM_TO_OFFSET(op_array, new_opline, ZEND_OFFSET_TO_OPLINE_NUM(op_array, opline, opline->extended_value));
 -						/* break missing intentionally */
 -					case ZEND_JMPZ:
 -					case ZEND_JMPNZ:
 -					case ZEND_JMPZ_EX:
 -					case ZEND_JMPNZ_EX:
 -					case ZEND_FE_RESET_R:
 -					case ZEND_FE_RESET_RW:
 -					case ZEND_JMP_SET:
 -					case ZEND_COALESCE:
 -					case ZEND_ASSERT_CHECK:
 -						ZEND_SET_OP_JMP_ADDR(new_opline, new_opline->op2, ZEND_OP2_JMP_ADDR(opline));
 -						break;
 -					case ZEND_CATCH:
 -						if (!opline->result.num) {
 -							new_opline->extended_value = ZEND_OPLINE_NUM_TO_OFFSET(op_array, new_opline, ZEND_OFFSET_TO_OPLINE_NUM(op_array, opline, opline->extended_value));
 -						}
 -						break;
 -					case ZEND_DECLARE_ANON_CLASS:
 -					case ZEND_DECLARE_ANON_INHERITED_CLASS:
 -					case ZEND_FE_FETCH_R:
 -					case ZEND_FE_FETCH_RW:
 -						new_opline->extended_value = ZEND_OPLINE_NUM_TO_OFFSET(op_array, new_opline, ZEND_OFFSET_TO_OPLINE_NUM(op_array, opline, opline->extended_value));
 -						break;
 -				}
 +				zend_optimizer_migrate_jump(op_array, new_opline, opline);
  			}
  		}
  	}
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.