Skip to content

Commit 4ecdff2

Browse files
committed
Revert "Microoptimization (avoid code duplication)"
This reverts commit 25d97f5.
1 parent 25d97f5 commit 4ecdff2

File tree

2 files changed

+24
-18
lines changed

2 files changed

+24
-18
lines changed

Zend/zend_vm_def.h

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4016,9 +4016,10 @@ ZEND_VM_HOT_HANDLER(129, ZEND_DO_ICALL, ANY, ANY, SPEC(RETVAL))
40164016

40174017
if (UNEXPECTED(EG(exception) != NULL)) {
40184018
zend_rethrow_exception(execute_data);
4019-
} else {
4020-
ZEND_VM_SET_OPCODE(opline + 1);
4019+
HANDLE_EXCEPTION();
40214020
}
4021+
4022+
ZEND_VM_SET_OPCODE(opline + 1);
40224023
ZEND_VM_CONTINUE();
40234024
}
40244025

@@ -4123,9 +4124,9 @@ ZEND_VM_C_LABEL(fcall_end):
41234124

41244125
if (UNEXPECTED(EG(exception) != NULL)) {
41254126
zend_rethrow_exception(execute_data);
4126-
} else {
4127-
ZEND_VM_SET_OPCODE(opline + 1);
4127+
HANDLE_EXCEPTION();
41284128
}
4129+
ZEND_VM_SET_OPCODE(opline + 1);
41294130
ZEND_VM_CONTINUE();
41304131
}
41314132

@@ -4234,9 +4235,10 @@ ZEND_VM_C_LABEL(fcall_end):
42344235
zend_vm_stack_free_call_frame(call);
42354236
if (UNEXPECTED(EG(exception) != NULL)) {
42364237
zend_rethrow_exception(execute_data);
4237-
} else {
4238-
ZEND_VM_SET_OPCODE(opline + 1);
4238+
HANDLE_EXCEPTION();
42394239
}
4240+
4241+
ZEND_VM_SET_OPCODE(opline + 1);
42404242
ZEND_VM_CONTINUE();
42414243
}
42424244

Zend/zend_vm_execute.h

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1286,9 +1286,10 @@ static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DO_ICALL_SPEC_RETV
12861286

12871287
if (UNEXPECTED(EG(exception) != NULL)) {
12881288
zend_rethrow_exception(execute_data);
1289-
} else {
1290-
ZEND_VM_SET_OPCODE(opline + 1);
1289+
HANDLE_EXCEPTION();
12911290
}
1291+
1292+
ZEND_VM_SET_OPCODE(opline + 1);
12921293
ZEND_VM_CONTINUE();
12931294
}
12941295

@@ -1330,9 +1331,10 @@ static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DO_ICALL_SPEC_RETV
13301331

13311332
if (UNEXPECTED(EG(exception) != NULL)) {
13321333
zend_rethrow_exception(execute_data);
1333-
} else {
1334-
ZEND_VM_SET_OPCODE(opline + 1);
1334+
HANDLE_EXCEPTION();
13351335
}
1336+
1337+
ZEND_VM_SET_OPCODE(opline + 1);
13361338
ZEND_VM_CONTINUE();
13371339
}
13381340

@@ -1460,9 +1462,9 @@ static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DO_FCALL_BY_NAME_S
14601462

14611463
if (UNEXPECTED(EG(exception) != NULL)) {
14621464
zend_rethrow_exception(execute_data);
1463-
} else {
1464-
ZEND_VM_SET_OPCODE(opline + 1);
1465+
HANDLE_EXCEPTION();
14651466
}
1467+
ZEND_VM_SET_OPCODE(opline + 1);
14661468
ZEND_VM_CONTINUE();
14671469
}
14681470

@@ -1544,9 +1546,9 @@ static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DO_FCALL_BY_NAME_S
15441546

15451547
if (UNEXPECTED(EG(exception) != NULL)) {
15461548
zend_rethrow_exception(execute_data);
1547-
} else {
1548-
ZEND_VM_SET_OPCODE(opline + 1);
1549+
HANDLE_EXCEPTION();
15491550
}
1551+
ZEND_VM_SET_OPCODE(opline + 1);
15501552
ZEND_VM_CONTINUE();
15511553
}
15521554

@@ -1655,9 +1657,10 @@ static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DO_FCALL_SPEC_RETV
16551657
zend_vm_stack_free_call_frame(call);
16561658
if (UNEXPECTED(EG(exception) != NULL)) {
16571659
zend_rethrow_exception(execute_data);
1658-
} else {
1659-
ZEND_VM_SET_OPCODE(opline + 1);
1660+
HANDLE_EXCEPTION();
16601661
}
1662+
1663+
ZEND_VM_SET_OPCODE(opline + 1);
16611664
ZEND_VM_CONTINUE();
16621665
}
16631666

@@ -1766,9 +1769,10 @@ static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DO_FCALL_SPEC_RETV
17661769
zend_vm_stack_free_call_frame(call);
17671770
if (UNEXPECTED(EG(exception) != NULL)) {
17681771
zend_rethrow_exception(execute_data);
1769-
} else {
1770-
ZEND_VM_SET_OPCODE(opline + 1);
1772+
HANDLE_EXCEPTION();
17711773
}
1774+
1775+
ZEND_VM_SET_OPCODE(opline + 1);
17721776
ZEND_VM_CONTINUE();
17731777
}
17741778

0 commit comments

Comments
 (0)