Skip to content

Commit 235c7ed

Browse files
committed
Revert "Fix bug #69871 (short-circuiting failure with smart_branch)"
This reverts commit fae6bed.
1 parent a7635e8 commit 235c7ed

File tree

2 files changed

+2
-29
lines changed

2 files changed

+2
-29
lines changed

Zend/tests/bug69871.phpt

Lines changed: 0 additions & 15 deletions
This file was deleted.

Zend/zend_execute.c

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2428,21 +2428,9 @@ static zend_always_inline zend_generator *zend_get_running_generator(zend_execut
24282428
# define ZEND_VM_SMART_BRANCH(_result, _check) do { \
24292429
int __result; \
24302430
if (EXPECTED((opline+1)->opcode == ZEND_JMPZ)) { \
2431-
if (UNEXPECTED((opline+1)->op1_type == IS_CONST)) { \
2432-
zend_uchar __type = Z_TYPE_P(EX_CONSTANT((opline+1)->op1)); \
2433-
ZEND_ASSERT(__type == IS_TRUE || __type == IS_FALSE); /* assume boolean */ \
2434-
__result = __type == IS_TRUE; \
2435-
} else { \
2436-
__result = (_result); \
2437-
} \
2431+
__result = (_result); \
24382432
} else if (EXPECTED((opline+1)->opcode == ZEND_JMPNZ)) { \
2439-
if (UNEXPECTED((opline+1)->op1_type == IS_CONST)) { \
2440-
zend_uchar __type = Z_TYPE_P(EX_CONSTANT((opline+1)->op1)); \
2441-
ZEND_ASSERT(__type == IS_TRUE || __type == IS_FALSE); /* assume boolean */ \
2442-
__result = __type != IS_TRUE; \
2443-
} else { \
2444-
__result = !(_result); \
2445-
} \
2433+
__result = !(_result); \
24462434
} else { \
24472435
break; \
24482436
} \

0 commit comments

Comments
 (0)