@@ -515,15 +515,17 @@ void zend_do_free(znode *op1 TSRMLS_DC) /* {{{ */
515
515
}
516
516
} else {
517
517
while (opline > CG (active_op_array )-> opcodes ) {
518
- if (opline -> opcode == ZEND_FETCH_DIM_R
519
- && opline -> op1_type == IS_VAR
520
- && opline -> op1 .var == op1 -> u .op .var ) {
521
- /* This should the end of a list() construct
522
- * Mark its result as unused
523
- */
524
- opline -> extended_value = ZEND_FETCH_STANDARD ;
525
- break ;
526
- } else if (opline -> result_type == IS_VAR
518
+ if (opline -> opcode == ZEND_FETCH_LIST &&
519
+ opline -> op1_type == IS_VAR &&
520
+ opline -> op1 .var == op1 -> u .op .var ) {
521
+ opline = get_next_op (CG (active_op_array ) TSRMLS_CC );
522
+
523
+ opline -> opcode = ZEND_FREE ;
524
+ SET_NODE (opline -> op1 , op1 );
525
+ SET_UNUSED (opline -> op2 );
526
+ return ;
527
+ }
528
+ if (opline -> result_type == IS_VAR
527
529
&& opline -> result .var == op1 -> u .op .var ) {
528
530
if (opline -> opcode == ZEND_NEW ) {
529
531
opline -> result_type |= EXT_TYPE_UNUSED ;
@@ -2174,20 +2176,6 @@ void zend_compile_static_prop(znode *result, zend_ast *ast, uint32_t type TSRMLS
2174
2176
}
2175
2177
/* }}} */
2176
2178
2177
- static inline zend_uchar get_list_fetch_opcode (zend_uchar op_type ) /* {{{ */
2178
- {
2179
- switch (op_type ) {
2180
- case IS_VAR :
2181
- case IS_CV :
2182
- return ZEND_FETCH_DIM_R ;
2183
- case IS_TMP_VAR :
2184
- case IS_CONST :
2185
- return ZEND_FETCH_DIM_TMP_VAR ;
2186
- EMPTY_SWITCH_DEFAULT_CASE ()
2187
- }
2188
- }
2189
- /* }}} */
2190
-
2191
2179
static void zend_compile_list_assign (znode * result , zend_ast * ast , znode * expr_node TSRMLS_DC ) /* {{{ */
2192
2180
{
2193
2181
zend_ast_list * list = zend_ast_get_list (ast );
@@ -2214,8 +2202,7 @@ static void zend_compile_list_assign(znode *result, zend_ast *ast, znode *expr_n
2214
2202
}
2215
2203
2216
2204
opline = zend_emit_op (& fetch_result ,
2217
- get_list_fetch_opcode (expr_node -> op_type ), expr_node , & dim_node TSRMLS_CC );
2218
- opline -> extended_value |= ZEND_FETCH_ADD_LOCK ;
2205
+ ZEND_FETCH_LIST , expr_node , & dim_node TSRMLS_CC );
2219
2206
2220
2207
zend_emit_assign_znode (var_ast , & fetch_result TSRMLS_CC );
2221
2208
}
0 commit comments