Skip to content

Commit 38d70ae

Browse files
committed
Removed useless check
1 parent 45c4b0b commit 38d70ae

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

Zend/zend_vm_def.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2425,7 +2425,7 @@ ZEND_VM_HANDLER(59, ZEND_INIT_FCALL_BY_NAME, ANY, CONST|TMP|VAR|CV)
24252425
if (object) {
24262426
GC_REFCOUNT(object)++;
24272427
}
2428-
if (OP2_TYPE == IS_VAR && OP2_FREE && Z_REFCOUNT_P(function_name) == 1 &&
2428+
if (OP2_TYPE == IS_VAR && Z_REFCOUNT_P(function_name) == 1 &&
24292429
fbc->common.fn_flags & ZEND_ACC_CLOSURE) {
24302430
/* Delay closure destruction until its invocation */
24312431
fbc->common.prototype = (zend_function*)Z_OBJ_P(function_name_ptr);

Zend/zend_vm_execute.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1512,7 +1512,7 @@ static int ZEND_FASTCALL ZEND_INIT_FCALL_BY_NAME_SPEC_CONST_HANDLER(ZEND_OPCODE
15121512
if (object) {
15131513
GC_REFCOUNT(object)++;
15141514
}
1515-
if (IS_CONST == IS_VAR && 0 && Z_REFCOUNT_P(function_name) == 1 &&
1515+
if (IS_CONST == IS_VAR && Z_REFCOUNT_P(function_name) == 1 &&
15161516
fbc->common.fn_flags & ZEND_ACC_CLOSURE) {
15171517
/* Delay closure destruction until its invocation */
15181518
fbc->common.prototype = (zend_function*)Z_OBJ_P(function_name_ptr);
@@ -1849,7 +1849,7 @@ static int ZEND_FASTCALL ZEND_INIT_FCALL_BY_NAME_SPEC_TMP_HANDLER(ZEND_OPCODE_H
18491849
if (object) {
18501850
GC_REFCOUNT(object)++;
18511851
}
1852-
if (IS_TMP_VAR == IS_VAR && 1 && Z_REFCOUNT_P(function_name) == 1 &&
1852+
if (IS_TMP_VAR == IS_VAR && Z_REFCOUNT_P(function_name) == 1 &&
18531853
fbc->common.fn_flags & ZEND_ACC_CLOSURE) {
18541854
/* Delay closure destruction until its invocation */
18551855
fbc->common.prototype = (zend_function*)Z_OBJ_P(function_name_ptr);
@@ -2035,7 +2035,7 @@ static int ZEND_FASTCALL ZEND_INIT_FCALL_BY_NAME_SPEC_VAR_HANDLER(ZEND_OPCODE_H
20352035
if (object) {
20362036
GC_REFCOUNT(object)++;
20372037
}
2038-
if (IS_VAR == IS_VAR && (free_op2 != NULL) && Z_REFCOUNT_P(function_name) == 1 &&
2038+
if (IS_VAR == IS_VAR && Z_REFCOUNT_P(function_name) == 1 &&
20392039
fbc->common.fn_flags & ZEND_ACC_CLOSURE) {
20402040
/* Delay closure destruction until its invocation */
20412041
fbc->common.prototype = (zend_function*)Z_OBJ_P(function_name_ptr);
@@ -2258,7 +2258,7 @@ static int ZEND_FASTCALL ZEND_INIT_FCALL_BY_NAME_SPEC_CV_HANDLER(ZEND_OPCODE_HA
22582258
if (object) {
22592259
GC_REFCOUNT(object)++;
22602260
}
2261-
if (IS_CV == IS_VAR && 0 && Z_REFCOUNT_P(function_name) == 1 &&
2261+
if (IS_CV == IS_VAR && Z_REFCOUNT_P(function_name) == 1 &&
22622262
fbc->common.fn_flags & ZEND_ACC_CLOSURE) {
22632263
/* Delay closure destruction until its invocation */
22642264
fbc->common.prototype = (zend_function*)Z_OBJ_P(function_name_ptr);

0 commit comments

Comments
 (0)