Skip to content

Commit 72f9b24

Browse files
committed
zend_compile: Use clearer parameter names for zend_compile_rope_finalize()
1 parent 3d0f581 commit 72f9b24

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Zend/zend_compile.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10188,9 +10188,9 @@ static zend_op *zend_compile_rope_add(znode *result, uint32_t num, znode *elem_n
1018810188
}
1018910189
/* }}} */
1019010190

10191-
static void zend_compile_rope_finalize(znode *result, uint32_t j, zend_op *init_opline, zend_op *opline)
10191+
static void zend_compile_rope_finalize(znode *result, uint32_t rope_elements, zend_op *init_opline, zend_op *opline)
1019210192
{
10193-
if (j == 1) {
10193+
if (rope_elements == 1) {
1019410194
if (opline->op2_type == IS_CONST) {
1019510195
GET_NODE(result, opline->op2);
1019610196
MAKE_NOP(opline);
@@ -10202,7 +10202,7 @@ static void zend_compile_rope_finalize(znode *result, uint32_t j, zend_op *init_
1020210202
SET_UNUSED(opline->op2);
1020310203
zend_make_tmp_result(result, opline);
1020410204
}
10205-
} else if (j == 2) {
10205+
} else if (rope_elements == 2) {
1020610206
opline->opcode = ZEND_FAST_CONCAT;
1020710207
opline->extended_value = 0;
1020810208
opline->op1_type = init_opline->op2_type;
@@ -10212,13 +10212,13 @@ static void zend_compile_rope_finalize(znode *result, uint32_t j, zend_op *init_
1021210212
} else {
1021310213
uint32_t var;
1021410214

10215-
init_opline->extended_value = j;
10215+
init_opline->extended_value = rope_elements;
1021610216
opline->opcode = ZEND_ROPE_END;
1021710217
zend_make_tmp_result(result, opline);
1021810218
var = opline->op1.var = get_temporary_variable();
1021910219

1022010220
/* Allocates the necessary number of zval slots to keep the rope */
10221-
uint32_t i = ((j * sizeof(zend_string*)) + (sizeof(zval) - 1)) / sizeof(zval);
10221+
uint32_t i = ((rope_elements * sizeof(zend_string*)) + (sizeof(zval) - 1)) / sizeof(zval);
1022210222
while (i > 1) {
1022310223
get_temporary_variable();
1022410224
i--;

0 commit comments

Comments
 (0)