Skip to content

Commit d77a8b0

Browse files
committed
This became unnecessary after #72543 is fixed
1 parent c53aadb commit d77a8b0

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

Zend/zend_compile.c

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4528,22 +4528,6 @@ void zend_compile_switch(zend_ast *ast) /* {{{ */
45284528

45294529
zend_compile_expr(&expr_node, expr_ast);
45304530

4531-
if (cases->children == 1 && cases->child[0]->child[0] == NULL) {
4532-
/* we have to take care about the case that only have one default branch,
4533-
* expr result will not be unrefed in this case, but it should be like in ZEND_CASE */
4534-
zend_ast *stmt_ast = cases->child[0]->child[1];
4535-
if (expr_node.op_type == IS_VAR || expr_node.op_type == IS_TMP_VAR) {
4536-
zend_emit_op(NULL, ZEND_FREE, &expr_node, NULL);
4537-
} else if (expr_node.op_type == IS_CONST) {
4538-
zval_dtor(&expr_node.u.constant);
4539-
}
4540-
4541-
zend_begin_loop(ZEND_NOP, NULL);
4542-
zend_compile_stmt(stmt_ast);
4543-
zend_end_loop(get_next_op_number(CG(active_op_array)), NULL);
4544-
return;
4545-
}
4546-
45474531
zend_begin_loop(ZEND_FREE, &expr_node);
45484532

45494533
case_node.op_type = IS_TMP_VAR;

0 commit comments

Comments
 (0)