com php-src: This became unnecessary after #72543 is fixed: Zend/zend_compile.c
| From: | Xinchen Hui | Date: | Thu, 07 Jul 2016 07:25:27 +0000 |
| Subject: | com php-src: This became unnecessary after #72543 is fixed: Zend/zend_compile.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-92865@lists.php.net to get a copy of this message | ||
Commit: d77a8b052bff4834cafbe8ea4632973607aa848e
Author: Xinchen Hui <laruence@gmail.com> Thu, 7 Jul 2016 15:25:27 +0800
Parents: c53aadbba3d51d598316a219c941e99798217122
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=d77a8b052bff4834cafbe8ea4632973607aa848e
Log:
This became unnecessary after #72543 is fixed
Bugs:
https://bugs.php.net/72543
Changed paths:
M Zend/zend_compile.c
Diff:
diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c
index af5f503..6c51527 100644
--- a/Zend/zend_compile.c
+++ b/Zend/zend_compile.c
@@ -4528,22 +4528,6 @@ void zend_compile_switch(zend_ast *ast) /* {{{ */
zend_compile_expr(&expr_node, expr_ast);
- if (cases->children == 1 && cases->child[0]->child[0] == NULL) {
- /* we have to take care about the case that only have one default branch,
- * expr result will not be unrefed in this case, but it should be like in ZEND_CASE */
- zend_ast *stmt_ast = cases->child[0]->child[1];
- if (expr_node.op_type == IS_VAR || expr_node.op_type == IS_TMP_VAR) {
- zend_emit_op(NULL, ZEND_FREE, &expr_node, NULL);
- } else if (expr_node.op_type == IS_CONST) {
- zval_dtor(&expr_node.u.constant);
- }
-
- zend_begin_loop(ZEND_NOP, NULL);
- zend_compile_stmt(stmt_ast);
- zend_end_loop(get_next_op_number(CG(active_op_array)), NULL);
- return;
- }
-
zend_begin_loop(ZEND_FREE, &expr_node);
case_node.op_type = IS_TMP_VAR;