php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login

Patch zo_revert_op1_const_block_pass.patch for opcache Bug #66474

Patch version 2014-01-12 22:43 UTC

Return to Bug #66474 | Download this patch
Patch Revisions:

Developer: phpdev@ehrhardt.nl

diff --git a/Optimizer/block_pass.c b/Optimizer/block_pass.c
index fefbfaa..ce44a35 100644
--- a/Optimizer/block_pass.c
+++ b/Optimizer/block_pass.c
@@ -1034,9 +1034,10 @@ static void zend_optimize_block(zend_code_block *block, zend_op_array *op_array,
 
 				literal_dtor(&ZEND_OP1_LITERAL(opline));
 				literal_dtor(&ZEND_OP2_LITERAL(opline));
-				opline->opcode = ZEND_QM_ASSIGN;
+				ZEND_OP1_LITERAL(opline) = result;
 				SET_UNUSED(opline->op2);
-				update_op1_const(op_array, opline, &result TSRMLS_CC);
+
+				opline->opcode = ZEND_QM_ASSIGN;
 			}
 			EG(error_reporting) = er;
 		} else if ((opline->opcode == ZEND_BOOL ||
@@ -1060,8 +1061,8 @@ static void zend_optimize_block(zend_code_block *block, zend_op_array *op_array,
 			}
 			PZ_SET_REFCOUNT_P(&result, 1);
 			PZ_UNSET_ISREF_P(&result);
+			ZEND_OP1_LITERAL(opline) = result;
 			opline->opcode = ZEND_QM_ASSIGN;
-			update_op1_const(op_array, opline, &result TSRMLS_CC);
 		} else if ((opline->opcode == ZEND_RETURN || opline->opcode == ZEND_EXIT) &&
 					ZEND_OP1_TYPE(opline) == IS_TMP_VAR &&
 				   	VAR_SOURCE(opline->op1) &&
 
PHP Copyright © 2001-2015 The PHP Group
All rights reserved.
Last updated: Thu Apr 02 06:04:41 2015 UTC