diff options
author | Xinchen Hui <laruence@php.net> | 2015-06-19 23:03:23 +0800 |
---|---|---|
committer | Xinchen Hui <laruence@php.net> | 2015-06-19 23:03:23 +0800 |
commit | 235c7edb8b77981339895782e3ee2bac09e4a6e6 (patch) | |
tree | 77dc277158afe06c09fd350028bbb8e7168866f1 | |
parent | a7635e82f6ab1c33ee91846b6fc1bc6f8b8739b6 (diff) | |
download | php-git-235c7edb8b77981339895782e3ee2bac09e4a6e6.tar.gz |
Revert "Fix bug #69871 (short-circuiting failure with smart_branch)"
This reverts commit fae6bedea5e094a1f6ddbd1a4453eaea340d1855.
-rw-r--r-- | Zend/tests/bug69871.phpt | 15 | ||||
-rw-r--r-- | Zend/zend_execute.c | 16 |
2 files changed, 2 insertions, 29 deletions
diff --git a/Zend/tests/bug69871.phpt b/Zend/tests/bug69871.phpt deleted file mode 100644 index 7b87a7507c..0000000000 --- a/Zend/tests/bug69871.phpt +++ /dev/null @@ -1,15 +0,0 @@ ---TEST-- -Bug #69871 (Short-circuiting failure with smart_branch) ---FILE-- -<?php - -$a = true; -if (isset($a) && 0) { - var_dump(true); -} else { - var_dump(false); -} - -?> ---EXPECT-- -bool(false) diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index 27274d334d..9190eff2c3 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -2428,21 +2428,9 @@ static zend_always_inline zend_generator *zend_get_running_generator(zend_execut # define ZEND_VM_SMART_BRANCH(_result, _check) do { \ int __result; \ if (EXPECTED((opline+1)->opcode == ZEND_JMPZ)) { \ - if (UNEXPECTED((opline+1)->op1_type == IS_CONST)) { \ - zend_uchar __type = Z_TYPE_P(EX_CONSTANT((opline+1)->op1)); \ - ZEND_ASSERT(__type == IS_TRUE || __type == IS_FALSE); /* assume boolean */ \ - __result = __type == IS_TRUE; \ - } else { \ - __result = (_result); \ - } \ + __result = (_result); \ } else if (EXPECTED((opline+1)->opcode == ZEND_JMPNZ)) { \ - if (UNEXPECTED((opline+1)->op1_type == IS_CONST)) { \ - zend_uchar __type = Z_TYPE_P(EX_CONSTANT((opline+1)->op1)); \ - ZEND_ASSERT(__type == IS_TRUE || __type == IS_FALSE); /* assume boolean */ \ - __result = __type != IS_TRUE; \ - } else { \ - __result = !(_result); \ - } \ + __result = !(_result); \ } else { \ break; \ } \ |