]> granicus.if.org Git - php/commitdiff
Revert "Fix bug #69871 (short-circuiting failure with smart_branch)"
authorXinchen Hui <laruence@php.net>
Fri, 19 Jun 2015 15:03:23 +0000 (23:03 +0800)
committerXinchen Hui <laruence@php.net>
Fri, 19 Jun 2015 15:03:23 +0000 (23:03 +0800)
This reverts commit fae6bedea5e094a1f6ddbd1a4453eaea340d1855.

Zend/tests/bug69871.phpt [deleted file]
Zend/zend_execute.c

diff --git a/Zend/tests/bug69871.phpt b/Zend/tests/bug69871.phpt
deleted file mode 100644 (file)
index 7b87a75..0000000
+++ /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)
index 27274d334dd17686b031159cb338eb91e1e92e91..9190eff2c346b4d606bba57504486ed82b4b6052 100644 (file)
@@ -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; \
                } \