Skip to content

Commit 786e0ae

Browse files
committed
Use zend_make_tmp_result() helper in more places
1 parent f264bf2 commit 786e0ae

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

Zend/zend_compile.c

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7617,12 +7617,11 @@ void zend_compile_short_circuiting(znode *result, zend_ast *ast) /* {{{ */
76177617

76187618
if (left_node.op_type == IS_TMP_VAR) {
76197619
SET_NODE(opline_jmpz->result, &left_node);
7620+
GET_NODE(result, opline_jmpz->result);
76207621
} else {
7621-
opline_jmpz->result.var = get_temporary_variable();
7622-
opline_jmpz->result_type = IS_TMP_VAR;
7622+
zend_make_tmp_result(result, opline_jmpz);
76237623
}
76247624

7625-
GET_NODE(result, opline_jmpz->result);
76267625
zend_compile_expr(&right_node, right_ast);
76277626

76287627
opline_bool = zend_emit_op(NULL, ZEND_BOOL, &right_node, NULL);
@@ -8442,28 +8441,23 @@ static void zend_compile_encaps_list(znode *result, zend_ast *ast) /* {{{ */
84428441
opline->extended_value = IS_STRING;
84438442
opline->op1_type = opline->op2_type;
84448443
opline->op1 = opline->op2;
8445-
opline->result_type = IS_TMP_VAR;
8446-
opline->result.var = get_temporary_variable();
84478444
SET_UNUSED(opline->op2);
8448-
GET_NODE(result, opline->result);
8445+
zend_make_tmp_result(result, opline);
84498446
}
84508447
} else if (j == 2) {
84518448
opline->opcode = ZEND_FAST_CONCAT;
84528449
opline->extended_value = 0;
84538450
opline->op1_type = init_opline->op2_type;
84548451
opline->op1 = init_opline->op2;
8455-
opline->result_type = IS_TMP_VAR;
8456-
opline->result.var = get_temporary_variable();
8452+
zend_make_tmp_result(result, opline);
84578453
MAKE_NOP(init_opline);
8458-
GET_NODE(result, opline->result);
84598454
} else {
84608455
uint32_t var;
84618456

84628457
init_opline->extended_value = j;
84638458
opline->opcode = ZEND_ROPE_END;
8464-
opline->result.var = get_temporary_variable();
8459+
zend_make_tmp_result(result, opline);
84658460
var = opline->op1.var = get_temporary_variable();
8466-
GET_NODE(result, opline->result);
84678461

84688462
/* Allocates the necessary number of zval slots to keep the rope */
84698463
i = ((j * sizeof(zend_string*)) + (sizeof(zval) - 1)) / sizeof(zval);

0 commit comments

Comments
 (0)